text:
\section{Introduction}
\label{intro}
Online shopping websites have become extremely popular in recent years.
In particular, marketplaces such as eBay.com and Amazon.com accept millions of new items every day \citep{cevahir2016large}.
To better cope with the enormous number of items, companies typically organize items into a predefined set of categories \citep{shen2012large}.
Such categorization of items\footnote{While we name this task ``item categorization'', it is important to note that a more accurate term would be ``item classification''. Nevertheless, we stick with the term ``item categorization'' as it is widely used in the literature, for example by \cite{shen2012large,ha2016large}.} is essential for enhancing user experience, where it allows users to search and navigate more easily between items, receive better recommendations for relevant items, and view customized descriptions of items.
Categorization of items is also important for improving operational processes of the company, such as targeted advertising, determining shipping and handling fees, fraud detection, identification of duplicate items, and enforcement of company policies (e.g., which items are allowed or forbidden to be sold on the website) \citep{shen2012large}.

While many item attributes can only be assigned by humans, the category of a given item can be inferred automatically from other attributes of that item.
Automatic categorization of items is important both for saving the costs associated with manual labeling of millions of items every day and for ensuring the consistency of categories, which quickly becomes a serious problem when several individuals are involved in the labeling process \citep{kozareva2015everyone}.

Indeed, many studies have investigated the problem of item categorization as a machine learning text classification task.
Earlier studies relied on representing text as a vector in a multidimensional space of identifiers (e.g., single index terms or N-grams) using various weighting schemes (e.g., TF-IDF) \citep{ding2002goldenbullet,yu2012product,mathivanan2018improving,sun2014chimera}.
However, these methods share the following limitations:
1) they typically produce training matrices which are very high dimensional and consequently very sparse;
2) the semantic meaning of words and their relationship to other words is typically ignored; and
3) the context of words (e.g., where they appear in the sentence, after which word, etc.) is rarely taken into account.

With the growing popularity of deep learning, studies have started to show the applicability of deep learning also in the domain of item categorization  \citep{das2016large,ha2016large,cevahir2016large,li2018don,krishnan2019large,chen2019fine}.
For example, \cite{ha2016large} demonstrated how using multiple Recurrent Neural Network (RNN) layers for encoding textual item attributes can significantly outperform traditional bag-of-words methods.
More recently, \cite{krishnan2019large} showed how to combine both textual and non-textual item attributes as part of Long Short Term Memory network (LSTM) and Convolutional Neural Network (CNN) layers for improving classification performance.
However, a major limitation of deep learning methods is the need for very large labeled datasets to train on.

Recent studies have tried to overcome the aforementioned limitation of deep learning models by using general purpose embeddings such as Word2Vec \citep{kozareva2015everyone} and general purpose pretrained models such as BERT \citep{zaheraprobert,Yang2020BertWD} and CamemBERT \citep{verma2018deep,leecbb2020CBB}.
In both cases, the idea is to train once deep learning models on a very large general-purpose dataset, usually based on news articles, books, or Wikipedia pages.
Then, the obtained embeddings or pretrained models are adjusted to the problem at hand, by using a considerably smaller labeled dataset from that problem's domain.
For example, the two best-performing solutions \citep{verma2018deep, leecbb2020CBB} in the e-commerce item categorization challenge as part of SIGIR 2020, used CamemBERT as a text encoder for item descriptions.
However, as we demonstrate later in this paper, the general-purpose nature of these methods makes them less suitable for domain specific problems.

In this paper, we focus on item categorization settings in which:
1) item descriptions are relatively short and noisy, and
2) labeled data for the target dataset is unavailable.
Such settings entail that deep learning techniques cannot be applied directly on the target dataset, and general-purpose embedding might be less appropriate to use since the text distribution of the target dataset may differ greatly from that of the general-purpose corpus they were trained with.

To address such settings, we propose a novel learning framework, Ensembled Transferred Embedding (ETE), which has four main steps:
1) manually label a small sample dataset;
2) extract embeddings from related large-scale labeled datasets;
3) train transferred models using the extracted transferred embeddings and the labels of the sample dataset; and
4) build an ensemble to combine the outputs of the different transferred models into a single prediction.
We then show the applicability of the proposed framework to the item categorization task in settings for which item descriptions are noisy and short, and labels are not available.

Extensive evaluation that we conducted, using a large-scale real-world invoice dataset provided to us by PayPal, shows that our method significantly outperforms all other considered traditional (e.g., TF-IDF) as well as state-of-the-art (e.g., methods based on general purpose pretrained models such as BERT) item categorization methods.

\medskip
\noindent
The contribution of this paper is three-fold:
\begin{itemize}
\item We propose the ETE learning framework which relies on labeling a relatively small sample of the target dataset, in a semi-automatic process, and
leveraging other large-scale labeled datasets from related domains or related tasks.
\item We show the applicability of the proposed framework for the case of item categorization with short and noisy item descriptions.
\item An extensive evaluation that we conducted demonstrates the superiority of our method compared to traditional as well as state-of-the-art text classification methods.
\end{itemize}

\medskip
The rest of this paper is structured as follows:
In Section \ref{related_work}, we review the background and related work to this study.
In Section \ref{datasets}, we describe the datasets we used in this study.
In ection \ref{method}, we describe the proposed ETE learning framework and how it can be applied to our item categorization setting.
Section \ref{results} discusses the experimental setting and the results.
Section \ref{conclusions} summarizes this paper and suggests directions for future work.

\section{Related Work}\label{related_work}

In this section, we discuss two fields of research which are highly relevant to our study:
(1) classification tasks with limited labeled data and
(2) item categorization tasks.

\subsection{Classification tasks with limited labeled data}
Deep learning has become a very popular method for text classification in recent years, due to its ability to improve the accuracy of previous state-of-the-art methods on several benchmarks \citep{ruder2019neural}.
However, these improvements required hundreds of thousands to millions labeled training examples, which in many cases can be very time consuming and/or expensive to acquire.
This challenge has contributed to the emergence and development of multiple active research fields addressing settings with limited labeled data  \citep{hedderich2020survey}.

\textbf{Distant \& Weak Supervision:}
Weak supervision is a simple strategy to train machine learning models using weak labels obtained by automated methods \citep{wang2019clinical}.
\cite{bach2019snorkel} showed how an unlabeled dataset can be labeled using a set of heuristics designed by domain experts.
For example in a product classification task, data can be labeled based on predefined keywords, a knowledge base of products names, or by mapping the output categories of an unsupervised topic model to a predefined set of categories.
Various labeling functions can later be combined using a generative model and used to assign probabilistic labels to training instances.
\cite{mekala2020contextualized} used only the class name and some related seed words generated by a domain expert in order to create a labeled dataset.
Then, the seed words were iteratively expanded and reduced using Pseudo-Labels and contextualized word embeddings.
\cite{jiang2011target} leveraged massive noisy-labeled tweets selected by positive and negative emoticons as a training set and built sentiment classifiers on these weak labels.
The setting considered in this paper assumes that an external knowledge base or a domain expert that can create labeling functions or class seed words are not available, and therefore distant \& weak supervision methods cannot be directly applied.

\textbf{Few shot learning:}
Few shot learning refers to a setting in which a classifier must be adapted to accommodate new classes which were not available during the training phase, given only a few examples of each of these classes \citep{snell2017prototypical}.
The main approaches to address this problem include:
1) augmenting the small labeled dataset,
2) projecting the data into a more suitable embedding space, and
3) performing weight initialization using a meta learning model \citep{wang2020generalizing}.
For example, \cite{vinyals2016matching} suggested a model that creates an embedding for a new image and compare it to the embedding of a small set of images from the training set.
The algorithm tries to minimize the cosine distance to images in the same class and maximize the distance to other classes.
In this way, when a new class appears, the algorithm can compare the learned embedding of the new class to images from other classes.
\cite{snell2017prototypical} suggested an improved model that form class prototypes from the average embedding of each class and compares the new image embedding to the prototypes and not to all training images.
\cite{finn2017model} suggested a different approach by which meta-learning is used to find a good weight initialization to the neural network.
In this way, only a small number of gradient steps are performed to finetune the network on the small training set of new classes, and overfitting is avoided.
\cite{antoniou2017data} trained a generative adversarial neural network (GAN) that creates new images in the same class of an input image.
In this way, the small training set of each class can be augmented with new syntactic images that were generated by the GAN.
The few shot learning setting is considerably different from the setting considered in this paper, in which the entire set of classes is known during the training phase, but labels are not available.

\textbf{Transfer learning:}
Transfer learning is a method aimed to reduce the need for labeled target data by transferring learned representations from a related model trained on a large labeled dataset \citep{hedderich2020survey}.
For example, in computer vision, it is common to start the training of a new deep neural network with the weights of a neural network that was pre-trained on the large Imagenet dataset \citep{ruder2019neural}.
\cite{mikolov2013distributed} suggested Word2Vec, a method for creating unsupervised word embeddings by predicting the surrounding words in a sentence or a document.
Word2Vec vectors are commonly used to initialize the first layer of a neural network in many NLP models and showed great benefit in improving model accuracy.
\cite{howard2018universal} trained a deep LSTM neural network for a language model task on a large unlabeled dataset.
Then, the LSTM network was fine-tuned on a smaller target dataset.
This method improved the accuracy of the models drastically and showed that after the language model was pre-trained and finetuned on 100 labeled data instances, the accuracy of the model matched the accuracy of a model trained on the full dataset without pre-training.
\cite{devlin2018bert} introduced the BERT model, A Transformer network trained on very large corpus of unlabeled data on the task of masked language modeling and next sentence prediction.
BERT has shown state-of-the-art results when finetuned in several tasks such as natural language inference and question answering.
Transfer learning methods have shown great success in text classification tasks with limited data.
Our proposed framework can be seen as a specialized form of transfer learning, in which embeddings are imported from related, rather than general purpose, tasks or datasets, and in which several such embeddings are combined to form a single ensemble.

\subsection{Item categorization tasks}

Item categorization is a widely studied classification task which aims at classifying e-commerce products into the most suitable category (from a predefined set of categories) relying on the product's attributes, such as title, description, manufacturer, price, etc.

Most of the studies in this field have focused on the textual attributes (i.e., title and description) and treated the problem as a text classification task.
Earlier studies relied on representing text as a vector in a multidimensional space of identifiers (e.g., single index terms or N-grams) using various weighting schemes (e.g., TF-IDF).
For example, \cite{ding2002goldenbullet} compared several classification algorithms for product classification (e.g., KNN and Naïve Bayes).
They also compared the usefulness of using hierarchical classification methods vs. flat classification of all categories.
\cite{yu2012product} compared the effect of stemming and stop word removal pre-processing methods and different feature representations of words (e.g., Binary and TF-IDF) with a linear SVM classifier.
They also compared different multi-class classification strategies (e.g., one vs. all and one vs. one).
\cite{mathivanan2018improving} examined the effect of first clustering the item data using a K-Means algorithm, and then build a supervised KNN model separately for each cluster.
\cite{sun2014chimera} employed a combination of machine learning classifiers, rules created by analysts, and crowdsourcing in order to maintain an accurate item categorization system in production.
However, these methods share the following limitations:
1) they typically produce training matrices which are very high dimensional and consequently very sparse;
2) the semantic meaning of words and their relationship to other words is typically ignored; and
3) the context of words (e.g., where they appear in the sentence, after which word, etc.) is rarely taken into account.

With the growing popularity of deep learning, studies have started to show the applicability of deep learning also in the domain of item categorization
\cite{das2016large} compared the accuracy of a linear model, a gradient boosting model and a CNN model in the item categorization task, and suggested a semi-automatic filtering method of noisy data using an unsupervised topic model.
\cite{ha2016large} used multiple RNN layers and fully connected layers for encoding product textual attributes in a deep neural network on a large scale item categorization task.
They also studied the effect of different parameters and different metadata on the classification accuracy.
\cite{cevahir2016large} used deep belief nets and deep autoencoders in order to classify item descriptions in Japanese into a very large set of categories.
\cite{li2018don} used a sequence to sequence architecture inspired by machine translation neural architectures with RNNs and Transformer layers to produce the whole product taxonomy with one model instead of using hierarchical classification or flat classification methods.
\cite{krishnan2019large} used LSTMs and CNN layers for both text and non-text product attributes.
They investigated the effect of different neural architectures and different ways to combine structured product attributes in the deep neural network.
\cite{chen2019fine} used Character-level Convolutions with skip connections to predict the item category and determine whether a word in the item description is a category.
However, a major limitation of deep learning methods is the need for very large labeled datasets to train on.

Recent studies have tried to reduce the size of labeled dataset that is needed for training by using general purpose embeddings and general purpose pretrained models.
For example, \cite{kozareva2015everyone} compared several feature representations of text (TF-IDF with N-grams, Latent Dirichlet Allocation topic modeling, Mutual Information features and Average Word2Vec vectors) followed by a linear classifier.
This work was one of the firsts to use embeddings from neural networks (Word2Vec) in an item categorization task, and to demonstrate the benefits of using such an approach.
\cite{verma2018deep} and \cite{leecbb2020CBB} used CamemBERT, a pre-trained language model in french, in the e-commerce multi modal item categorization challenge as part of SIGIR 2020.
Specifically, CamemBERT was used as a text encoder, and was combined with a CNN that was used as an image encoder.
\cite{zaheraprobert} and \cite{Yang2020BertWD} used a finetuned version of BERT for item categorization on the ``semantic web challenge on mining the product data in websites'' (MWPD2020).

\section{Datasets}
\label{datasets}

\subsection{Invoice Dataset}
\label{Inv_dataset}

Our main dataset contains 3,461,897 invoices from PayPal's P2P transaction service, sampled and provided to us by PayPal's team.
The invoices were sampled randomly from all invoices, having a seller from the US, and a creation date between September 15 - October 13, 2018.
Each transaction in our dataset contains the following fields: item name, item description, price, quantity of items, Buyer ID, seller ID and seller's industry.
Table \ref{tab:invExample} presents a few representative examples of such invoices.

\begin{table}[h!]
\begin{center}
\caption{Example of six PayPal's invoices and their attributes}
\label{tab:invExample}
\resizebox{\textwidth}{!}{
\begin{tabular}{|c|c|c|c|c|c|c|c|}
\hline
\textbf{Invoice ID} & \textbf{Item name} & \textbf{Item description} & \textbf{Creation date}  & \textbf{Price} & \textbf{Seller's industry} & \textbf{Seller ID} & \textbf{Buyer ID} \\
\hline
1 &  \makecell{Orange and red \\ bralette large} &  & 2018-09-18  & 23.15 & fashion & 222 & 42 \\
\hline
2 & Voice Over Recording & \makecell{Recorded the part of \\ Michael the CEO for the entirety \\ of the project.} & 2018-10-12  & 1000 & media & 15 & 765 \\
\hline
3 & OS Leggings &  & 2018-09-07 & 38 & fashion & 12 & 899 \\
\hline
4 &  \makecell{Transport to north ireland \\ for ebay pellet hose} &  & 2018-10-01  & 32.62 & auto-parts & 65 & 78 \\
\hline
5 & Product &  & 2018-09-18 & 81 & photography & 132 & 65 \\
\hline
6 & Bunnies & 1/2 yard & 2017-11-12 & 27.75 & arts-n-craft & 2 & 555 \\
\hline
\end{tabular}
}
\end{center}
\end{table}

The item name and description fields are free text fields that are filled by the seller without any constraint nor validation.
Thus they are typically very short and noisy\footnote{We use the term noisy to describe user generated text that typically contain grammatical errors, nonstandard spellings, abbreviations, etc., as previously done with tweets on Twitter, \citep{baldwin2015shared}} (see for example, invoices 1 and 3 in Table \ref{tab:invExample}), and sometimes not informative at all with regard to the sold item nor its category (see for example invoices 5 and 6 in Table \ref{tab:invExample}).
It should also be noted that item description is an optional field and therefore is not necessarily filled by the seller.
In fact, it contains a value only in 24\% of the invoices in our dataset.
Figure \ref{InvLen} presents a histogram of the number of words per item (after concatenating the item name and description fields).

\begin{figure}[H]
\centering
\includegraphics[width=0.9\linewidth]{figures/invoice_word_count.pdf}
\caption{Histogram of the number of words per item description in the invoice dataset. The vertical dashed line represents the mean number of words per item description.}
\label{InvLen}
\end{figure}

The seller's industry field represents a classification of the seller itself (i.e., not a specific invoice/item) into a single category out of 40 predefined categories (such as fashion, jewelry, accounting, etc.).
(The goal of this paper is to classify the item sold in an invoice into one of these 40 categories.)
This field is filled in the vast majority of cases automatically using PayPal's proprietary algorithm.
This field is highly imbalanced, where the most popular category (fashion) contains 24\% of the invoices, and the 10 most popular categories contain 78\% of the invoices.
A histogram of the various categories is presented in Fig. \ref{InvCats}

\begin{figure}[H]
\centering
\includegraphics[width=0.9\linewidth]{figures/invoice_categories.pdf}
\caption{The distribution of items by seller's industry in the invoice dataset.}
\label{InvCats}
\end{figure}

It should be noted that before providing us the invoices, PayPal performed an initial filtering procedure which originally involved roughly 8 million invoices, and filtered-out invoices with the following properties:
\begin{itemize}
\item Item description is shorter than 3 symbols.
\item Item description contains a single token which is one of the following: ``invoice'', ``order'' and ``unknown''.
\item Invoice items with duplicate values in the text attributes were kept once.
\end{itemize}
The 3,461,897 invoices analyzed in this study are those remaining after the initial filtering procedure.

\subsection{eBay Dataset}
\label{ebay_dataset}

This dataset contains 2,997,571 items that were extracted using eBay's public API.
The items were sampled randomly from all items on the eBay US website (eBay.com), having a creation date between September 1 - October 26, 2018.
We only used items that were sold at least once.
Each extracted item contains the following fields: item description, country, price, creation date, and category.
Table \ref{tab:ebayExample} presents a few representative examples of such items.

\begin{table}[h!]
\begin{center}
\caption{Example of five eBay items and their attributes}
\label{tab:ebayExample}
\resizebox{\textwidth}{!}{
\begin{tabular}{|c|c|c|c|c|c|}
\hline
\textbf{Record ID} & \textbf{Item description} & \textbf{Country} & \textbf{Price} & \textbf{Creation date} & \textbf{Category} \\
\hline
1 & \makecell{"VINTAGE STERLING SILVER 20"" long  FINE ROPE \\  LINK NECKLACE CHAIN - 3g!"} & GB & 24.38 & 2018/10/15 & jewelry \\
\hline
2 & \makecell{Off White Red iPhone X SE 5 6 7 8 S Plus \\ Off White iPhone Case  [For Apple iPhone 8 Plus]} & ID & 22.98 & 2018/09/20 & cellphones \\
\hline
3 & \makecell{Superhero Smash Hands Gloves Ironman spiderman \\  Hulk The Avengers 1 Pair new [hulk]} & C2 & 11.16 & 2018/09/04 & toy \\
\hline
4 & \makecell{SWIFTLET Tempered Glass Screen Protector for \\ iPad 2 3 4 5 6 Air Mini Pro 9.7 [iPad Air 1/2]} & US & 13.24 & 2018/09/14 & arts-n-craft \\
\hline
5 & \makecell{Real Premium Tempered Glass Film \\ Screen Protector For Apple iPad 1/ 2 / 3 / 4} & SG & 25.07 & 2018/10/14 & furniture \\
\hline
\end{tabular}
}
\end{center}
\end{table}

\newpage
The item description field in this dataset is significantly longer and less noisy than that of the invoices dataset (see for example, record 1 in Table \ref{tab:ebayExample}).
This is in part since it is used to retrieve items in eBay's item search.
Moreover, eBay encourages sellers to augment their item descriptions with relevant keywords, which makes the description of two related items quite similar.
For example, records 4 and 5 in Table \ref{tab:ebayExample} both share the keywords Tempered Glass, Screen Protector, and iPad.
Figure \ref{ebayLen} presents a histogram of the number of words per item description.

\begin{figure}[H]
\centering
\includegraphics[width=0.9\linewidth]{figures/ebay_word_count.pdf}
\caption{Histogram of the number of words per item description in the eBay dataset. The vertical dashed line represents the mean number of words per item description.}
\label{ebayLen}
\end{figure}

The category field here classifies an item into one of eBay's predefined set of categories.
It is important to note that the set of eBay categories is different from the set of PayPal categories.
First, the set of eBay categories contains thousands of categories while the set of PayPal categories contains only 40 categories.
Second, eBay categories are limited to goods (i.e., physical items), whereas PayPal categories include also services.
To overcome this difference, eBay categories were mapped to their corresponding PayPal categories (33 out of the 40 PayPal categories that represent goods) using a set of rules determined manually by PayPal's domain experts.
A histogram of the resulting set of categories is presented in Fig. \ref{ebayCats}

\begin{figure}[h!]
\centering
\includegraphics[width=0.9\linewidth]{figures/ebay_categories.pdf}
\caption{The distribution of items by category in the eBay dataset.}
\label{ebayCats}
\end{figure}

\section{The proposed method}
\label{method}

As stated in section \ref{intro}, deep neural networks are currently the state-of-the-art approach for text classification in general, and for item categorization in particular.

Deep neural networks generally need a huge amount of labeled data in order to not overfit the training set.
For example, \cite{krishnan2019large} used 23 million manually labeled items for training their item-categorization deep neural network.
Manually labeling such a big dataset may be extremely expensive and time consuming, even when using crowdsourcing.

Another approach to leverage neural networks without needing huge labeled datasets, is by using previously learned general purpose embeddings or pretrained models, such as Word2Vec \citep{mikolov2013distributed} or BERT \citep{devlin2018bert}.
These embeddings were generated once by a neural network that was trained on a huge general purpose text corpus (e.g., Wikipedia, books, and news articles), using a self supervised target (e.g., the next word in a sentence).
After these embeddings were learned, they can be used as input features for much smaller labeled datasets.

While general purpose embeddings have demonstrated great value for various text classification tasks, we suspect that they may not be optimal in cases where the target corpus's text distribution differs considerably from that of the general-purpose corpus they were trained with.
Recall that in our setting, item descriptions contain very short, noisy, and domain specific text, thereby presenting a very different text distribution from that of general purpose corpora.

To address this challenge, we propose the Ensembled Transferred Embedding (ETE) learning framework.
The ETE framework first manually labels a small sample of instances from the target dataset and generates embeddings from related large-scale datasets.
Then, each set of generated embeddings and the labelled instances of the target dataset are used to train a model that is tailored to the target task.
Finally the set of trained models are combined into a single ensemble to provide enhanced performance.
This motivation behind this approach is twofold:
(1) using related (or ``transferred'') embeddings as opposed to general purpose embeddings makes the resulting model more tailored to the target task, and
(2) generating the embeddings from related datasets bypasses the need to label a large portion of the target dataset.

In the rest of this section, we first provide more details on the proposed ETE learning framework, and then describe the required details for applying this framework to our unique item categorization task.

\subsection{Ensembled transferred embeddings}

Our Ensembled Transferred Embeddings framework is composed of four main steps (see Figure \ref{GenSchema}):

\begin{itemize}
\item Step 1: Sample Dataset. In this step, we generate a relatively small-scale manually labeled dataset.
This may be achieved by randomly sampling a relatively small number of instances from the large-scale unlabelled target dataset, and manually label these instances.
Labeling can be done by using domain experts, crowdsourcing, heuristics, or a combination of the above.

\item Step 2: Transferred Embeddings. In this step, we extract embeddings from related large-scale labeled datasets.
To achieve this goal, we first need to identify related datasets.
Such datasets are large-scale labeled datasets from a domain or task, similar in nature to that of the target dataset.
Such datasets may include, for example, a publicly available dataset with a similar task from a different domain, a dataset that was gathered for a different task on the same domain, or even a self supervised task on the target dataset.
After the related datasets were obtained, a deep neural network is trained on them to obtain an ``embedding network''.
Finally, the sample dataset is provided as input to the embedding network to generate ``transferred embeddings'', in a manner similar to \citep{sharif2014cnn} and \citep{kiros2015skip}.

\item Step 3: Transferred Models. In this step, we train models using the extracted transferred embeddings and the labels of the sample dataset.
More specifically, for each set of transferred embeddings and their corresponding labels (from the sample dataset), we apply a supervised machine learning algorithm to obtain a ``transferred model''.

\item Step 4: Ensemble. In this step, a meta-model for combining the outputs of the various transferred models is built.
This can be obtained in several ways, for example by using domain knowledge, applying a voting rule such as plurality (see the work by \cite{werbin2019beyond} for more details), or by training a meta-model to learn the right combination method.

\end{itemize}

\begin{figure}[H]
\centering
\includegraphics[width=0.9\linewidth]{figures/ETE_schema.pdf}
\caption{High-level architecture of the ETE framework.}
\label{GenSchema}
\end{figure}

Given a new data instance we first use the trained embedding networks to extract transferred embeddings.
We then apply the transferred models on the extracted transferred embeddings.
Finally, we combine the outputs of the various transferred models using the ensemble to decide on the predicted category.

\subsection{Applying ETE to our item categorization setting}

In this section, we describe the required details for applying the ETE framework to our unique item categorization setting.
Specifically, we elaborate on how the sample dataset was extracted and labeled; how the transferred embeddings were obtained; how the transferred models were trained, and how the ensemble was built.

\subsubsection{Sample Dataset - Labeling using MTurk}
\label{subsec:mturk}

Our sample dataset was obtained by a uniform sampling of 1970 instances\footnote{The specific number of 1970 instances was chosen to fit our budget constraint of 200 USD.} from the invoices dataset and manual labeling of these instances using Amazon Mechanical Turk (MTurk) as we proceed to explain.

Amazon Mechanical Turk is a marketplace for crowd-sourcing of Human Intelligence Tasks (HITs) that is often used to generate labels for supervised machine learning tasks.

Each of our 197 MTurk tasks was composed of labeling a set of 10 instances (1970 instances in total) and was sent to 5 different workers (Turkers).
Each task started by providing a general description of the study, followed by a detailed explanation of how the questions should be approached, and a detailed description for each of the 40 categories (including examples of items that fit that category).

Then, the Turker was asked to answer the task.
For each of the 10 instances appearing in the task, we provided the Turkers with the item name and description and asked them to answer the following three questions:
\begin{enumerate}
\item Can you understand what the sold item is? [yes/no]
\item Choose the most suitable category for the sold item [from a list of provided categories]
\item Were you able to adequately categorize this item? [yes/no with explanation]
\end{enumerate}
An example of such a task is presented in Figure \ref{mturk}.

It is important to note again that the set of PayPal categories includes 40 categories, and requesting the Turker to go through a list of 40 categories to choose the one that best fits the item description is a tedious task.
Indeed, in preliminary experiments that we conducted, we found that providing all 40 categories as options led to a high level of disagreement between Turkers and to a high level of bias towards the categories shown at the beginning of the list.

To overcome this issue, we decided to split the list of categories into 3 parts:
1) most popular - the 10 most popular categories, according to the seller's industry attribute, presented in alphabetical order;
2) computer guessed - the 5 most probable categories (that are not among the 10 most popular categories) according to some baseline model (Logistic regression on TF-IDF representation with industry as the label); and
3) other categories - the rest of the 40 categories.
Clearly, while addressing the bias mentioned above, this design could lead to a different type of bias, by which items from the most popular or computer guessed categories would have higher likelihood to be chosen.
Nevertheless, we believe that such a bias is minor since turkers still chose categories from the ``other categories'' list in a non-negligible number of cases, and the overall level of agreement between turkers increased considerably.

\begin{figure}[H]
\centering
\includegraphics[width=1.0\linewidth]{figures/mturk.pdf}
\caption{An example of a single instance to be categorized as appeared in the Mechanical Turk task}
\label{mturk}
\end{figure}

In order to further help Turkers categorize the items in a fast and accurate way, we provided them a hyperlink to a Google search of the item name, and for each category in the list of categories, we provided a tooltip that included the category's description (the short description of the category that also appeared in the instructions page).

After completing the data collection stage, we reviewed the data to remove ``lazy Turkers'' (i.e., Turkers that have not spent enough time and effort to answer the tasks).
We did so by first calculating the level of agreement for each instance (i.e. the maximum number of Turkers that have assigned the same category to that instance).
We then identified instances with a level of agreement between 3 to 5.
Finally, we removed Turkers (and their answers) that agreed with the most-agreed category in less than 20\% of these instances (and all of their answers).
Since we used Turkers with a master title (required additional payment to MTurk), we found only two such "lazy Turkers''.
After their removal, we sent all of their tasks to MTurk to obtain new and valid answers.

Finally, we used the resulting data to label the instances.
If 3-5 Turkers answered "no" to the first question of a given instance, that instance was labeled as uninformative (15\% of the instances).
If 3-5 Turkers agreed on the category, this category was assigned as the label for that instance (75\% of the instances).
Finally, the rest of the instances were reviewed manually by a domain expert in order to choose the best fitting category (10\% of the instances).

\subsubsection{Transferred Embeddings - using Seller's Industry Attribute and eBay Dataset}

\smallskip
\noindent
We use three types of transferred embeddings (as illustrated in Figure \ref{EmbSchema}):

\begin{itemize}

\item \textbf{Industry embedding}.
\label{subsec:ind_emb}

Recall that we have access to a large number of invoices, but none of these invoices are labeled (i.e., the right item category for each invoice is unknown).
Fortunately, recall that each invoice is associated with the seller's industry category.
While the seller's industry category is clearly related to the item category (fashion website will mostly sell fashion items), the two categories are not identical for two main reasons:
1) sellers usually sell more than one category of items (e.g., a fashion website can also sell jewelry or baby clothes), and
2) the seller's industry category itself may be wrong (since it was generated by an automated algorithm).
To further support this claim, an analysis of the MTurk dataset shows that the seller's industry category matches the item category in 48\% of the cases only.
To conclude, since the seller's industry category can be seen as a noisy label for the item category, we train an LSTM neural network to predict the seller's industry category from the item description and use the last layer before SoftMax as the industry embedding (see more details below).
It is important to note that due to the differences between goods and services categories we decided to split the industry embedding into two types of embeddings: a goods embedding and a services embedding.
Each of the two embeddings was generated by training the LSTM neural network only on part of the invoices data (either those that have a seller's industry category associated with goods or those that have a seller's industry category associated with services).

\item \textbf{eBay embedding}.
\label{subsec:ebay_emb}

In contrast to the invoice dataset, the eBay dataset has reliable item category labels, but it differs from the invoice dataset in two ways.
First, the eBay dataset contains only a subset of the potential invoice categories since eBay sells goods while our invoices, which are the result of P2P transactions, contain also services.
Second, the item description in eBay is longer, more standardized, and less noisy than the item description in the invoice dataset, since it is aimed to be found in the eBay search.
To conclude, since in both cases we aim at predicting the item category from the item description, we train an LSTM neural network to predict the eBay's item category from the eBay's item description and use the last layer before SoftMax as the eBay embedding (see more details below).

\item \textbf{Autoencoder embedding}.
\label{subsec:auto_emb}
The last type of embedding is an embedding trained using a self-supervised Autoencoder.
An Autoencoder is a model that is trained to reconstruct its own input.
We use a similar LSTM architecture to the two neural networks mentioned above for the encoder (without softmax) and a mirror architecture with a fully connected layer in the end for the decoder.

\end{itemize}

\begin{figure}[H]
\centering
\includegraphics[width=0.9\linewidth]{figures/embedding_schema.pdf}
\caption{The process for generating transferred embeddings in our setting.}
\label{EmbSchema}
\end{figure}

\noindent
The three LSTM deep neural networks mentioned above share the same architecture and hyper-parameters.
We chose to use LSTM deep neural networks due to their successful implementation in previous works on item categorization tasks \citep{krishnan2019large, li2018don}.
The chosen architecture and hyperparameters are detailed in Section \ref{results}.
The rationale for using the exact same architecture and hyperparameters in the three networks was merely a matter of simplicity\footnote{Our goal here was to demonstrate the advantages of the ETE framework on a large-scale real-world problem, rather than pursuing the best possible accuracy.}.

\subsubsection{Transferred Models - using a fully connected neural network}

After generating the transferred embeddings described above, we turn to train ``transferred models'', each trained using a different transferred embedding and the Mturk dataset.
More specifically, given a train set of instances extracted from the MTurk dataset, for each transferred embedding (separately), we generate a new training set.
The features of the new training set are generated by applying the transferred embedding on the features of the original MTurk instance, and the target value is simply copied as is from the original MTurk instance.
The resulting set of instances is then used to train a trasferred model.
For this purpose we use a relatively small fully connected neural network with 1 layer of 100 hidden units and a softmax layer.

\subsubsection{Ensemble - Stacking models}

To combine the results of the four transferred models, we use a common ensemble technique called model stacking \citep{wolpert1992stacked}.
More specifically, given a train set of instances extracted from the MTurk dataset, we apply each of the transferred models to obtain a prediction (a features vector containing a single probability value for each of the 40 possible categories).
Next, a new instance is produced by unifying the predictions into a single features vector and copying the target value as is from the original MTurk instance.
Finally, the resulting instances are used to train a Logistic Regression meta model.
This process allows our stacking meta model to learn the strengths and weaknesses of each transferred model and consequently lead to improved predictions.

\section{Evaluation}
\label{results}

In this section we report the extensive evaluation that we conducted.
We begin by describing the experimental setting in subsection \ref{subsec:exp_setting}, followed by the results in subsection \ref{subsec:results}.
The source code used for the proposed framework and its evaluation can be found in \citep{sourcecode2021}.

\subsection{Experimental setting}
\label{subsec:exp_setting}

The ETE method was evaluated by comparing its classification performance to that of seven other benchmark methods (see Section \ref{subsec:compare_methods}) over the labelled MTurk dataset (see Section \ref{subsec:dataset_pre_precossing}).
We applied a stratified 10-fold cross validation evaluation scheme, where in each iteration of the cross validation process both the transferred models and the ensemble were trained on the nine training folds and tested on the test fold.
We used accuracy and weighted F1 score\footnote{The harmonic mean of precision and recall of each class weighted by the class proportion in the data} as measures for classification quality.
To avoid data leakage from the training set to the test set, we removed all the samples that were used in the Mechanical Turk dataset from the invoice dataset.

\subsubsection{Compared methods}
\label{subsec:compare_methods}

We compare our method to four common item categorization methods and three methods based on transferred embeddings.

\begin{itemize}
\item \textbf{Majority:} Our first method is taking the most frequent category in our dataset (fashion) as the predicted class.

\item \textbf{TF-IDF:} Our first baseline model is a regularized logistic regression model trained on TF-IDF with unigrams and bi-grams, similar to \citep{kozareva2015everyone}. The TF-IDF was built using the 3500 most popular terms in the invoice dataset (see Figure \ref{tfidf_terms} in the appendix for more details on why the number 3500 was chosen).
\item \textbf{Average GloVe:} A fully connected neural network trained on average pre-trained GloVe word embedding as input vectors, similar to \citep{kozareva2015everyone}.
\item \textbf{BERT:} A fully connected neural network trained on embeddings extracted from BERT base uncased \citep{devlin2018bert}.
\item \textbf{Autoencoder:} A fully connected neural network trained on transferred embedding extracted from a self supervised auto-encoder \citep{erhan2010does} trained on the invoice dataset as described in Section \ref{subsec:auto_emb}.
\item \textbf{eBay embedding:} A fully connected neural network trained on the eBay transferred embedding as described in Section \ref{subsec:ebay_emb}.
\item \textbf{Industry embedding:} A fully connected neural network trained on the Industry transferred embedding as described in Section \ref{subsec:ind_emb}.
\end{itemize}

\subsubsection{Dataset and pre-processing}
\label{subsec:dataset_pre_precossing}

All of our experiments were conducted using the MTurk dataset.
The two text attributes, item name, and item description were then concatenated to a single text attribute.
The text attribute was then pre-processed by applying very basic text operations, such as tokenization, lower-casing, and removing non alpha-numeric symbols.

\subsubsection{Hyper-parameter tuning}
Recall that all three LSTM deep neural networks used for extracting embeddings shared the same architecture.
The chosen architecture and hyper-parameters were tuned using a grid search on the following hyper parameters: Number of LSTM layers (1-3), size of hidden dimension for the LSTM layers (100,200,400), size of hidden dimension for the fully connected layer (10,30,50,100) and dropout rates (0.1,0.2,0.3,0.5).
The chosen architecture and hyper-parameters are shown in Table \ref{table:architecture}.
We used Adam optimizer in all runs with a learning rate of 0.001.

\begin{table}[h!]
\begin{center}
\caption{Chosen architecture and hyper-parameters for the LSTM deep neural networks}
\label{table:architecture}
\resizebox{\textwidth}{!}{
\begin{tabular}{|c|c|c|c|}
\hline
\textbf{Layer number} & \textbf{Layer} & \textbf{Size} & \textbf{Parameters} \\
\hline
1 & Embedding & 300 & Frozen pre-trained GloVe, max length=15 \\
\hline
2 & Spatial Dropout & & Dropout rate = 0.3 \\
\hline
3 & LSTM & 200 &  Return sequence = True\\
\hline
4 & LSTM & 100 & \\
\hline
5 & Dropout & & Dropout rate = 0.2 \\
\hline
6 & Fully Connected & 30 & Activation = relu \\
\hline
7 & Fully Connected & Number of classes & Activation = Softmax \\
\hline
\end{tabular}
}
\end{center}
\end{table}

\subsection{Results}
\label{subsec:results}

First, we computed the average classification accuracy and Weighted F1 score (over the 10 folds) for each one of the eight compared methods (see Figure \ref{acc_bar}).
As expected, all six embedding-based methods performed better than the basic TF-IDF methods.
Moreover, we see that the Industry embedding method (which is based on transferred embedding) was able to outperform BERT which is the state-of-the-art general purpose embedding method.
We believe that this happens due to the unique characteristics of the text used in our setting --- item descriptions are short, noisy and are domain specific.
These characteristics make the text distribution in our setting different than that of the text used to train BERT, making BERT less suitable for our setting.
Finally, we see that ETE, which ensembles several transferred embeddings, performs the best in terms of classification accuracy and Weighted F1 score and has a low variance across folds compared to other methods.
While Figure \ref{acc_bar} presents the results for each of the Autoencoder, Industry Embedding and eBay Embedding methods alone, and where all three of them are combined together into a single ensemble, Figure \ref{partial_acc} in the appendix presents also the results for ensembles based on all pair combinations.

\begin{figure}[H]
\centering
\includegraphics[width=0.9\linewidth]{figures/acc_boxplot.pdf}
\includegraphics[width=0.9\linewidth]{figures/F1_boxplot.pdf}
\caption{A comparison of the different item categorization methods in terms of: Accuracy (top) and Weighted F1 score (bottom). The horizontal dashed line in the top subfigure represents the accuracy of the Majority method.}
\label{acc_bar}
\end{figure}

To further support our findings above, we performed statistical significance tests.
First, we performed an ANOVA analysis in order to reject the null hypothesis that all compared methods performed the same.
Second, we performed the Tukey post-hoc test to perform a pairwise comparison between the various methods.
With a confidence level of 95\%, we rejected the null-hypothesis that all methods performed the same.
Further applying the Tukey post hoc test supported our finding that ETE performed significantly better than all other methods.

To better understand the cases in which our model had mistaken, we computed the classification confusion matrix (see Figure \ref{confusion}).
Note that categories on the two axes are sorted accordint to their overall popularity.
As expected, most of the model's classifications were successful, resulting in a relatively dark diagonal line.
Some worth noting confusions are between the fashion category and the baby-products category, and between the jewelry category and arts-n-craft category.
Although our evaluation considered such confusions exactly the same as a confusion between the electronics category and the food-n-drink category, it is clear that the former confusions are considerably more tolerable.

\begin{figure}[H]
\centering
\includegraphics[width=1.0\linewidth]{figures/full_confusion_matrix.pdf}
\caption{The classification confusion matrix.}
\label{confusion}
\end{figure}

Figures \ref{len_comp} and \ref{tab:recall_improvments} in the appendix present two addition analyses of errors.
The first analysis examines the accuracy of the ETE model on different lengths (words count) of item descriptions.
The second analysis examines the improvement of the ETE model on the 15 most common categories compared to the industry model which seems to be our strongest baseline.

Since the number of PayPal categories is relatively large, the likelihood of our model (and in fact any model) to confuse between them is high.
This is especially true for rare categories for which the model had a small number of instances to train with.
In Figure \ref{Num_categories}, we demonstrate the impact of restricting the number of categories to the top X most common categories (for X ranging between 5 and 40) and ignoring all instances that belong to the other categories, on the accuracy of the various compared methods.
As expected, we see that all methods performed considerably better when restricted to a lower number of categories.
Moreover, we see that the proposed ETE method, outperforms the other method in all considered cases.
Figure \ref{num_categories_with_other} in the appendix presents a similar analysis in which the rest of the categories are not ignored but rather joined into a single ``other'' category.

\begin{figure}[H]
\centering
\includegraphics[width=0.9\linewidth]{figures/Num_categories.pdf}
\caption{Accuracy as a function of the number of categories considered.}
\label{Num_categories}
\end{figure}

Finally, we also tested the effect of using different machine learning classification algorithms for training the transferred models as well as for training the ensemble model (see Figure \ref{Model_comparison}).
The box plot on the top of the figure shows the effect of using different classifiers for training the transferred models (while keeping the ensemble classifier fixed --- using Logistic Regression).
As can be seen from the figure, using a Neural Network classifier slightly outperformed the others, but this difference was not found to be statistically significant.
More specifically, when applying an ANOVA test with a confidence level of 95\%, we rejected the null-hypothesis that all models performed the same.
Further applying the Tukey post hoc test, we found that Logistic Regression, Random Forest and Neural Network performed significantly better than Gradient Boosting, but the difference between the three models was not found to be significant.

The box plot on the bottom shows the effect of using different classifiers for training the ensemble model (while keeping the classifier of the transferred models fixed --- using Neural Network).
As can be seen from figure, using a Logistic Regression classifier slightly outperformed the others, but this difference was not found to be statistically significant.
More specifically, when applying an ANOVA test with a confidence level of 95\%, we could not reject the null-hypothesis that all models performed the same.

\begin{figure*}[t!]
\centering
\includegraphics[width=0.8\textwidth]{figures/model_comparison_boxplot.pdf}
\includegraphics[width=0.8\textwidth]{figures/ensemble_comparison_boxplot.pdf}
\caption{A comparison of accuracy for different machine learning models: transferred models comparison (top) and ensemble model comparison (bottom).}
\label{Model_comparison}
\end{figure*}

\section{Summary and Future Work}\label{conclusions}
In this paper, we suggested the Ensembled Transferred Embeddings learning framework.
The proposed framework is composed of four main steps:
1) manually label a small sample dataset;
2) extract embeddings from related large-scale labeled datasets;
3) train transferred models using the extracted transferred embeddings and the labels of the sample dataset; and
4) build an ensemble to combine the outputs of the different transferred models into a single prediction.
We then showed the applicability of the proposed framework for the item categorization task in settings for which the textual attributes representing items are noisy and short, and labels are not available.

We evaluated our method using a large-scale real-world invoice dataset provided to us by PayPal.
The results of this evaluation showed that our method significantly outperforms other traditional (e.g., TF-IDF) as well as state-of-the-art (e.g., methods based on general purpose pretrained models such as BERT) item categorization methods.
We believe that the reason for the superiority of our method is due to the unique characteristics of the text used in our setting --- item descriptions are short, noisy and are domain specific.
These characteristics make the text distribution in our setting different than that of the text used to train general purpose embeddings.
Consequently, this makes our embeddings more relevant for the task at hand, despite being trained with a much smaller dataset.

One limitation of our method is the need to manually label a high quality sample dataset.
As we explained in the paper, generating a high quality dataset, even when using a crowdsourcing service, is not a trivial task.
A non-negligible effort should be invested in properly designing the crowdsourced labeling task, in order to obtain an accurate result, in a relatively fast and cheap process.

Another limitation of our method is the use of domain knowledge.
In our framework domain knowledge is essential for the selection of the related large-scale labeled datasets.
As demonstrated throughout the paper, choosing datasets that are related to the domain and the task at hand is essential to building more accurate models.

\bigskip\noindent
In future work it would be interesting to investigate the following directions:
\begin{itemize}

\item \textbf{Uninformative items detection.} 15\% of the items that were annotated using Mechanical Turk were labeled as uninformative. A production item categorization system would need to filter out such items as a first step.
An interesting research direction would be to build a machine learning model to identify such uninformative items, perhaps using the same ETE framework.

\item \textbf{Using additional item attributes.} In this work we used only the textual attributes: item name and item description, as input for our model. Using other attributes such as price, seller ID, and user ID was shown in \citep{krishnan2019large} to improve the accuracy of the item categorization model.

\item \textbf{Hierarchical categories.}
In this paper, we considered a confusion between fashion and baby-products the same as a confusion between electronics and food-n-drink, while cleverly the former is more tolerable.
E-commerce item categories can usually be described using a taxonomy tree, and such a hierarchy can be used to weight confusions differently.
For example, a confusion between two categories sharing a common ancestor at a deeper level of the tree should be weighted lower than a confusion between two categories sharing the root of the tree only.

\item \textbf{Additional domains and tasks.} We believe that the proposed ETE framework is generic enough and can be very useful in additional text classification domains such as health, law, social media, etc. We also believe that the ETE framework, with some adjustments, can be beneficial to tasks other than text classification, such as computer vision, audio processing, time series analysis, and more.

\item \textbf{Combining more methods for text classification with small data.} In recent years methods such as active learning and semi supervised learning showed great success in reducing the number of labeled samples needed for an accurate text classification. These methods can be integrated into the ETE framework in order to achieve better accuracy.

\end{itemize}

\section*{Acknowledgements}
\noindent
This research was funded by PayPal.
We would like to thank our colleagues from PayPal: Yaeli, Adam, Omer, and Avihay who provided meaningful insights and greatly assisted in improving this work.

\section*{References}
\bibliographystyle{model5-names}
\biboptions{authoryear}

\section{Introduction}
\label{intro}
Your text comes here. Separate text sections with
\section{Section title}
\label{sec:1}
Text with citations \cite{RefB} and \cite{RefJ}.
\subsection{Subsection title}
\label{sec:2}
as required. Don't forget to give each section
and subsection a unique label (see Sect.~\ref{sec:1}).
\paragraph{Paragraph headings} Use paragraph headings as needed.
\begin{equation}
a^2+b^2=c^2
\end{equation}

\begin{figure}
  \includegraphics{example.eps}
\caption{Please write your figure caption here}
\label{fig:1}
\end{figure}
\begin{figure*}
  \includegraphics[width=0.75\textwidth]{example.eps}
\caption{Please write your figure caption here}
\label{fig:2}
\end{figure*}
\begin{table}
\caption{Please write your table caption here}
\label{tab:1}
\begin{tabular}{lll}
\hline\noalign{\smallskip}
first & second & third  \\
\noalign{\smallskip}\hline\noalign{\smallskip}
number & number & number \\
number & number & number \\
\noalign{\smallskip}\hline
\end{tabular}
\end{table}

redpajama_set_name: RedPajamaArXiv


text:
package org.pentaho.js.require;

import org.json.simple.parser.JSONParser;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.wiring.BundleCapability;
import org.osgi.framework.wiring.BundleWiring;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class RequireJsConfigManager {
  static final String CAPABILITY_NAMESPACE = "org.pentaho.webpackage";

  static final String PACKAGE_JSON_PATH = "META-INF/js/package.json";
  static final String REQUIRE_JSON_PATH = "META-INF/js/require.json";
  static final String EXTERNAL_RESOURCES_JSON_PATH = "META-INF/js/externalResources.json";
  static final String STATIC_RESOURCES_JSON_PATH = "META-INF/js/staticResources.json";

  private static Logger logger = LoggerFactory.getLogger( RequireJsConfigManager.class );

  private static final ScheduledExecutorService executorService =
      Executors.newScheduledThreadPool( 2, r -> {
        Thread thread = Executors.defaultThreadFactory().newThread( r );
        thread.setDaemon( true );
        thread.setName( "RequireJSConfigManager pool" );
        return thread;
      } );
  private final ConcurrentHashMap<Long, List<Map<String, Object>>> configMap = new ConcurrentHashMap<>();
  private final Map<Long, RequireJsConfiguration> requireConfigMap = new HashMap<>();

  private final JSONParser parser = new JSONParser();
  private BundleContext bundleContext;

  private volatile ConcurrentHashMap<String, Future<String>> cachedConfigurations;
  private volatile long lastModified = System.currentTimeMillis();

  private RequireJsBundleListener bundleListener;

  public void setBundleContext( BundleContext bundleContext ) {
    this.bundleContext = bundleContext;
  }

  public void init() throws Exception {
    if ( this.bundleListener != null ) {
      throw new Exception( "Already initialized." );
    }

    // setting initial capacity to three (relative url and absolute http/https url scenarios)
    this.cachedConfigurations = new ConcurrentHashMap<>( 3 );

    this.bundleListener = new RequireJsBundleListener( this );
    this.bundleContext.addBundleListener( this.bundleListener );

    for ( Bundle bundle : this.bundleContext.getBundles() ) {
      this.updateBundleContext( bundle );
    }
    this.updateBundleContext( this.bundleContext.getBundle() );
  }

  public void destroy() {
    this.invalidateCachedConfigurations();

    if ( this.bundleListener != null ) {
      this.bundleContext.removeBundleListener( this.bundleListener );
    }

    this.bundleListener = null;
  }

  public void bundleChanged( Bundle bundle ) {
    boolean shouldRefresh = true;
    try {
      shouldRefresh = this.updateBundleContext( bundle );
    } catch ( Exception e ) {
      // Ignore TODO possibly log
    } finally {
      if ( shouldRefresh ) {
        this.invalidateCachedConfigurations();
      }
    }
  }

  public String getRequireJsConfig( String baseUrl ) {
    String result = null;
    int tries = 3;
    Exception lastException = null;
    while ( tries-- > 0 && result == null ) {
      Future<String> cache = this.getCachedConfiguration( baseUrl );

      try {
        result = cache.get();
      } catch ( InterruptedException e ) {
        // ignore
      } catch ( ExecutionException e ) {
        lastException = e;

        this.invalidateCachedConfigurations();
      }
    }

    if ( result == null ) {
      result = "{}; // Error computing RequireJS Config: ";
      if ( lastException != null && lastException.getCause() != null ) {
        result += lastException.getCause().getMessage();
      } else {
        result += "unknown error";
      }
    }

    return result;
  }

  public long getLastModified() {
    return this.lastModified;
  }

  private boolean updateBundleContext( Bundle bundle ) {
    switch ( bundle.getState() ) {
      case Bundle.STOPPING:
      case Bundle.RESOLVED:
      case Bundle.UNINSTALLED:
      case Bundle.INSTALLED:
        return this.updateBundleContextStopped( bundle );
      case Bundle.ACTIVE:
        return this.updateBundleContextActivated( bundle );
      default:
        return true;
    }
  }

  private boolean updateBundleContextStopped( Bundle bundle ) {
    List<Map<String, Object>> bundleConfig = this.configMap.remove( bundle.getBundleId() );
    RequireJsConfiguration requireJsConfiguration = this.requireConfigMap.remove( bundle.getBundleId() );

    return bundleConfig != null || requireJsConfiguration != null;
  }

  private boolean updateBundleContextActivated( Bundle bundle ) {
    // clear any previous configurations (for bundle updates)
    boolean shouldInvalidate = updateBundleContextStopped( bundle );

    URL packageJsonUrl = bundle.getResource( PACKAGE_JSON_PATH );
    URL configFileUrl = bundle.getResource( REQUIRE_JSON_PATH );

    URL externalResourcesUrl = bundle.getResource( EXTERNAL_RESOURCES_JSON_PATH );
    URL staticResourcesUrl = bundle.getResource( STATIC_RESOURCES_JSON_PATH );

    if ( configFileUrl != null ) {
      // top priority: legacy META-INF/js/require.json
      Map<String, Object> requireJsonObject = this.loadJsonObject( configFileUrl );

      if ( requireJsonObject != null ) {
        this.putInConfigMap( bundle.getBundleId(), requireJsonObject );

        shouldInvalidate = true;
      }
    } else if ( packageJsonUrl != null ) {
      // next: fixed META-INF/js/package.json
      boolean didParsePackageJson = this.parsePackageInformation( bundle, packageJsonUrl );

      shouldInvalidate = shouldInvalidate || didParsePackageJson;
    } else {
      // finally: capability based web roots
      boolean foundPentahoWebPackageCapability = this.processBundleCapabilities( bundle );

      shouldInvalidate = shouldInvalidate || foundPentahoWebPackageCapability;
    }

    // always process legacy META-INF/js/externalResources.json and META-INF/js/staticResources.json
    if ( externalResourcesUrl != null ) {
      Map<String, Object> externalResourceJsonObject = this.loadJsonObject( externalResourcesUrl );
      Map<String, Object> staticResourceJsonObject = this.loadJsonObject( staticResourcesUrl );

      if ( externalResourceJsonObject != null ) {
        List<String> requireJsList = (List<String>) externalResourceJsonObject.get( "requirejs" );

        if ( requireJsList != null ) {
          if ( staticResourceJsonObject != null ) {
            List<String> translatedList = new ArrayList<>( requireJsList.size() );

            for ( String element : requireJsList ) {
              boolean found = false;
              for ( Object key : staticResourceJsonObject.keySet() ) {
                String strKey = key.toString();

                if ( element.startsWith( strKey ) ) {
                  String value = staticResourceJsonObject.get( key ).toString();
                  translatedList.add( value + element.substring( strKey.length() ) );
                  found = true;
                  break;
                }
              }

              if ( !found ) {
                translatedList.add( element );
              }
            }

            requireJsList = translatedList;
          }

          this.putInRequireConfigMap( bundle.getBundleId(), new RequireJsConfiguration( bundle, requireJsList ) );
          shouldInvalidate = true;
        }
      }
    }

    return shouldInvalidate;
  }

  private boolean processBundleCapabilities( Bundle bundle ) {
    BundleWiring wiring = bundle.adapt( BundleWiring.class );

    boolean foundPentahoWebPackageCapability = false;

    if ( wiring != null ) {
      List<BundleCapability> capabilities = wiring.getCapabilities( CAPABILITY_NAMESPACE );

      if ( capabilities != null ) {
        for ( BundleCapability bundleCapability : capabilities ) {
          Map<String, Object> attributes = bundleCapability.getAttributes();

          String root = (String) attributes.getOrDefault( "root", "" );
          while ( root.endsWith( "/" ) ) {
            root = root.substring( 0, root.length() - 1 );
          }

          try {
            URL capabilityPackageJsonUrl = bundle.getResource( root + "/package.json" );
            if ( capabilityPackageJsonUrl != null ) {
              boolean didParsePackageJson = this.parsePackageInformation( bundle, capabilityPackageJsonUrl );

              foundPentahoWebPackageCapability = foundPentahoWebPackageCapability || didParsePackageJson;
            } else {
              logger.warn( bundle.getSymbolicName() + " [" + bundle.getBundleId() + "]: " + root + "/package.json not found." );
            }
          } catch ( RuntimeException ignored ) {
            logger.error( bundle.getSymbolicName() + " [" + bundle.getBundleId() + "]: Error parsing " + root + "/package.json." );

            // throwing here would make everything fail
            // what damage control should we do?
            // **don't register this capability?** <-- this is what we're doing now
            // ignore and use only the capability info?
            // don't register all the bundle's capabilities?
          }
        }
      }
    }

    return foundPentahoWebPackageCapability;
  }

  private boolean parsePackageInformation( Bundle bundle, URL resourceUrl ) {
    try {
      URLConnection urlConnection = resourceUrl.openConnection();
      RequireJsGenerator gen = RequireJsGenerator.parseJsonPackage( urlConnection.getInputStream() );

      if ( gen != null ) {
        RequireJsGenerator.ArtifactInfo artifactInfo =
            new RequireJsGenerator.ArtifactInfo( "osgi-bundles", bundle.getSymbolicName(),
                bundle.getVersion().toString() );
        final RequireJsGenerator.ModuleInfo moduleInfo = gen.getConvertedConfig( artifactInfo );
        Map<String, Object> requireJsonObject = moduleInfo.getRequireJs();

        this.putInConfigMap( bundle.getBundleId(), requireJsonObject );

        return true;
      }
    } catch ( Exception ignored ) {
      // ignored
    }

    return false;
  }

  private void putInConfigMap( long bundleId, Map<String, Object> config ) {
    List<Map<String, Object>> bundleConfigurations = this.configMap.computeIfAbsent( bundleId, key -> new ArrayList<>() );
    bundleConfigurations.add( config );
  }

  private void putInRequireConfigMap( long bundleId, RequireJsConfiguration config ) {
    this.requireConfigMap.put( bundleId, config );
  }

  private Map<String, Object> loadJsonObject( URL url ) {
    if ( url == null ) {
      return null;
    }

    InputStream inputStream = null;
    InputStreamReader inputStreamReader = null;
    BufferedReader bufferedReader = null;

    try {
      URLConnection urlConnection = url.openConnection();
      inputStream = urlConnection.getInputStream();
      inputStreamReader = new InputStreamReader( urlConnection.getInputStream() );
      bufferedReader = new BufferedReader( inputStreamReader );

      return (Map<String, Object>) this.parser.parse( bufferedReader );
    } catch ( Exception ignored ) {
      // ignored
    } finally {
      try {
        if ( bufferedReader != null ) {
          bufferedReader.close();
        }
        if ( inputStreamReader != null ) {
          inputStreamReader.close();
        }
        if ( inputStream != null ) {
          inputStream.close();
        }
      } catch ( IOException ignored ) {
        // ignored
      }
    }

    return null;
  }

  // package-private for unit testing
  Future<String> getCachedConfiguration( String baseUrl ) {
    return this.cachedConfigurations.computeIfAbsent( baseUrl, k -> {
      this.lastModified = System.currentTimeMillis();

      List<Map<String, Object>> configurations = new ArrayList<>();

      this.configMap.values().forEach( configurations::addAll );

      return executorService.schedule( new RebuildCacheCallable( baseUrl, configurations,
              new ArrayList<>( this.requireConfigMap.values() ) ), 250, TimeUnit.MILLISECONDS );
    } );
  }

  // package-private for unit testing
  void invalidateCachedConfigurations() {
    this.lastModified = System.currentTimeMillis();

    this.cachedConfigurations.forEach( ( s, stringFuture ) -> stringFuture.cancel( true ) );
    this.cachedConfigurations.clear();
  }

}

redpajama_set_name: RedPajamaGithub


text:
Q: How to remove customAnimations from childFragmentManager Android The code to apply custom animations is this, though when I pass childFragmentManager to a bottom sheet dialog fragment the same animations are applied which is not even overridding.
.childFragmentManager
        .beginTransaction()
        .setCustomAnimations(
            enter,
            exit,
            popEnter,
            popExit
        )
        .replace(R.id.fl_fragment_container, fragment, tag)
        .setReorderingAllowed(true)
        .apply {
            if (shouldAddToBackStack)
                addToBackStack(tag)
        }
        .commit()

A: You can disable the animation from BottomSheetDialogFragment
 override fun onResume() {
        super.onResume()
        // Disable dialog window animations for this instance
        dialog?.window?.setWindowAnimations(-1)
    }

redpajama_set_name: RedPajamaStackExchange


The social network made it clear that their IPO road show was going to be different and they haven't disappointed.
Facebook is preparing for its initial public offering next week, but first it is going offline in a bid to attract would-be investors.
Company founder Mark Zuckerberg is in New York this week doing his best to whip audiences into a frenzy about all things social media.
The hoodie-wearing guru had crowds at the Big Apple's Sheraton Hotel enthralled with his take on the future of Facebook in an ever diversifying media market.
The CEO fielded questions about the company's slowing revenue growth, as well as its recent $1 billion purchase of Instagram – a decision Zuckerberg feels was the right one to make and would make again.
Also on the road was finance chief David Ebersman and the brand's chief operating officer Sheryl Sandberg.
Media professionals who tried to catch first-hand footage of the event were forced to interview guests after the public talk, with the Monday (May 7) conference kept strictly off-limits to anyone holding a press pass.
It wouldn't be an internet-based company without some kind of online offering though so there was nothing surprising about the brand's public announcement in the form of a video pitch.
In the video Zuckerberg says: "We are going to reach this point where almost every app you use is going to be integrated with Facebook in some way."
Facebook is hoping to raise roughly $US10.6 billion in its first public offering, which is well above other markets leaders and competitors such as Google.
And while some commentators feel that this amount may seem bullish, it is clear that this is one of the most watched IPOs to take place in recent years and perhaps well into the future.


text:
Photo Credit: LOS ANGELES, CALIFORNIA - JUNE 09: ≈ look on at the Netflix "When They See Us" FYSEE Event at Raleigh Studios on June 09, 2019 in Los Angeles, California. (Photo by Emma McIntyre/Getty Images for Netflix)
'When They See Us': An Evening Of Black Joy With Oprah, Ava And The Exonerated Five
Brooke Obie
Hundreds flocked to Raleigh Studios Sunday night to attend the Netflix FYSee Emmy consideration event for When They See Us, Ava DuVernay's powerful new limited series detailing how five Black and brown children were wrongfully convicted and imprisoned for the rape of the woman known as the Central Park Jogger in 1989. After a screening of the first episode of the four-part series, When They See Us, which details how the young boys were violently coerced into confessing to the crime, Executive Producer Oprah Winfrey took the stage with most of the main cast of the series and DuVernay, followed by the real men that the series portrays–Kevin Richardson, Korey Wise, Yusef Salaam, Raymond Santana and Antron McCray–The Exonerated Five.
In interviews that will air on OWN and Netflix on Wednesday, June 12, Winfrey explored with the cast and the real men how the series has impacted their lives.
Niecy Nash, who plays Delores Wise, the mother of Korey Wise, shared that the series changed her life and that she's joined the real-life Korey's Innocence Project, which helps wrongfully convicted people like Wise regain their freedom through the legal system. For McCray, whose mother passed away just before the series premiered, watching the series "brought back a lot of pain," he shared with Winfrey, and it did not provide him with a sense of healing. "I'm broken," he said. Still, all of the men expressed their gratitude to DuVernay for telling their story in a powerful way that will impact the way other people live their lives, as well.
When Winfrey asked whether the men blamed Linda Fairstein, the former head of the sex crimes division at the New York District Attorney's office for the investigation and prosecution, all of the men agreed, despite Fairstein's rant in the Wall Street Journal opinion section that called the series "a basket of lies." While they all expressed gratitude that Fairstein is being held accountable–she's been dropped by her book publisher, has had many of her awards rescinded and has resigned from many boards of directors–DuVernay believes there is much more work to be done:
"I think that it's important that people be held accountable," she said. "And that accountability is happening in a way today that it did not happen for the real men 30 years ago. But I think that it would be a tragedy if this story and the telling of it came down to one woman being punished for what she did because it's not about her. It's not all about her. She is part of a system that's not broken, it was built to be this way. It was built to oppress, it was built to control, it was built to shape our culture in a specific way that kept some people here and some people here. It was built for profit. It was built for political gain and power. And it is incumbent on us; it lives off us, our taxpayer dollars, our votes, the goods that we buy that are made inside of prisons. It lives off of our ignorance and we can no longer be ignorant. OK, Linda Fairstein. OK, Elizabeth Lederer. OK, all of these people on this particular case who need to be held accountable. But the real thing that we are all trying to do, all the artists who collaborate with me…our real goal is to be able to say, 'Go America. Let's do this. Let's change this.' You can't change what you don't know, so we came together to show you what you may not know. Now that you know, what will you do? How will you change this? That's our goal."
LOS ANGELES, CALIFORNIA – JUNE 09: Yusef Salaam, Kevin Richardson, Anton McCray, Raymond Santana and Korey Wise attend the Netflix "When They See Us" FYSEE Event at Raleigh Studios on June 09, 2019 in Los Angeles, California. (Photo by Handout/Getty Images for Netflix)
While there were tears and evident deep pain still present in the men now known as The Exonerated Five (read Shadow And Act's interview with Wise, Salaam and Santana here), the most beautiful moments of the evening happened after the cameras stopped rolling. The men held hands and raised their arms in victory, to a standing ovation–just as their counterparts did at the end of When They See Us. At the reception that followed, fans eagerly waited to speak to Wise, Salaam, Richardson, McCray and Santana. The men seemed buoyed by the love of the crowd, shaking hands, signing autographs, taking selfies.
One especially touching moment occurred when a young woman broke down crying at the sight of Wise. Of the five, Wise's turmoil, as shown in episode four of When They See Us, was particularly brutal, as he languished in adult prison from the age of 16, when the others were sent to juvenile prisons and served half the time that Wise did. Wise went underneath the rope that separated the men and the cast from the audience, to give the young woman a hug. "I'm all right," he comforted her.
LOS ANGELES, CALIFORNIA – JUNE 09: Korey Wise attends the Netflix "When They See Us" FYSEE Event at Raleigh Studios on June 09, 2019 in Los Angeles, California. (Photo by Handout/Getty Images for Netflix)
The men also embraced each other, laughing and joking together throughout the evening. When the DJ played the unofficial Black Anthem by Frankie Beverly and Maze, "Before I Let Go," the men were arm and arm, singing along to the chorus at the top of their lungs, to cheers from their supporters. The pain isn't gone; there's much healing that needs to take place, and much more work for everyone to do. But in those few hours of celebration, the most palpable emotion was pure joy.
But y'all, Y'ALL. My absolute favorite part of the #WhenTheySeeUs #WhenTheySeeUsNow evening was watching #TheExoneratedFive sing along to the unofficial Black National Anthem #BeforeILetGo. The JOY jumped out ???? They deserve all the joy in the world ✊???????? pic.twitter.com/FiIlQGf1MS
— HOT GIRL BROOKE (@BrookeObie) June 13, 2019
Watch the Oprah Winfrey 'When They See Us' special interview on OWN and Netflix.
After 'When They See Us,' The Exonerated Five Are 'Still Surviving,' And Fighting Back [EXCLUSIVE INTERVIEW]
'When They See Us': Don't Miss The Radical Message In This Scene
After 'When They See Us' Backlash, Central Park Five Lead Prosecutor Linda Fairstein Resigns

redpajama_set_name: RedPajamaCommonCrawl


Be the first to know when new content, recipes, giveaways, etc. hit the site.
I respect your privacy and will not sell or share your data. Promise.
Thank you! Good stuff coming your way!
HIIT training is all the rage, but can group HIIT training really hit the mark? I hit up BODI to find out.
If you think this is just another cycling class you are so, so wrong.
Quaint and homey; Northington's non-threatening environment may be perfect for those just getting started on their journey.
Gym crashing EliteU to see if I can hang with how the top athletes train.
Gym crashing Pro Physiques to see if the hype is real when it comes to competition prep.
I hate having insecurities as much as anyone does, but in an industry where your body is the main topic of conversation, it's inevitable.
The postpartum slim down process - Steps you can take when going to the gym just isn't an option (yet).


text:
package com.amazonaws.services.lookoutmetrics.model;

import javax.annotation.Generated;

/**
 *

 * The request exceeded the service's quotas. Check the service quotas and try again.
 *

 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ServiceQuotaExceededException extends com.amazonaws.services.lookoutmetrics.model.AmazonLookoutMetricsException {
    private static final long serialVersionUID = 1L;

    /**
     *

     * The ID of the resource.
     *

     */
    private String resourceId;
    /**
     *

     * The type of the resource.
     *

     */
    private String resourceType;
    /**
     *

     * The quota code.
     *

     */
    private String quotaCode;
    /**
     *

     * The service code.
     *

     */
    private String serviceCode;

    /**
     * Constructs a new ServiceQuotaExceededException with the specified error message.
     *
     * @param message
     *        Describes the error encountered.
     */
    public ServiceQuotaExceededException(String message) {
        super(message);
    }

    /**
     *

     * The ID of the resource.
     *

     *
     * @param resourceId
     *        The ID of the resource.
     */

    @com.fasterxml.jackson.annotation.JsonProperty("ResourceId")
    public void setResourceId(String resourceId) {
        this.resourceId = resourceId;
    }

    /**
     *

     * The ID of the resource.
     *

     *
     * @return The ID of the resource.
     */

    @com.fasterxml.jackson.annotation.JsonProperty("ResourceId")
    public String getResourceId() {
        return this.resourceId;
    }

    /**
     *

     * The ID of the resource.
     *

     *
     * @param resourceId
     *        The ID of the resource.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ServiceQuotaExceededException withResourceId(String resourceId) {
        setResourceId(resourceId);
        return this;
    }

    /**
     *

     * The type of the resource.
     *

     *
     * @param resourceType
     *        The type of the resource.
     */

    @com.fasterxml.jackson.annotation.JsonProperty("ResourceType")
    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }

    /**
     *

     * The type of the resource.
     *

     *
     * @return The type of the resource.
     */

    @com.fasterxml.jackson.annotation.JsonProperty("ResourceType")
    public String getResourceType() {
        return this.resourceType;
    }

    /**
     *

     * The type of the resource.
     *

     *
     * @param resourceType
     *        The type of the resource.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ServiceQuotaExceededException withResourceType(String resourceType) {
        setResourceType(resourceType);
        return this;
    }

    /**
     *

     * The quota code.
     *

     *
     * @param quotaCode
     *        The quota code.
     */

    @com.fasterxml.jackson.annotation.JsonProperty("QuotaCode")
    public void setQuotaCode(String quotaCode) {
        this.quotaCode = quotaCode;
    }

    /**
     *

     * The quota code.
     *

     *
     * @return The quota code.
     */

    @com.fasterxml.jackson.annotation.JsonProperty("QuotaCode")
    public String getQuotaCode() {
        return this.quotaCode;
    }

    /**
     *

     * The quota code.
     *

     *
     * @param quotaCode
     *        The quota code.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ServiceQuotaExceededException withQuotaCode(String quotaCode) {
        setQuotaCode(quotaCode);
        return this;
    }

    /**
     *

     * The service code.
     *

     *
     * @param serviceCode
     *        The service code.
     */

    @com.fasterxml.jackson.annotation.JsonProperty("ServiceCode")
    public void setServiceCode(String serviceCode) {
        this.serviceCode = serviceCode;
    }

    /**
     *

     * The service code.
     *

     *
     * @return The service code.
     */

    @com.fasterxml.jackson.annotation.JsonProperty("ServiceCode")
    public String getServiceCode() {
        return this.serviceCode;
    }

    /**
     *

     * The service code.
     *

     *
     * @param serviceCode
     *        The service code.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ServiceQuotaExceededException withServiceCode(String serviceCode) {
        setServiceCode(serviceCode);
        return this;
    }

}


text:
HomeCamila Cabello
Watch — 'Don't Go Yet' Music Video by Camila Cabello
"Don't Go Yet" is also included on her forthcoming third album, "Familia."
Credit: Courtesy of Camila Cabello/Instagram
The fans of Camila Cabello now have new music to enjoy, thanks to her latest track, "Don't Go Yet."
This is her first new song since the release of her album "Romance" in 2019.
Read Also: Camila Cabello Teases Something's on the Way
After weeks of teasers, the song's arrival on July 23 is accompanied by the release of a thrilling music video.
"Don't Go Yet" is also included on her forthcoming third album, "Familia." Check it out below.
Read Also: Shawn Mendes Reveals he loved Camila Cabello Five Years Before they Started a Relationship
Read Also: The Fear Shawn Mendes has About his Relationship with Camila Cabello
Read More:Camila CabelloEvergreenMusicNewsWorldwide News


In addition to everything you already love about American Outdoor Grills, from the commercial-grade 304 stainless steel construction to the sleek appearance, the "L" series grills will include a few additional features for a revamped and completely updated grill.
The "L" series grills will feature a push button electronic ignition that will no longer require batteries, as previous models have. This ignition system will require instead 120 volt AC power, so you do not need to be concerned with changing the batteries.
To light these grills, you will simply depress the control knob and turn it to the "HI LIGHT" position, then press the ignition button. It's really that easy!
Included in the "L" series grills will also be interior halogen lights. These bright lights will allow you to see your grill's cooking surface as you grill at dusk and into the night. These lights are turned on with a push button opposite the ignitor and run on the 120V electricity.
The "L" series is available in 24", 30", and 36" sizes, and in built-in, standalone, and post styles. See below for links to review and purchase these grills.
Still have questions regarding the American Outdoor Grill "L" Series? Please feel free to contact us, and we would be happy to help!


text:
Manganoblödite is a rare manganese mineral with the formula Na2Mn(SO4)2·4H2O. Somewhat chemically similar mineral is D'Ansite-(Mn). Manganoblödite was found in the Blue Lizard mine, San Juan County, Utah, US, which is known for several relatively new secondary uranium minerals In the mine, manganoblödite occurs intimately intergrown with manganese-, cobalt- and nickel-enriched blödite and a yet another new mineral - cobaltoblödite. Manganoblödite, as suggested by its name is a manganese-analogue of blödite. It is also analogous to changoite, cobaltoblödite and nickelblödite - all three are members of the blödite group.

Notes on chemistry
Manganoblödite is impure, containing admixtures of magnesium, cobalt and nickel.

Association and origin
Besides blödite and cobaltoblödite, other minerals associated with manganoblödite include chalcanthite, gypsum, johannite, sideronatrite, a feldspar group mineral and quartz.

References

Manganese(II) minerals
Sulfate minerals
Sodium minerals
Monoclinic minerals
Minerals in space group 14

redpajama_set_name: RedPajamaWikipedia


text:
Exchange District businesses show off creative warm drinks during week-long event
By: Sam Bell
On Dec. 5, 2022, Hot Beverage Week returned to the Exchange District for its sixth year. The week-long event, organized by the Exchange District BIZ, gave Exchange District bars, cafes, and eateries the opportunity to showcase specially-crafted warm beverages. Patrons then voted online for their favourite drinks on the Exchange District BIZ's website.
Many local bars, cafes, and breweries close to Red River College Polytechnic's Exchange District Campus took part in the week, including Harrisons Coffee Co., Amsterdam Tea Room & Bar, and Clementines.
Businesses served up several creative renditions of classic beverages this year, ranging from boozy hot chocolates to virgin cocktails.
"Supporting local is something everyone should be considering," said Ian Hamm, a first-year Business Information Technology student at the RRC Polytech.
"So many smaller businesses shut down during the pandemic, which was very unfortunate. It's our job to help the ones still left to stay afloat," Hamm said.
RRC Polytech student Kailyn Louka enjoys the Salt & Smoke beverage at Amsterdam Tea Room & Bar on Wednesday, Dec. 7, 2022. The drink was Amsterdam Tea Room & Bar's entry for Hot Beverage Week 2022. (Sam Bell)
Amsterdam Tea Room & Bar, a specialty cocktail lounge located a few blocks from the Exchange District Campus, crafted beverage called Salt & Smoke for this year's Hot Beverage Week.
"We used smoked Chinese black tea and Scottish Laphroaig whisky," said Mark Turner, owner of Amsterdam Tea Room & Bar.
"We infused the tea with some sugar syrup, sea salt and whisky barrel bitters, which really tied it all together. It's like a campfire in a cup," Turner said.
Turner said Hot Beverage Week has slowly gotten bigger and gained more media overage over the last six years.
"Year by year, I've seen it grow. I think it's great for local businesses to get that extra marketing that they might not have been able to afford before," Turner said.
Little Brown Jug Brewing Co. (LBJ), located across William Avenue from RRC Polytech's Exchange District Campus, served up their take on a boozy hot chocolate, called Sugar, Spiked & Everything Nice.
"I would love to see more students come in," said Cal Cheney, LBJ's taproom manager.
"Students often come in to grab a grilled cheese or a beer, but I would love for them to come and try our new beverage," Cheney said.
The winner of this year's Hot Beverage Week was Cake-ology's version of a hot chocolate. The drink was made with Milo chocolate-malt powder and dark chocolate, and topped with a leche flan foam.
PreviousLatin Identity Club is just getting warmed up
NextFilling the vessel at The Leaf
Joy to the Winnipeg
99 pieces of art on the wall
Music in Manitoba: Summer 2018
Game Jam Comes to Red River College


text:
Q: error in java code of performing mouselistener hi i am performing a mouselistener action in my programm i am making a color jpanel when user click on panel it change its color but a line of code give some error like create a class e in your code but e is already declared as a instance of event class plz help me here is my code below.error is in this line "panel.addMouseListener(e);".
'import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class randomcolor extends JFrame{
    JPanel panel;
    public randomcolor (){
        panel=new JPanel();
        panel.setBackground(rancolor());
        add(panel);
    }

    event e =new event();
    panel.addMouseListener(e);

    public Color rancolor(){
        int r= (int) (Math.random()*256);
        int g= (int) (Math.random()*256);
        int b= (int) (Math.random()*256);
        return (new Color(r,g,b));
    }

    public class event implements MouseListener{
        public void mouseClicked(MouseEvent e) {
            panel.setBackground(rancolor());
        }
        public void mousePressed(MouseEvent e) {
        }
        public void mouseReleased(MouseEvent e) {
        }
        public void mouseEntered(MouseEvent e) {
        }
        public void mouseExited(MouseEvent e) {
        }
    }

    public static void main (String args[]){
        randomcolor gui=new randomcolor();
        gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        gui.setVisible(true);
        gui.setSize(300, 300);
        gui.setTitle("color panel");
    }
}

A: Capitalize Event in event e = new event(). It should probably be Event e = new Event(). The formatting in your code looks odd; that might be hiding other formatting errors too.
Now that the code is properly formatted, I can see another problem; you probably meant to have
Event e = new Event();
panel.addMouseListener(e);

inside your constructor, instead of after that right curly brace.

A: Move statement panel.addMouseListener(e); to the constructor randomcolor(). This will solve the issue.


text:
Q: How to access PDO object in class? I'm trying to build a simple database class. Within the constructor, I am initializing a PDO connection to my MySQL database. I am assigning this connection to a private variable in the database class. I then want to access that variable from a public function in the same class to query the database. Unfortunately, I keep getting an error as follows:
Fatal error: Call to a member function prepare() on a non-object.
Below is my code for the Database class I am using:
class Database{
    private $conn;

    private function __contruct(){
        try{
            $this->conn = new PDO('mysql:host=myhost;dbname=mydatabase', 'username', 'password', array(PDO::ATTR_PERSISTENT => true));
        } catch (PDOException $e) {
            print "Error!: " . $e->getMessage()."<br/>";
            die();
        }
    }

    public function query($q){
        $query = $this->conn->prepare($q);
        $query->execute();
        $result = $query->fetchAll();
        print_r($result);
    }
}

I then have the following code to utilize this class.
$db = new Database();
$db->query("SELECT * FROM FOO");

Any suggestions for the cause of the error would be greatly appreciated.

A: There are two problems with your constructor:

*

*It's misspelled: __contruct() should be __construct()

*It's private, so you won't be able to instantiate it from outside the class.

#2 isn't necessarily a problem, but you'll need a static method to do anything with it.


The U.S. Food and Drug Administration has issued a warning letter to MannKind Corp. for sharing a misleading post about the company's drug Afrezza on its Facebook page.
Afrezza is an inhalable insulin treatment for diabetic patients. According to the FDA, MannKind overstated the benefits of the drug and misrepresented the health risks it poses for patients with chronic lung disease.
The post appeared on the Westlake Village biotech firm's Facebook page from Feb. 9 to March 19. The FDA issued the warning on Oct. 5.
The FDA requested that MannKind immediately cease the misleading branding and provide a written response detailing how it plans to comply with the request.
Shares of MannKind (MNKD) dropped 12 cents, or 6 percent, on Monday to close at $1.87 on the Nasdaq.


For 60 years of production activity the state enterprise «Mykolayiv mechanical-repair plant» (the 346th armoured repair plant) has become a leader in Ukraine and countries of the CIS among enterprises which are specialized in area of manufacturing and modernization of light armored wheeled materiel. Nomenclature of products which is produced by the plant is very large.
in 2007 – 2008 BTR-70Di and BRDM-2Dі (with diesel engines of FPT «IVEСО» Tektor ( EURO-3).
BTR-70Dі and BRDM-2Dі were found the most successful products, which successfully have passed the state tests, and repeatedly demonstrated in the exhibitions of armament and took part in the military maneuvers, where they showed, that they considerably exceed existent serial vehicles by its own characteristics, what the relevant certificates and protocols testify to.
The enterprise constantly perfects quality and technical characteristics of producible products. Works are regularly conducted concerning a selection, teaching and training of the engineering personnel and skilled workers of enterprise.