Dashboard
Generate ReportRecent Activities
-
Previous activity
-
Current activity
-
Next activity
Calendar
SB Admin 2 makes extensive use of Bootstrap 4 utility classes in order to reduce CSS bloat and poor page performance. Custom CSS classes are used to create custom components and custom utility classes.
Before working with this theme, you should become familiar with the Bootstrap framework, especially the utility classes.


When your Docker Meets Pyspark to Do Sentiment Analysis of 10+ GB Customer Review Data-PART 1
Docker+SQL+Apache Spark+Pandas
In this blog I going to show you how you could easily use the Pyspark to wrangle the gigabyte scale data set. OK, so let’s get started:
from IPython.core.display import Image
Image('start.jpeg', width=1000, height=1000)
Setting up the Docker Engine
Now, here the docker will be used to easily download the jupyter/pyspark docker image and then use it for distributed processing. So, the first thing you must know is whether your OS has a Docker engine.
The Linux user will not have trouble with this one and they can simply follow the instruction to set-up the docker in their OS from the link:
Docker Manual for Linux Users:
For Windows and Mac user you can follow the official link to set-up your docker engine:
Note: if you are a Data Scientist/ Analyst reading this post, I highly recommend you to work with Linux OS distribution since it will really help you especially when it comes putting the Data Science results to the production:
Now, having the Docker engine, the next thing we must do is to get the pyspark image (if you do not have it). This can be easily done through the following command in your bash:
docker pull jupyter/pyspark-notebook
It is a bit a large file (around 4.5GB), after pulling we need to double check we have image using the command line:
(base) peyman@peyman-ZenBook-UX433FN-UX433FN:~/superpack/pyspark_docker$ sudo docker image ls
Here is the list of all images in our local machine, we can see that the jupyter/pyspark-notebook is among the images that we will utilize it:
(base) peyman@peyman-ZenBook-UX433FN-UX433FN:~/superpack/pyspark_docker$ sudo docker image ls --all
REPOSITORY TAG IMAGE ID CREATED SIZE
jupyter/pyspark-notebook latest 5019fd934efa 2 weeks ago 4.4GB
jupyter/minimal-notebook latest bd466ef7da5f 2 weeks ago 2.52GB
Now, if you have the jupyter/pyspark-notebook on your list, GREAT!.
from IPython.core.display import Image
Image('success.jpg', width=1000, height=1000)
Port local Directory to the Docker Container
Now you have a image of spark to wrangle the big data.So now since most of the time our big data is not in the same directory the docker is, we need to port the big data set to the container, so the container have direct access to the data, in my case the following code make this mounting (I will break it in the follow):
(base) peyman@peyman-ZenBook-UX433FN-UX433FN:~$ sudo docker run -p 8888:8888 -v ~/superpack/pyspark_docker:/home/jovyan jupyter/pyspark-notebook
OK, let’s break the above code to fully understand it:
(base) peyman@peyman-ZenBook-UX433FN-UX433FN:~$ sudo docker run -p 8888:8888
So this one pass traffic from port 8888 on our machine into port 8888 on the Docker image, in this case (jupyter/pyspark-notebook)
-v ~/superpack/pyspark_docker:/home/jovyan jupyter/pyspark-notebook
Here, replace “~/superpack/pyspark_docker” with your local working directory. This directory will be accessed by the container, that’s what option “-v” is doing at the code. The directory might be empty, you will need to put some files later. So if you done the above steps, now the Jupyter notebook should comes up in your browser on the exact path you will have your data. Now, if you have reached this stage, CONGRATULATION, now you are ready to work with the big data:
from IPython.core.display import Image
Image('sweet.jpeg', width=1000, height=1000)
In this work the yelp data set will be used for distributed computing with spark. The Yelp data set available at this link will be used as typical business big data:
Open Source Link for Yelp Dataset
For this particular data, I found this blog quite helpful for data modeling of the data, as could be shown in the below:
from IPython.core.display import Image
Image('yelpdatamodel.png', width=1000, height=1000)
Start Data Wrangling with Spark Session
Set up the Pyspark
import pyspark
from pyspark.sql.types import FloatType
from pyspark.sql.types import StringType
from pyspark.sql import SparkSession
spark = SparkSession \
.builder \
.appName("Big Data Wrangling with Pyspark") \
.config("spark.some.config.option", "some-value") \
.getOrCreate()
Read the Review data through the Spark
df_review = spark.read.json("yelp_academic_dataset_review.json")
Just having look on the size of the data, we have around 80 million review, indeed a big data!:
#Data description
#Checking Attributes and Rows
print('number of rows:'+ str(df_review.count()))
print('number of columns:'+ str(len(df_review.columns)))
number of rows:8021122
number of columns:9
from IPython.core.display import Image
Image('sparkeasy.png', width=1000, height=1000)
df_review.printSchema()
root
|-- business_id: string (nullable = true)
|-- cool: long (nullable = true)
|-- date: string (nullable = true)
|-- funny: long (nullable = true)
|-- review_id: string (nullable = true)
|-- stars: double (nullable = true)
|-- text: string (nullable = true)
|-- useful: long (nullable = true)
|-- user_id: string (nullable = true)
Sentiment Analysis
In the below code, I am defining the text_processing function which will remove the punctuation, make all reviews lower case and remove as well English stop words:
In this step you may need to run the following code to install the NLTK package.
#!pip install NLTK
#!pip install afinn
from sklearn.feature_extraction import stop_words
import string
from nltk.stem import WordNetLemmatizer
lemmatizer = WordNetLemmatizer()
/opt/conda/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.feature_extraction.stop_words module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.feature_extraction.text. Anything that cannot be imported from sklearn.feature_extraction.text is now part of the private API.
warnings.warn(message, FutureWarning)
from pyspark.sql.functions import udf
def text_processing(text):
# remove punctuation
text = "".join([c for c in text
if c not in string.punctuation])
# lowercase
text = "".join([c.lower() for c in text])
# remove stopwords
text = " ".join([w for w in text.split()
if w not in stop_words.ENGLISH_STOP_WORDS])
# stemming / lematizing (optional)
text = " ".join([lemmatizer.lemmatize(w) for w in text.split()])
return text
text_processing_udf = udf(text_processing, StringType())
Adding the clean_text Column
df = df_review.withColumn("clean_text", text_processing_udf(df_review['text']))
df.select(["clean_text", "text"]).show(5)
+--------------------+--------------------+
| clean_text| text|
+--------------------+--------------------+
|worked museum eag...|As someone who ha...|
|actually horrifie...|I am actually hor...|
|love deagans real...|I love Deagan's. ...|
|dismal lukewarm d...|Dismal, lukewarm,...|
|oh happy day fina...|Oh happy day, fin...|
+--------------------+--------------------+
only showing top 5 rows
OK, now we have the clean text, it is time to do the sentiment analysis to see the score of the each review
import afinn
from afinn import Afinn
afinn = Afinn()
def sentiment(text):
score_sentiment=afinn.score(text)
return score_sentiment
sentiment_processing_udf = udf(sentiment, FloatType())
df_sentiment = df.withColumn("score", sentiment_processing_udf(df['clean_text']))
df_sentiment.select(['score','clean_text']).show(5)
+-----+--------------------+
|score| clean_text|
+-----+--------------------+
| 21.0|worked museum eag...|
|-11.0|actually horrifie...|
| 13.0|love deagans real...|
| -7.0|dismal lukewarm d...|
| 26.0|oh happy day fina...|
+-----+--------------------+
only showing top 5 rows
df_sentiment.printSchema()
root
|-- business_id: string (nullable = true)
|-- cool: long (nullable = true)
|-- date: string (nullable = true)
|-- funny: long (nullable = true)
|-- review_id: string (nullable = true)
|-- stars: double (nullable = true)
|-- text: string (nullable = true)
|-- useful: long (nullable = true)
|-- user_id: string (nullable = true)
|-- clean_text: string (nullable = true)
|-- score: float (nullable = true)
Grouping Business Based on their Review Score
Here, I am grouping the mean score of the all businesses:
df_sentiment_grouped=df_sentiment.select(["business_id",'score']).groupby(['business_id']).mean()
df_sentiment_grouped.printSchema()
root
|-- business_id: string (nullable = true)
|-- avg(score): double (nullable = true)
df_sentiment_grouped.count()
209393


Container Classes
Introduction
In this package we'll define several kinds of data structures. The one thing they all have in common is that they contain data of some type, which in general is subject to a constraint. We'll capture this using a type class, Container
, with an associated type family:
For example, lists are a container with the trivial constraint.
It is very common for the same "operation" to make sense for lots of different specific data structures; things like "append a new item to the front" or "construct an instance containing only one item". Moreover, it's very common for these operations to satisfy the same properties. And so we will bundle these, where it makes sense, into lawful type classes. This brings some benefits:
- We can avoid needing to qualify function names (this is just solving a namespacing problem)
- We can write generic code against the class interface (although in practice this is really only useful for tests)
- We can leverage a property-based understanding of core functionality across multiple structures.
I should mention here that it's not obvious that this is the best way, or necessarily a good way, to structure a library like this. Some of the classes (and laws) we define will be reasonably "natural", but some will be a bit more ad hoc. And ad hoc code is bad; the best programs are the ones that write themselves. But we'll do what we can.
Subset Types
The first lawful class we define is really papering over a deficiency in Haskell's type system: it cannot reason about subset relationships among types. The Subset
class asserts that a given container type, t
, constructs a "subset" of a fixed associated container type SupersetOf t
. Right off the bat this is not optimal, because it doesn't make sense to say that a set is only a subset of one other set. For our purposes this turns out to be okay.
The more important question is: what operations and laws should "subsets" satisfy? It should be possible to inject a value from the subset type into the superset type. It should also be possible to restrict a value from the superset type to the subset type. These should also satisfy the following laws:
- Restrict/Inject Law
restrict . inject
is equivalent toJust
- Inject/Restrict Law
- If
restrict x == Just a
, thenx == inject a
These essentially state that inject
is injective as a function and that restrict
is its one-sided inverse.
class
( Container t, Container (SupersetOf t)
) => Subset t
where
type SupersetOf t = (u :: * -> *) | u -> t
inject
:: ( ElementOf t a )
=> t a -> SupersetOf t a
restrict
:: ( ElementOf t a )
=> SupersetOf t a -> Maybe (t a)
Next up: if one type is a subset of another, and both types happen to also be instances of Semigroup
, then we in fact have a Subsemigroup
if their <>
operations are compatible. That is, instances of Subsemigroup
must satisfy the following law:
- Subsemigroup Law
inject (u <> v)
is equivalent toinject u <> inject v
This law is asserting that inject
is a homomorphism.
class
( Subset t
, forall a. (ElementOf t a) => Semigroup (t a)
, forall a. (ElementOf (SupersetOf t) a) => Semigroup (SupersetOf t a)
) => Subsemigroup t
If you remember your abstract algebra, recall that some subsemigroups are especially important. A subsemigroup is called an ideal if it "absorbs" other semigroup elements under multiplication. That is, if \(S\) is a semigroup and \(I\) a subsemigroup of \(S\), then \(I\) is an ideal in \(S\) if anytime we take \(s \in S\) and \(a \in I\), we have \(sa \in I\) and \(as \in I\). To make the types work out we need new operations to express these mixed multiplications, and that's exactly what the Ideal
class is for.
To make sure the mixed multiplications are compatible with both the ideal and semigroup multiplications, instances of this class must satisfy the following laws:
- Left Injection
inject (u @> v)
is equivalent toinject u <> v
- Right Injection
inject (u <@ v)
is equivalent tou <> inject v
- Left Associativity
(u <> v) @> w
is equivalent tou <> (v @> w)
- Right Associativity
u <@ (v <> w)
is equivalent to(u <@ v) <> w
- Inner Interchange
u <@ (v @> w)
is equivalent to(u <@ v) @> w
- Outer Interchange
u <> (v <@ w)
is equivalent to(u @> v) <> w
These laws assert that the semigroup acts on the ideal, and this action is equivalent to multiplication (after injection).
class (Subsemigroup t) => Ideal t where
(@>)
:: ( ElementOf t a )
=> t a -> SupersetOf t a -> t a
(<@)
:: ( ElementOf t a )
=> SupersetOf t a -> t a -> t a
For convenience we also define mixed multiplications with outputs in the supersemigroup.
(>@>)
:: ( Ideal t, ElementOf t a )
=> t a -> SupersetOf t a -> SupersetOf t a
u >@> v = inject (u @> v)
(<@<)
:: ( Ideal t, ElementOf t a )
=> SupersetOf t a -> t a -> SupersetOf t a
u <@< v = inject (u <@ v)
We are describing operations on container types. Very often, it makes sense to have the concept of an empty container, with nothing in it. It also sometimes makes sense to have a different type of containers which cannot be empty.
The NonEmpty
class is inhabited by Subset
s which contain only nonempty containers. The functions on this class are empty
, which constructs and empty value, and isEmpty
, which detects if a given value is empty. Inhabitants of this class must satisfy the following properties:
- Empty Law
isEmpty empty
is equivalent toTrue
- Restrict Law
restrict x == Nothing
is equivalent toisEmpty x
- Inject Law
isEmpty (inject x)
is equivalent toFalse
These laws assert that empty
is empty, that values in the subset are not empty, and that all nonempty values in the superset come from values in the subset.
class (Subset t) => NonEmpty (t :: * -> *) where
empty
:: ( ElementOf t a )
=> SupersetOf t a
isEmpty
:: ( ElementOf t a )
=> SupersetOf t a -> Bool
isEmpty x = case restrict x of
Nothing -> True; Just _ -> False
Some container types have a natural notion of singleton
-- a container holding exactly one item. In general we'd like to construct and detect singleton values; the Singleton
class models this. Instances of this class should satisfy the following laws:
- Singleton
fromSingleton (singleton a)
is equivalent toJust a
- FromSingleton
fromSingleton x == Just a
is equivalent tox == singleton a
These laws assert that singleton
is injective as a function, and moreover all of the "singletons" are in its image. The helper function isSingleton
detects singletons.
class (Container t) => Singleton (t :: * -> *) where
singleton
:: ( ElementOf t a )
=> a -> t a
fromSingleton
:: ( ElementOf t a )
=> t a -> Maybe a
isSingleton
:: ( Singleton t, ElementOf t a )
=> t a -> Bool
isSingleton x = case fromSingleton x of
Nothing -> False; Just _ -> True
We have a Singleton
instance for lists:
instance Singleton [] where
singleton
:: ( Hask a )
=> a -> [a]
singleton a = [a]
fromSingleton
:: ( Hask a )
=> [a] -> Maybe a
fromSingleton xs = case xs of
[a] -> Just a
_ -> Nothing
The basic container classes (Ideal, Singleton, NonEmpty) are intended to capture very general behavior. When two or more of them interact we impose additional laws. For example, if some type is a singleton instance as well as a subset of another singleton instance, we demand that the subset function be compatible with subsets by the following properties:
- Inject/Singleton
inject (singleton a)
is equivalent tosingleton a
- Restrict/Singleton
restrict (singleton a)
is equivalent toJust (singleton a)
These are stating that injection is a singleton-homomorphism.
If a singleton instance is also a non-empty instance, we demand the following:
- Empty
isSingleton empty
is equivalent toFalse
- Singleton
isEmpty (singleton a)
is equivalent toFalse
Semigroups and Actions
If a container type is a semigroup, it may also be the case that the element type acts on this semigroup. This isn't quite a semigroup action in the usual sense; instead of a semigroup acting on a set, we have a set acting on a semigroup. Actions come in two flavors, left and right, which we call Cons
and Snoc
after the traditional name for these operations on lists.
Instances of the Cons
class must satisfy the following laws:
- Product/Cons
cons a (x <> y)
is equivalent to(cons a x) <> y
- Uncons/Cons
uncons (cons a x)
is equivalent toJust (a, x)
- Inverse/Cons
uncons w == Just (a, x)
is equivalent tocons a x == w
These essentially require that uncurry cons
be injective with one-sided inverse uncons
. readFirst
is a safe version of the standard Haskell function head
on lists.
class
( Container t
, forall a. (ElementOf t a) => Semigroup (t a)
) => Cons (t :: * -> *)
where
cons
:: ( ElementOf t a )
=> a -> t a -> t a
uncons
:: ( ElementOf t a )
=> t a -> Maybe (a, t a)
readFirst
:: ( Cons t, ElementOf t a )
=> t a -> Maybe a
readFirst = fmap fst . uncons
Of course we have a Cons
instance for lists:
instance Cons [] where
cons
:: ( Hask a )
=> a -> [a] -> [a]
cons a as = a:as
uncons
:: ( Hask a )
=> [a] -> Maybe (a, [a])
uncons x = case x of
[] -> Nothing
a:as -> Just (a, as)
If a type inhabits both Cons
and Singleton
, we require the following additional law:
- Singleton/Cons
cons a x
is equivalent to(singleton a) <> x
If a type inhabits both Cons
and Subset
, we require the following additional laws:
- Inject/Cons
inject (cons a x)
is equivalent tocons a (inject x)
- Restrict/Cons
restrict (cons a (inject x))
is equivalent toJust (cons a x)
If a type inhabits Cons
, Subset
, and NonEmpty
, we have an additional primitive, unconsNonEmpty
. This behaves similarly to uncons
, but is guaranteed to succeed (although the remainder structure may be empty). We also demand some additional laws:
- Inject/UnconsNonEmpty
- if
(a, as) = unconsNonEmpty x
theninject x
is equivalent tocons a as
- Restrict/UnconsNonEmpty
fmap unconsNonEmpty (restrict (cons a x))
is equivalent toJust (a, x)
- Empty/Uncons
isEmpty x
is equivalent toNothing == uncons x
- Inject/Uncons
- if
uncons w == Just (a, x)
thenunconsNonEmpty w == (a, inject x)
class
( Cons t, NonEmpty t, Subset t, Cons (SupersetOf t)
) => UnconsNonEmpty (t :: * -> *)
where
unconsNonEmpty
:: ( ElementOf t a )
=> t a -> (a, SupersetOf t a)
readFirstNonEmpty
:: ( UnconsNonEmpty t, ElementOf t a )
=> t a -> a
readFirstNonEmpty = fst . unconsNonEmpty
Dual to Cons
is the Snoc
class, with the following laws:
- Product/Snoc
snoc a (x <> y)
is equivalent tox <> (snoc a y)
- Uncons/Snoc
unsnoc (snoc a x)
is equivalent toJust (a, x)
- Inverse/Snoc
unsnoc w == Just (a, x)
is equivalent tosnoc a x == w
class
( Container t
, forall a. (ElementOf t a) => Semigroup (t a)
) => Snoc (t :: * -> *)
where
snoc
:: ( ElementOf t a )
=> a -> t a -> t a
unsnoc
:: ( ElementOf t a )
=> t a -> Maybe (a, t a)
readLast
:: ( Snoc t, ElementOf t a )
=> t a -> Maybe a
readLast = fmap fst . unsnoc
If a type inhabits both Snoc
and Singleton
we have an additional law:
- Singleton/Snoc
snoc a x
is equivalent tox <> (singleton a)
If a type inhabits both Snoc
and Subset
, we require the following additional laws:
- Inject/Snoc
inject (snoc a x)
is equivalent tosnoc a (inject x)
- Restrict/Snoc
restrict (snoc a (inject x))
is equivalent toJust (snoc a x)
If a type inhabits Snoc
, Subset
, and NonEmpty
, we have an additional primitive, unsnocNonEmpty
, analogous to unconsNonEmpty
. We require the following laws:
- Inject/UnsnocNonEmpty
- if
(a, as) = unsnocNonEmpty x
theninject x
is equivalent tosnoc a as
- Restrict/UnsnocNonEmpty
fmap unsnocNonEmpty (restrict (snoc a x))
is equivalent toJust (a, x)
- Empty/Unsnoc
isEmpty x
is equivalent toNothing == unsnoc x
- Inject/Unsnoc
- if
unsnoc w == Just (a, x)
thenunsnocNonEmpty w == (a, inject x)
class
( Snoc t, NonEmpty t, Subset t, Snoc (SupersetOf t)
) => UnsnocNonEmpty (t :: * -> *)
where
unsnocNonEmpty
:: ( ElementOf t a )
=> t a -> (a, SupersetOf t a)
readLastNonEmpty
:: ( UnsnocNonEmpty t, ElementOf t a )
=> t a -> a
readLastNonEmpty = fst . unsnocNonEmpty
And if a type inhabits both Cons
and Snoc
, we require them to interact nicely:
- Cons/Snoc
cons u (snoc v x)
is equivalent tosnoc v (cons u x)
List-like Containers
Roughly speaking, a container is list-like if it arranges a set of values in a specific order. For such structures it makes sense to reverse the order, and this operation should be an involution:
- Reverse Involution
reverse . reverse
is equivalent toid
If our type also constructs semigroups, reverse
should be an antihomomorphism:
- Reverse Antihomomorphism
reverse (x <> y)
is equivalent toreverse y <> reverse x
And if our type constructs monoids, reverse
should fix the identity.
- Reverse Identity
reverse mempty
is equivalent tomempty
If our type inhabits both Reverse
and Subset
, it should commute with inject
and restrict
.
- Reverse/Inject
reverse (inject x)
is equivalent toinject (reverse x)
- Reverse/Restrict
restrict (reverse x)
is equivalent tofmap reverse (restrict x)
Reversal should fix singletons:
- Reverse/Singleton
reverse (singleton a)
is equivalent tosingleton a
And if our type also inhabits Cons
and Snoc
, reversal should convert between them.
- Reverse/Cons
reverse (cons a x)
is equivalent tosnoc a (reverse x)
- Reverse/Snoc
reverse (snoc a x)
is equivalent tocons a (reverse x)
class
( Container t, Foldable t
, forall a. (ElementOf t a) => Semigroup (t a)
) => FromList t
where
fromList :: (ElementOf t a) => [a] -> t a
arbFromList
:: ( FromList t, ElementOf t a, Arb a )
=> Sample (t a)
arbFromList = genFromList arb
genFromList
:: ( FromList t, ElementOf t a )
=> Sample a -> Sample (t a)
genFromList gen = do
NonNegative (k :: Int) <- arb
fmap fromList $ join $ vectOf <$> pure k <*> pure gen
class (NonEmpty (Zipped t)) => Zipper (t :: * -> *) where
type Zipped t = (u :: * -> *) | u -> t
toZipper
:: ( ElementOf t a )
=> Zipped t a -> t a
fromZipper
:: ( ElementOf t a )
=> t a -> Zipped t a
class (Container t) => LinearZipper t where
readPointer
:: ( ElementOf t a )
=> t a -> Maybe a
alterPointer
:: ( ElementOf t a )
=> (a -> a) -> t a -> t a
alterPointerM
:: ( ElementOf t a, Monad m )
=> (a -> m a) -> t a -> m (t a)
isAtStart
:: ( ElementOf t a )
=> t a -> Bool
isAtEnd
:: ( ElementOf t a )
=> t a -> Bool
moveTowardStart
:: ( ElementOf t a )
=> t a -> t a
moveTowardEnd
:: ( ElementOf t a )
=> t a -> t a
moveToStart
:: ( ElementOf t a )
=> t a -> t a
moveToEnd
:: ( ElementOf t a )
=> t a -> t a


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object util.FileDrop.TransferableObject
public static class FileDrop.TransferableObject
At last an easy way to encapsulate your custom objects for dragging and dropping
in your Java programs!
When you need to create a Transferable
object,
use this class to wrap your object.
For example:
...
MyCoolClass myObj = new MyCoolClass();
Transferable xfer = new TransferableObject( myObj );
...
Or if you need to know when the data was actually dropped, like when you're
moving data out of a list, say, you can use the FileDrop.TransferableObject.Fetcher
inner class to return your object Just in Time.
For example:
...
final MyCoolClass myObj = new MyCoolClass();
TransferableObject.Fetcher fetcher = new TransferableObject.Fetcher()
{ public Object getObject(){ return myObj; }
}; // end fetcher
Transferable xfer = new TransferableObject( fetcher );
...
The DataFlavor
associated with
FileDrop.TransferableObject
has the representation class
net.iharder.dnd.TransferableObject.class and MIME type
application/x-net.iharder.dnd.TransferableObject.
This data flavor is accessible via the static
DATA_FLAVOR
property.
I'm releasing this code into the Public Domain. Enjoy.
| Nested Class Summary | |
|---|---|
static interface |
FileDrop.TransferableObject.Fetcher
Instead of passing your data directly to the FileDrop.TransferableObject
constructor, you may want to know exactly when your data was received
in case you need to remove it from its source (or do anyting else to it). |
| Field Summary | |
|---|---|
static java.awt.datatransfer.DataFlavor |
DATA_FLAVOR
The default DataFlavor for
FileDrop.TransferableObject has the representation class
net.iharder.dnd.TransferableObject.class
and the MIME type
application/x-net.iharder.dnd.TransferableObject. |
static java.lang.String |
MIME_TYPE
The MIME type for DATA_FLAVOR is
application/x-net.iharder.dnd.TransferableObject. |
| Constructor Summary | |
|---|---|
FileDrop.TransferableObject(java.lang.Class<?> dataClass,
FileDrop.TransferableObject.Fetcher fetcher)
Creates a new FileDrop.TransferableObject that will return the
object that is returned by fetcher. |
|
FileDrop.TransferableObject(FileDrop.TransferableObject.Fetcher fetcher)
Creates a new FileDrop.TransferableObject that will return the
object that is returned by fetcher. |
|
FileDrop.TransferableObject(java.lang.Object data)
Creates a new FileDrop.TransferableObject that wraps data. |
| Method Summary | |
|---|---|
java.awt.datatransfer.DataFlavor |
getCustomDataFlavor()
Returns the custom DataFlavor associated
with the encapsulated object or null if the FileDrop.TransferableObject.Fetcher
constructor was used without passing a Class . |
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavor)
Returns the data encapsulated in this FileDrop.TransferableObject . |
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors()
Returns a two- or three-element array containing first the custom data flavor, if one was created in the constructors, second the default DATA_FLAVOR associated with
FileDrop.TransferableObject , and third the
java.awt.datatransfer.DataFlavor.stringFlavor . |
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
Returns true if flavor is one of the supported flavors. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MIME_TYPE
DATA_FLAVOR
is
application/x-net.iharder.dnd.TransferableObject.
public static final java.awt.datatransfer.DataFlavor DATA_FLAVOR
DataFlavor
for
FileDrop.TransferableObject
has the representation class
net.iharder.dnd.TransferableObject.class
and the MIME type
application/x-net.iharder.dnd.TransferableObject.
| Constructor Detail |
|---|
public FileDrop.TransferableObject(java.lang.Object data)
FileDrop.TransferableObject
that wraps data.
Along with the DATA_FLAVOR
associated with this class,
this creates a custom data flavor with a representation class
determined from data.getClass()
and the MIME type
application/x-net.iharder.dnd.TransferableObject.
data
- The data to transferpublic FileDrop.TransferableObject(FileDrop.TransferableObject.Fetcher fetcher)
FileDrop.TransferableObject
that will return the
object that is returned by fetcher.
No custom data flavor is set other than the default
DATA_FLAVOR
.
fetcher
- The FileDrop.TransferableObject.Fetcher
that will return the data objectFileDrop.TransferableObject.Fetcher
public FileDrop.TransferableObject(java.lang.Class<?> dataClass, FileDrop.TransferableObject.Fetcher fetcher)
FileDrop.TransferableObject
that will return the
object that is returned by fetcher.
Along with the DATA_FLAVOR
associated with this class,
this creates a custom data flavor with a representation class dataClass
and the MIME type
application/x-net.iharder.dnd.TransferableObject.
dataClass
- The Class
to use in the custom data flavorfetcher
- The FileDrop.TransferableObject.Fetcher
that will return the data objectFileDrop.TransferableObject.Fetcher
| Method Detail |
|---|
public java.awt.datatransfer.DataFlavor getCustomDataFlavor()
DataFlavor
associated
with the encapsulated object or null if the FileDrop.TransferableObject.Fetcher
constructor was used without passing a Class
.
public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
DATA_FLAVOR
associated with
FileDrop.TransferableObject
, and third the
java.awt.datatransfer.DataFlavor.stringFlavor
.
getTransferDataFlavors
in interface java.awt.datatransfer.Transferable
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException
FileDrop.TransferableObject
.
If the FileDrop.TransferableObject.Fetcher
constructor was used, then this is when
the getObject()
method will be called.
If the requested data flavor is not supported, then the
getObject()
method will not be called.
getTransferData
in interface java.awt.datatransfer.Transferable
flavor
- The data flavor for the data to return
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
equals(...)
method.
isDataFlavorSupported
in interface java.awt.datatransfer.Transferable
flavor
- The data flavor to check
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Preparation time
less than 30 mins
Cooking time
over 2 hours
Serves
Serves 4
Heat the oil in a heavy-based casserole over a high heat. When the oil is just smoking, add the garlic bulb halves, cut-sides down, and the onions, and fry for 2-3 minutes, or until the onions are crisp and golden-brown.
Add the octopus pieces and stir fry for 30 seconds, then reduce the heat to its lowest setting. Squeeze over the lemon juice and sprinkle over the bay leaves, thyme and peppercorns, then cover the pan with a lid and continue to cook for a further two minutes, or until the octopus pieces have released their purple-pink juices.
Continue to simmer the mixture over a low heat for 1 hour and 45 minutes to 2 hours, or until the octopus is tender and offers no resistance when pierced with the point of a knife.
When the octopus has stewed and is tender, add the peas and continue to cook, uncovered, for 8-10 minutes, or until the volume of cooking juices has reduced and the peas are tender. Season, to taste, with salt and freshly ground black pepper.
Whisk in the cold butter (or olive oil) until well combined, then sprinkle over the chopped wild fennel fronds, if using. Serve immediately.


Address: S. 5th Avenue & S. 2nd Street
Year Built: 1877
Builder: William Brackett
Architect:
Owner: Cornell College
Use: guest house
Physical Description:
Style-Colonial Revival, after the remodeling in 1914-1919
Construction Type-Rectangular plan with 2 large two-story rectangular porches at each end, Two-story, wood frame
Features:
¨ Symmetrical about all facades
¨ Gable roof
¨ Horizontal clapboard siding with large full height (Two-story) relief wood pilasters between porches and main portion of house and at outside corners
¨ Small capital
¨ Casement windows (French doors) with four-paned transom above
¨ Opening onto wrought iron balconies
¨ Symmetrical windows
¨ 2 casements above main entry
¨ Main entrance has classical porch
¨ Architrave, frieze, denticulated cornice, and large round columns
¨ Door is flaked by multipainted sidelites with transom above
¨ Wrought iron balconies ornate with boat shape pattern
¨ Porches with combination (alum) windows
¨ Clapboard siding between pilasters except 2nd story of long dimension which an ornate rail with vertical balusters and diamond pattern infill in three locations
¨ Door is in the center of each porch
¨ Ornament-lattice work encloses space under porches (has now been filled in and sided)
¨ Large brick chimney on south
¨ Steps out towards top
¨ Diamond infill has been filled in and sided
¨ New louvered windows have been added to all porches except for the west porch on the 1st floor
History/Comments:
The widow of the builder, Clara, stayed in the house. She married Armstrong Spear, a Philadelphia banker who commuted from Philadelphia to Mt. Vernon. The 1914-1919 remodeling "updated" a fairly traditional 19th century house form to conform with the ten-popular Colonial Revival style.
Sources:
B.R.F.
Collegian. October 1877.


For the 1st round, contestants will have 10 minutes to pitch and 15 minutes for Q&A from the judges. Questions can cover any variety of topics, including modeling assumptions, current events, and industry trends.
For the final round, contestants will have 15 minutes to pitch and 15 minutes for Q&A.
| Time | Event | Location |
|---|---|---|
| 9:00am-9:45am | Check-in | Anderson Auditorium |
| 9:45am-10:00am | Opening Remarks | Anderson Auditorium |
| 10:00am-11:00am | Keynote Speaker | Anderson Auditorium |
| 11:00am-12:00pm | Speaker Panel | Anderson Auditorium |
| 12:00pm-12:45pm | Networking Lunch | Wells Fargo Auditorium |
| 12:45pm-1:45pm | Teach-In | Anderson Auditorium |
| 2:15pm-5:00pm | First Round Pitches | Anderson Auditorium |
| 5:00pm | Closing Remarks | Anderson Auditorium |
| Time | Event | Location |
|---|---|---|
| 9:00am-9:30am | Sign-in and Networking | Anderson Auditorium |
| 9:30am-9:45am | Opening Remarks | Anderson Auditorium |
| 9:45am-12:30pmm | Final Pitches | Anderson Auditorium |
| 1:00pm-1:30pm | Awards Ceremony | Anderson Auditorium |
| Event | Time |
|---|---|
| Check-in, Pictures, Sponsor Tabling | 9:30am-11:00am |
| Welcome Ceremony | 11:00am-11:30am |
| Opening Keynote Speaker + Q&A | 11:30am-12:30pm |
| Lunch & Social | 12:30pm-2pm |
| Event | Time |
|---|---|
| Check-in | 8:30am-9am |
| Investment Panel | 9am-9:30am |
| Panel Q&A | 9:30am-9:50am |
| Competitor Pod and Location Assignments | 9:50am-10am |
| First Round Pitches (Locations TBA) | 10:30am-1:30pm |
| Final Pitches | 2pm-4pm |
| Closing Ceremony & Awards | 4:20pm-5pm |


IDL source Global indexinterface ICapeNumericFlowsheet : ICapeUtilityParameter
This is the basic Interface of the Flowsheet model. Would allow to develop a more complex Flowsheet model.
It is an "abstract" Interface. It is not distributed. Consequently, no client can obtain its object reference.
Destroys the interface.
The behaviour of this method is implementation dependent.
Pre Conditions: None.
Post Conditions: None.
Gets the maximum number of streams that the flowsheet can have.
Pre Conditions: None.
Post Conditions: None.
Gets the maximum number of units that the flowsheet can have.
Pre Conditions: None.
Post Conditions: None.
Gets the name of the interface.
Pre Conditions: None.
Post Conditions: None.
Gets the number of streams defining the flowsheet.
Pre Conditions: None.
Post Conditions: None.
Gets the number of units defining the flowsheet.
Pre Conditions: None.
Post Conditions: None.
CapeBoolean Destroy() raises(CapeNO_IMPLEMENT, CapeUNKNOWN);
Destroys the interface.
The behaviour of this method is implementation dependent.
Pre Conditions: None.
Post Conditions: None.
CapeLong GetMaximumStreamCount() raises(CapeUNKNOWN);
Gets the maximum number of streams that the flowsheet can have.
Pre Conditions: None.
Post Conditions: None.
CapeLong GetMaximumUnitCount() raises(CapeUNKNOWN);
Gets the maximum number of units that the flowsheet can have.
Pre Conditions: None.
Post Conditions: None.
CapeString GetName() raises(CapeUNKNOWN);
Gets the name of the interface.
Pre Conditions: None.
Post Conditions: None.
CapeLong GetStreamCount() raises(CapeUNKNOWN);
Gets the number of streams defining the flowsheet.
Pre Conditions: None.
Post Conditions: None.
CapeLong GetUnitCount() raises(CapeUNKNOWN);
Gets the number of units defining the flowsheet.
Pre Conditions: None.
Post Conditions: None.


Sam Kamin
Democrat
Law Professor, University of Denver
I received my BA, summa cum laude, in Physics from Amherst College in 1992. I also hold a JD, Order of the Coif, and a Ph.D. in Jurisprudence and Social Policy from the University of California, Berkeley.
80218
I am a lifelong Democrat. In 2016, I served as an election observer for the Democratic Party during the general election as well as working the party's voter information hotline in the weeks prior to the election. My wife and I have also hosted various fundraisers for candidates for national, state, and local office. According to the FEC website I contributed $550 in two gifts to Warren for President in the 2020 primary cycle and other gifts to ActBlue totaling $375 since 2015.
o Chair, American Bar Association Criminal Justice Standards Committee (Effective 2021) o Chair, American Bar Association Task Force on Marijuana Enforcement (2018-present) o Member, Denver City Council Social Consumption Area Task Force (2018-present) o Member, City of Denver Social Consumption Advisory Committee (2017-2018) o Member, ABA Criminal Justice Standards Committee (2012-present) o Member, Legal Panel of the ACLU of Colorado (2004-2018) (for a complete list please see attached curriculum vitae)
I have been a member of the ACLU of Colorado since moving to Colorado in 1999. I have served both on its board of directors and legal panel, helping the organization choose which cases to take on. I have also worked to abolish the death penalty in the state, testifying a number of times before both chambers of the legislature, most recently in support of the successful 2020 repeal bill. I have written or co-written amicus briefs in a number of cases before both state and federal courts.
No issue is more important today that restoring America's faith in its electoral system. Non-partisan redistricting commissions such as this one play an important role in that process. Colorado is a model of openness and inclusivity in its electoral processes and I would like to be a part of that ongoing endeavor.
I have been appointed to a number of boards and commissions over the last decade and have had to develop consensus -- both as a member and as chair -- on controversial issues of public policy. I have worked to forge agreements between prosecutors and defense attorneys on the ABA Criminal Justice Standards Committee and between opponents and advocates of marijuana legalization on state and local regulatory boards. I have seen first-hand that a willingness to consider others' views in good faith is crucial to reaching lasting agreement. I would bring that open-minded approach to the Commission's difficult work.
I have an empirical, quantitative background, having majored in physics as an undergraduate and done statistical research both as a graduate student and a professor. While I am not an election law expert, I am a constitutional law scholar and able to grasp and help others understand the complicated legal rules that govern Congressional apportionment. I am also an educator, with more than two decades of experience helping students master new and difficult legal concepts.
Male


|
Valkyrie Engine Common
|
| Cvlk::ConstexprWrapper< T > | |
| ▼Cstd::false_type | |
| Cvlk::IsSpecialization< T, Primary > | |
| Cvlk::Matrix3 | Column-major 3x3 matrix. Used to store and apply transformations in 2d space |
| Cvlk::Matrix4 | Stub for 4x4 matrix class |
| Cvlk::Quaternion | |
| Cvlk::Transform2D | |
| ▼Cstd::true_type | |
| Cvlk::IsSpecialization< Primary< Args... >, Primary > | |
| Cvlk::Vector2 | 2-dimensional vector class |
| Cvlk::Vector3 | |
| Cvlk::Vector4 | |
| Cvlk::VectorBase< N, Val > | |
| Cvlk::VectorBase< 2, Float > | |
| Cvlk::VectorBase< 3, Float > | |
| Cvlk::VectorBase< 4, Float > |


Oracle Berkeley DB Java Edition 12c R2
Release Notes
Release 7.5.11, 2017-10-31 09:36:36 UTC
Berkeley DB Java Edition (JE) is a 100% pure Java embedded, transactional data
store. It supplies a key/object data model with indexing, full transactional
ACID support, POJO APIs and High Availability/Replication.
As of version 7.3, JE is licensed under the Apache 2.0 license. See the LICENSE
file for the complete license.
Note that in JE 7.0 and later, the Java compatibility requirement for JE is
Java SE 8.
JE is compatible with Java SE 8 (64-bit) and later, and has been tested and
certified against Oracle JDK 1.8.0_121 and IBM J9 7.0. We encourage you to
upgrade to the latest Java releases to take advantage of the latest bug fixes
and performance improvements.
Be sure to see the change log for information
about upgrading from earlier releases.
This release contains a number of changes, including:
-
MAX_DISK and FREE_DISK configuration parameters have been added for
limiting disk usage, and read operations are now allowed when these
thresholds are exceeded. Previously no thresholds were used, and the
Environment was invalidated and closed when the volume was filled.
Allowing read operations now provides partial availability even when
writes are no longer possible. New statistics for disk usage
monitoring have also been added. [#25220]
-
NOTE: Behavior has changed regarding the retention of data
files reserved for replication, and specifying the new
MAX_DISK parameter is strongly recommended for HA
applications. Use of the new disk monitoring statistics,
rather than monitoring of raw disk utilization, is especially
important for HA applications due of the presence of reserved
data files.
-
The data verifier has been enhanced to perform Btree verification in
order to detect internal corruption, included secondary index
corruption. Btree verification is performed by the background data
verifier, the DbVerify utility, the DbVerify.verify method, the
Database.verify method and the Environment.verify method. [#25960]
-
Several important bug fixes are included.
For the complete and detailed list of changes, see
the change log page.
Copyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.


Code Coverage |
|||||||||
Lines |
Functions and Methods |
Classes and Traits |
|||||||
| Total | |
68.35% |
54 / 79 |
|
75.51% |
37 / 49 |
|
0.00% |
0 / 6 |
| AccessToken.php | n/a |
0 / 0 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|||
| AuthCode.php | n/a |
0 / 0 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|||
| Cart.php | |
86.67% |
13 / 15 |
|
90.00% |
9 / 10 |
|
0.00% |
0 / 1 |
| Client.php | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
| CurrencyZone.php | |
83.33% |
10 / 12 |
|
87.50% |
7 / 8 |
|
0.00% |
0 / 1 |
| Group.php | n/a |
0 / 0 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|||
| Price.php | |
81.82% |
18 / 22 |
|
84.62% |
11 / 13 |
|
0.00% |
0 / 1 |
| Product.php | |
64.71% |
11 / 17 |
|
72.73% |
8 / 11 |
|
0.00% |
0 / 1 |
| RefreshToken.php | n/a |
0 / 0 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|||
| User.php | |
22.22% |
2 / 9 |
|
40.00% |
2 / 5 |
|
0.00% |
0 / 1 |


How to create a new webpage on the production server?
- In your repository folder, create a file called index.html . Type gedit index.html to create a file.
- Type the basic code of html. This will be a structure/base to your website. Save your edit.
- Create another file called main.css . Save.
- Copy this text: link rel="stylesheet" href="main.css" type="text/css" .Paste it in your index.html file.
- Type in index.html if you wanted text to appear on your webpage. Decorate in main.css. Save both your changes.
- When you finished, type sftp username@cmis-hsteacher .
- Hit yes, then type in your password.
- Type " cd public_html ", then type " put index.html ", repeat this step with main.css file.
- Type " exit "
- Type " git add index.html " Enter.
- Type " git commit -m "descrpition" " Enter.
- Type " git push " Enter.
- Type in your username then your password. This will save your file in github.
- Add your main.css file into github as well.