rtweetclean is a R package built to act as a processor of data generated by the existing rtweet package that can produce clean data frames, summarize data, and generate new features.
Our package aims to add additional resources for users of the already existing rtweet package. rtweet is a package built around Twitter’s API and is used to scrape tweet information from their servers. Our package creates functionality which enables users to process the raw data from rtweet into a more understandable format by extracting and organizing the contents of tweets for a user. rtweet is specifically built to be used in analysis of a specific user’s timeline (generated using tweepy’s api.user_timeline function). Users can easily visualize average engagement based on time of day posted, see basic summary statistics of word contents and sentiment analysis of tweets and have a processed dataset that can be used in a wide variety of machine learning models.
You can install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("UBC-MDS/rtweetclean")
clean_df(raw_tweets_df, handle = "", text_only = TRUE, word_count = TRUE, emojis = TRUE, hashtags = TRUE, sentiment = TRUE, flesch_readability = TRUE, proportion_of_avg_retweets = TRUE, proportion_of_avg_favorites = TRUE)
: Cleans up and creates new feature columns to the dataframe obtained by using the tweepy package, including: a link/hashtag/emoji free version of the text column, a wordcount, a sentimentality score, a flesch readability score, a user entered handle, a column containing all emojis used, and a column containing all hashtags used.
tweet_words(clean_tweets_df)
: Generates a list of the most frequently used words by the twitter user. Uses the dataframe created by the clean_df()
function as an input.
sentiment_total(clean_tweets_df)
: Returns a summary count of the number of words that are associated with a list of emotions/sentiments. Uses the text_only
column of the dataframe created by the clean_df()
function as an input.
engagement_by_hour(clean_tweets_df)
: Plots a line chart showing popular times of the day to tweet for the user, by displaying average engagement (favorites + retweets) received by hour of day. Uses the dataframe created by the clean_df()
function as an input.
| R Package |
|---|
| magrittr >= 2.0.1 |
| dplyr >= 1.0.4 |
| lubridate >= 1.7.10 |
| ggplot2 >= 3.3.3 |
| tidyr >= 1.1.3 |
| tidytext >= 0.3.0 |
| rtweet >= 0.7.0 |
| stringr >= 1.4.0 |
| knitr >= 1.31 |
| testthat >= 3.0.2 |
| rmarkdown >= 2.7 |
Vignette for this package can be found here
Below function calls are based on below example dataframe:
library(rtweetclean)
created_at = c("2021-03-06 16:03:31",
"2021-03-05 21:57:47",
'2021-03-05 05:50:50',
'2021-03-05 7:32:33')
text <- c("example tweet text 1 @user2 @user",
"#example #tweet 2 ",
"example tweet 3 https://t.co/G4ziCaPond",
"example tweet 4")
retweet_count <- c(43, 12, 24, 29)
favorite_count <- c(85, 41, 65, 54)
timeline_rtweet_toy <- data.frame(text, retweet_count, favorite_count, created_at)
timeline_rtweet_toy
## text retweet_count favorite_count
## 1 example tweet text 1 @user2 @user 43 85
## 2 #example #tweet 2 12 41
## 3 example tweet 3 https://t.co/G4ziCaPond 24 65
## 4 example tweet 4 29 54
## created_at
## 1 2021-03-06 16:03:31
## 2 2021-03-05 21:57:47
## 3 2021-03-05 05:50:50
## 4 2021-03-05 7:32:33
Function calls in action:
cleaned_timeline <- clean_df(timeline_rtweet_toy)
cleaned_timeline
## text retweet_count favorite_count
## 1 example tweet text 1 @user2 @user 43 85
## 2 #example #tweet 2 12 41
## 3 example tweet 3 https://t.co/G4ziCaPond 24 65
## 4 example tweet 4 29 54
## created_at text_only word_count emojis prptn_rts_vs_avg
## 1 2021-03-06 16:03:31 example tweet text 1 4 1.5925926
## 2 2021-03-05 21:57:47 2 1 0.4444444
## 3 2021-03-05 05:50:50 example tweet 3 3 0.8888889
## 4 2021-03-05 7:32:33 example tweet 4 3 1.0740741
## prptn_favorites_vs_avg
## 1 1.3877551
## 2 0.6693878
## 3 1.0612245
## 4 0.8816327
tweet_words(cleaned_timeline, top_n=3)
## words count
## 1 tweet 3
## 2 example 3
## 3 text 1
sentiment_total(cleaned_timeline, drop_sentiment = FALSE)
## # A tibble: 10 x 3
## sentiment word_count total_words
## <chr> <dbl> <int>
## 1 anger 0 11
## 2 anticipation 0 11
## 3 disgust 0 11
## 4 fear 0 11
## 5 joy 0 11
## 6 negative 0 11
## 7 positive 0 11
## 8 sadness 0 11
## 9 surprise 0 11
## 10 trust 0 11
engagement_by_hour(cleaned_timeline)
rtweetclean provides additional functionality to the existing rtweet package by generating commonly desired data features relevant with twitter API data. This is combined with streamlined summary statistics methods that can quickly and effortlessly produce figures and tables of various different factors in your rtweet data. This allows users to easily understand and analyze information about a twitter user’s timeline. Specifically, examining an accounts engagement, most common words, and emotional sentiment can each be done with the various functions in the package.
Documentation for this package can be found here
We welcome and recognize all contributions. Please see contributing guidelines in the Contributing document. This repository is currently maintained by nashmakh, calsvein, MattTPin, syadk.


D3 animated pie chart
Lots of people in the data viz community hate pie charts. Gussied up pie charts – exploded, 3D charts that needlessly complicate presentations – are considered especially heinous. Still, I'll do you one better.
This is an animated, D3 pie chart that displays several categories of information about a group of students. Rather than make five separate, static charts, which would present the same information in considerably less time, this one packs it into one and does a song and dance, too.
Unfortunately, the chart is not optimized for mobile, so I hope you're on a desktop browser right now. Also, grouping colors to indicate subcategories would be an improvement. For example, majors could be grouped by hue into humanities, sciences, etc.


Stepping down from SciRate maintainership
Background
I can’t remember when I first stumbled across SciRate.
I’d had a fascination with scientific papers for many years, well before actually attending university (as a mature-age student) and starting to learn more formally. I would store them in a variety of ways, print them out and hang them up in my house; send them to myself on a mailing list that I created just for that purpose, or a public subreddit where I would post the papers I wanted to read, so I wouldn’t forget about them. Evidently, the “bookmarking” feature in the browser wasn’t one I found particularly useful.
Eventually, I discovered JabRef, which I used for several years. I stored all the papers that I was interested in (at the time, quantum computing), and learned all about bibliography management. I even stored all the PDFs, and the metadata from the JabRef system, in git, horribly offending bitbuckets storage limits by having a repository ~10GB in size (I think it doesn’t clone successfully anymore; it’s been several years since I tried.)
After some time I became tired with JabRef, and built my own (very very terrible) reference management program: super-reference.
Eventually, I discovered SciRate. I think the version I found was called “SciRate 2”. It was in the hands of Bill Rosgen. I got incredibly excited and signed up immediately. Because the code was open-source (I actually can’t remember, but I think it might’ve been a personally-hosted git repository somewhere), I added possibly one of my first “impactful” changes: MathJax support! This was neat; now we could see rendered math while reading abstracts and titles! I think arXiv.org only added this feature a few years ago.
But, aside from this very minor hacking on the code, I immediately started finding SciRate actually useful! I could browse it every day; see which papers would pop up, and track papers I was interested in. Fairly quickly, it became a very addictive habit for me. I began to learn the time of day that it would update, and made sure I would scour the website shortly after to browse the “freshest” papers.
 I read many papers (but not every one that I would “scite”); made several nice connections, and even used my personal SciRate data to teach my first deep learning workshops. SciRate stuck with me as my interests varied from quantum computing, theoretical physics, black holes, philosophy, AI, deep learning, computer vision, generative art, category theory, astrophysics, and the stranger maths papers. For a while my favourite thing was discovering the “best paper title” of the week.
The most memorable moment was when, many years later (after the scirate3 re-write), I met people who “knew” me from SciRate, only because they had seen that I would “scite” a lot of papers (in fact, someone told me that they didn’t think I was a real person; only a scite-making bot.) To date, I’ve amassed more than one hundred thousand “scites”. And yes, most of this was done by clicking manually; but in the last year or two I’ve used a custom program I wrote: the scirate-cli.
In any case, by a very strange coincidence, during my Masters program I happened to learn that SciRate was undergoing a re-write, amazingly by a company based in Melbourne (where I lived); just down the road from my university! I happened to have a conversation with the founder of that company, Ben Toner, relating to my masters project, but it was a curious connection.
That re-write ended up going, in my view, quite well. But I think, at some point, it stopped being funded, and fell on the shoulders of mispy. Mispy funded SciRate for a while, out of their own pocket, until I decided to take it over from them.
That was, now, 5 years ago.
All I’ve really been doing in the mean time is keeping things afloat. Upgrading the various packages as is required; managing the server, and the occasional bugfixes.
The only interesting thing I did, in recent times, was to add a “jobs” feature to SciRate. This was actually moderately successful, but in the end it was more effort for me to maintain than it was worth, so I disabled it.
Current
SciRate needs a new maintainer. I’ve decided that, personally, my focus has to shift elsewhere. You can read about that in the Addendum below.
Here’s what you’ll need to do:
- Take ownership of the scirate repository,
- Update the codebase occasionally, maintain deployments, fix the occasional bug,
- Manage the error emails that come in,
- Restart the server when it dies,
- ???
- Extend it in interesting ways!
The last one is actually quite important! SciRate has lacked any real new features for a very long time; but there’s certainly some interesting things that could be done! Notable among them could be:
The world is (somewhat) your oyster. Clearly there are some rules on how we’d like SciRate to develop; after all, there is a solid and growing user base, who have some expectation on how it will operate.
In any case, if you’re interested in getting involved, reach out to Aram and myself by sending us an email:
We’d love to hear from you.
Addendum
The central reason I’ve decided to stop spending time on SciRate is because of the climate emergency. I’ve been reading a lot of books and it’s become increasingly important to me to spend my energy learning more and doing more (or less!) in this space. If you’re interested in this too, then please reach out; I’d love to chat!


| Solar System | |
|---|---|
| Mercury |
Mars is the fourth planet from the Sun and the second-smallest planet with a thin atmosphere, having the surface features reminiscent both of the impact craters of the Moon, and the valleys, deserts and polar ice caps of Earth. It is the most widely searched planet for life. Mars has the tallest volcano/mountain in the entire Solar System, named Olympus Mons at a height of 13 miles / 21 kilometers and also the biggest canyon Valles Marines. |
| Venus | |
| Earth | |
| Mars | |
| Jupiter | |
| Saturn | |
| Uranus | |
| Neptune | |
| Pluto |


public abstract class AttachmentPart
extends java.lang.Object
SOAPMessage
object. A SOAPMessage
object may contain zero, one, or many AttachmentPart
objects.
Each AttachmentPart
object consists of two parts,
application-specific content and associated MIME headers. The
MIME headers consists of name/value pairs that can be used to
identify and describe the content.
An AttachmentPart
object must conform to certain standards.
Content-Type
AttachmentPart
object and MUST conform to [RFC2045].
The following is an example of a Content-Type header:
Content-Type: application/xmlThe following line of code, in which
ap
is an
AttachmentPart
object, sets the header shown in
the previous example.
ap.setMimeHeader("Content-Type", "application/xml");
There are no restrictions on the content portion of an AttachmentPart
object. The content may be anything from a
simple plain text object to a complex XML document or image file.
An AttachmentPart
object is created with the method
SOAPMessage.createAttachmentPart
. After setting its MIME headers,
the AttachmentPart
object is added to the message
that created it with the method SOAPMessage.addAttachmentPart
.
The following code fragment, in which m
is a
SOAPMessage
object and contentStringl
is a
String
, creates an instance of AttachmentPart
,
sets the AttachmentPart
object with some content and
header information, and adds the AttachmentPart
object to
the SOAPMessage
object.
AttachmentPart ap1 = m.createAttachmentPart(); ap1.setContent(contentString1, "text/plain"); m.addAttachmentPart(ap1);
The following code fragment creates and adds a second
AttachmentPart
instance to the same message. jpegData
is a binary byte buffer representing the jpeg file.
AttachmentPart ap2 = m.createAttachmentPart(); byte[] jpegData = ...; ap2.setContent(new ByteArrayInputStream(jpegData), "image/jpeg"); m.addAttachmentPart(ap2);
The getContent
method retrieves the contents and header from
an AttachmentPart
object. Depending on the
DataContentHandler
objects present, the returned
Object
can either be a typed Java object corresponding
to the MIME type or an InputStream
object that contains the
content as bytes.
String content1 = ap1.getContent(); java.io.InputStream content2 = ap2.getContent();The method
clearContent
removes all the content from an
AttachmentPart
object but does not affect its header information.
ap1.clearContent();
| Modifier | Constructor and Description |
|---|---|
protected |
AttachmentPart()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addMimeHeader(java.lang.String name,
java.lang.String value)
Adds a MIME header with the specified name and value to this
AttachmentPart object. |
abstract void |
clearContent()
Clears out the content of this
AttachmentPart object. |
abstract java.util.Iterator<MimeHeader> |
getAllMimeHeaders()
Retrieves all the headers for this
AttachmentPart object
as an iterator over the MimeHeader objects. |
abstract java.io.InputStream |
getBase64Content()
Returns an
InputStream which can be used to obtain the
content of AttachmentPart as Base64 encoded
character data, this method would base64 encode the raw bytes
of the attachment and return. |
abstract java.lang.Object |
getContent()
Gets the content of this
AttachmentPart object as a Java
object. |
java.lang.String |
getContentId()
Gets the value of the MIME header whose name is "Content-ID".
|
java.lang.String |
getContentLocation()
Gets the value of the MIME header whose name is "Content-Location".
|
java.lang.String |
getContentType()
Gets the value of the MIME header whose name is "Content-Type".
|
abstract DataHandler |
getDataHandler()
Gets the
DataHandler object for this AttachmentPart
object. |
abstract java.util.Iterator<MimeHeader> |
getMatchingMimeHeaders(java.lang.String[] names)
Retrieves all
MimeHeader objects that match a name in
the given array. |
abstract java.lang.String[] |
getMimeHeader(java.lang.String name)
Gets all the values of the header identified by the given
String . |
abstract java.util.Iterator<MimeHeader> |
getNonMatchingMimeHeaders(java.lang.String[] names)
Retrieves all
MimeHeader objects whose name does
not match a name in the given array. |
abstract java.io.InputStream |
getRawContent()
Gets the content of this
AttachmentPart object as an
InputStream as if a call had been made to getContent and no
DataContentHandler had been registered for the
content-type of this AttachmentPart . |
abstract byte[] |
getRawContentBytes()
Gets the content of this
AttachmentPart object as a
byte[] array as if a call had been made to getContent and no
DataContentHandler had been registered for the
content-type of this AttachmentPart . |
abstract int |
getSize()
Returns the number of bytes in this
AttachmentPart
object. |
abstract void |
removeAllMimeHeaders()
Removes all the MIME header entries.
|
abstract void |
removeMimeHeader(java.lang.String header)
Removes all MIME headers that match the given name.
|
abstract void |
setBase64Content(java.io.InputStream content,
java.lang.String contentType)
Sets the content of this attachment part from the Base64 source
InputStream and sets the value of the
Content-Type header to the value contained in
contentType , This method would first decode the base64
input and write the resulting raw bytes to the attachment. |
abstract void |
setContent(java.lang.Object object,
java.lang.String contentType)
Sets the content of this attachment part to that of the given
Object and sets the value of the Content-Type
header to the given type. |
void |
setContentId(java.lang.String contentId)
Sets the MIME header whose name is "Content-ID" with the given value.
|
void |
setContentLocation(java.lang.String contentLocation)
Sets the MIME header whose name is "Content-Location" with the given value.
|
void |
setContentType(java.lang.String contentType)
Sets the MIME header whose name is "Content-Type" with the given value.
|
abstract void |
setDataHandler(DataHandler dataHandler)
Sets the given
DataHandler object as the data handler
for this AttachmentPart object. |
abstract void |
setMimeHeader(java.lang.String name,
java.lang.String value)
Changes the first header entry that matches the given name
to the given value, adding a new header if no existing header
matches.
|
abstract void |
setRawContent(java.io.InputStream content,
java.lang.String contentType)
Sets the content of this attachment part to that contained by the
InputStream content and sets the value of the
Content-Type header to the value contained in
contentType . |
abstract void |
setRawContentBytes(byte[] content,
int offset,
int len,
java.lang.String contentType)
Sets the content of this attachment part to that contained by the
byte[] array content and sets the value of the
Content-Type header to the value contained in
contentType . |
public abstract int getSize() throws SOAPException
AttachmentPart
object.AttachmentPart
object in bytes
or -1 if the size cannot be determinedSOAPException
- if the content of this attachment is
corrupted of if there was an exception while trying
to determine the size.public abstract void clearContent()
AttachmentPart
object.
The MIME header portion is left untouched.public abstract java.lang.Object getContent() throws SOAPException
AttachmentPart
object as a Java
object. The type of the returned Java object depends on (1) the
DataContentHandler
object that is used to interpret the bytes
and (2) the Content-Type
given in the header.
For the MIME content types "text/plain", "text/html" and "text/xml", the
DataContentHandler
object does the conversions to and
from the Java types corresponding to the MIME types.
For other MIME types,the DataContentHandler
object
can return an InputStream
object that contains the content data
as raw bytes.
A SAAJ-compliant implementation must, as a minimum, return a
java.lang.String
object corresponding to any content
stream with a Content-Type
value of
text/plain
, a
javax.xml.transform.stream.StreamSource
object corresponding to a
content stream with a Content-Type
value of
text/xml
, a java.awt.Image
object
corresponding to a content stream with a
Content-Type
value of image/gif
or
image/jpeg
. For those content types that an
installed DataContentHandler
object does not understand, the
DataContentHandler
object is required to return a
java.io.InputStream
object with the raw bytes.
AttachmentPart
objectSOAPException
- if there is no content set into this
AttachmentPart
object or if there was a data
transformation errorpublic abstract java.io.InputStream getRawContent() throws SOAPException
AttachmentPart
object as an
InputStream as if a call had been made to getContent
and no
DataContentHandler
had been registered for the
content-type
of this AttachmentPart
.
Note that reading from the returned InputStream would result in consuming
the data in the stream. It is the responsibility of the caller to reset
the InputStream appropriately before calling a Subsequent API. If a copy
of the raw attachment content is required then the getRawContentBytes()
API
should be used instead.
InputStream
from which the raw data contained by
the AttachmentPart
can be accessed.SOAPException
- if there is no content set into this
AttachmentPart
object or if there was a data
transformation error.getRawContentBytes()
public abstract byte[] getRawContentBytes() throws SOAPException
AttachmentPart
object as a
byte[] array as if a call had been made to getContent
and no
DataContentHandler
had been registered for the
content-type
of this AttachmentPart
.byte[]
array containing the raw data of the
AttachmentPart
.SOAPException
- if there is no content set into this
AttachmentPart
object or if there was a data
transformation error.public abstract java.io.InputStream getBase64Content() throws SOAPException
InputStream
which can be used to obtain the
content of AttachmentPart
as Base64 encoded
character data, this method would base64 encode the raw bytes
of the attachment and return.InputStream
from which the Base64 encoded
AttachmentPart
can be read.SOAPException
- if there is no content set into this
AttachmentPart
object or if there was a data
transformation error.public abstract void setContent(java.lang.Object object, java.lang.String contentType)
Object
and sets the value of the Content-Type
header to the given type. The type of the
Object
should correspond to the value given for the
Content-Type
. This depends on the particular
set of DataContentHandler
objects in use.object
- the Java object that makes up the content for
this attachment partcontentType
- the MIME string that specifies the type of
the contentjava.lang.IllegalArgumentException
- may be thrown if the contentType
does not match the type of the content object, or if there
was no DataContentHandler
object for this
content objectgetContent()
public abstract void setRawContent(java.io.InputStream content, java.lang.String contentType) throws SOAPException
InputStream
content
and sets the value of the
Content-Type
header to the value contained in
contentType
.
A subsequent call to getSize() may not be an exact measure of the content size.
content
- the raw data to add to the attachment partcontentType
- the value to set into the Content-Type
headerSOAPException
- if an there is an error in setting the contentjava.lang.NullPointerException
- if content
is nullpublic abstract void setRawContentBytes(byte[] content, int offset, int len, java.lang.String contentType) throws SOAPException
byte[]
array content
and sets the value of the
Content-Type
header to the value contained in
contentType
.content
- the raw data to add to the attachment partcontentType
- the value to set into the Content-Type
headeroffset
- the offset in the byte array of the contentlen
- the number of bytes that form the contentSOAPException
- if an there is an error in setting the content
or content is nullpublic abstract void setBase64Content(java.io.InputStream content, java.lang.String contentType) throws SOAPException
InputStream
and sets the value of the
Content-Type
header to the value contained in
contentType
, This method would first decode the base64
input and write the resulting raw bytes to the attachment.
A subsequent call to getSize() may not be an exact measure of the content size.
content
- the base64 encoded data to add to the attachment partcontentType
- the value to set into the Content-Type
headerSOAPException
- if an there is an error in setting the contentjava.lang.NullPointerException
- if content
is nullpublic abstract DataHandler getDataHandler() throws SOAPException
DataHandler
object for this AttachmentPart
object.DataHandler
object associated with this
AttachmentPart
objectSOAPException
- if there is no data in
this AttachmentPart
objectpublic abstract void setDataHandler(DataHandler dataHandler)
DataHandler
object as the data handler
for this AttachmentPart
object. Typically, on an incoming
message, the data handler is automatically set. When
a message is being created and populated with content, the
setDataHandler
method can be used to get data from
various data sources into the message.dataHandler
- the DataHandler
object to be setjava.lang.IllegalArgumentException
- if there was a problem with
the specified DataHandler
objectpublic java.lang.String getContentId()
String
giving the value of the
"Content-ID" header or null
if there
is nonesetContentId(java.lang.String)
public java.lang.String getContentLocation()
String
giving the value of the
"Content-Location" header or null
if there
is nonepublic java.lang.String getContentType()
String
giving the value of the
"Content-Type" header or null
if there
is nonepublic void setContentId(java.lang.String contentId)
contentId
- a String
giving the value of the
"Content-ID" headerjava.lang.IllegalArgumentException
- if there was a problem with
the specified contentId
valuegetContentId()
public void setContentLocation(java.lang.String contentLocation)
contentLocation
- a String
giving the value of the
"Content-Location" headerjava.lang.IllegalArgumentException
- if there was a problem with
the specified content locationpublic void setContentType(java.lang.String contentType)
contentType
- a String
giving the value of the
"Content-Type" headerjava.lang.IllegalArgumentException
- if there was a problem with
the specified content typepublic abstract void removeMimeHeader(java.lang.String header)
header
- the string name of the MIME header/s to
be removedpublic abstract void removeAllMimeHeaders()
public abstract java.lang.String[] getMimeHeader(java.lang.String name)
String
.name
- the name of the header; example: "Content-Type"String
array giving the value for the
specified headersetMimeHeader(java.lang.String, java.lang.String)
public abstract void setMimeHeader(java.lang.String name, java.lang.String value)
Note that RFC822 headers can only contain US-ASCII characters.
name
- a String
giving the name of the header
for which to searchvalue
- a String
giving the value to be set for
the header whose name matches the given namejava.lang.IllegalArgumentException
- if there was a problem with
the specified mime header name or valuepublic abstract void addMimeHeader(java.lang.String name, java.lang.String value)
AttachmentPart
object.
Note that RFC822 headers can contain only US-ASCII characters.
name
- a String
giving the name of the header
to be addedvalue
- a String
giving the value of the header
to be addedjava.lang.IllegalArgumentException
- if there was a problem with
the specified mime header name or valuepublic abstract java.util.Iterator<MimeHeader> getAllMimeHeaders()
AttachmentPart
object
as an iterator over the MimeHeader
objects.Iterator
object with all of the Mime
headers for this AttachmentPart
objectpublic abstract java.util.Iterator<MimeHeader> getMatchingMimeHeaders(java.lang.String[] names)
MimeHeader
objects that match a name in
the given array.names
- a String
array with the name(s) of the
MIME headers to be returnedIterator
objectpublic abstract java.util.Iterator<MimeHeader> getNonMatchingMimeHeaders(java.lang.String[] names)
MimeHeader
objects whose name does
not match a name in the given array.names
- a String
array with the name(s) of the
MIME headers not to be returnedAttachmentPart
object
except those that match one of the names in the
given array. The nonmatching MIME headers are returned as an
Iterator
object.


public class Expression
extends java.lang.Object
implements java.io.Serializable
Expression
is a tree which encapsulates arbitrary
mathematical functions according to a specific grammar. <Number>
Or <Variable>
Or <Expression>
<Operator>
<Expression>
| Constructor and Description |
|---|
Expression(char v)
Builds an
Expression that consists of a variable. |
Expression(double n)
Builds an
Expression that consists of a single real
number. |
Expression(Expression l,
char o,
Expression r)
A binary tree of
Expression s. |
| Modifier and Type | Method and Description |
|---|---|
double |
collapse(double input)
Pushes an input number through an
Expression , and returns
the calculated number. |
Expression |
getLeft() |
double |
getNum() |
char |
getOperator() |
Expression |
getRight() |
ExpressionType |
getType() |
char |
getVariable() |
BinaryFunction |
makeFunction()
Creates a lambda according to the
Expression 's operator. |
java.lang.String |
print()
A wrapper function for
print(int) , used when
you which to print at the head of an Expression tree. |
java.lang.String |
print(int tabs)
Recursively pretty-prints this
Expression . |
double |
shiftNumber(double amount)
Returns a tweaked version of a numerical
Expression . |
public Expression(double n)
Expression
that consists of a single real
number. This translates to a function which returns only said
number.n
- The number the Expression
will return.public Expression(char v)
Expression
that consists of a variable. This
translates to a function which returns its input.v
- The letter to use for the variable.public Expression(Expression l, char o, Expression r)
Expression
s. Each side will evaluate to
recursively until it hits the terminal nodes of either the
Number
or Variable Expression
type. The halves will
be combined according to how the operator dictates.l
- The left branch.o
- The combining operator.r
- The right branch.public double collapse(double input)
Expression
, and returns
the calculated number. This is like treating the Expression
as some f(x)
, and calling it with an inputed real number.
If the function is simply a number, it ignores the input and
returns said number.
If it's a variable, it returns the input.
If it's a complex Expression
, the function is solved
recursively by first figuring out how to implement the operator
with solveExpression(double)
, then repeating the collapse
on each half.input
- The real number to pass through the Expression
.solveExpression(double)
public BinaryFunction makeFunction()
Expression
's operator.
Useful for turning an Expression
's operator into a
computable function.Expression
's operator.public double shiftNumber(double amount)
Expression
.
Useful for mutations.amount
- What to shift the number by.public java.lang.String print()
print(int)
, used when
you which to print at the head of an Expression
tree.Expression
.print(int)
public java.lang.String print(int tabs)
Expression
.tabs
- How much to indent this section. Deeper sections
are indented more.Expression
.printTabs(int)
public ExpressionType getType()
Expression
.public double getNum()
Expression
.
Note: Check if this is indeed a numerical Expression
.public char getVariable()
Expression
.
Note: Check if this is indeed a variable Expression
.public Expression getLeft()
Expression
.
Note: Check if this is indeed a complex Expression
.public Expression getRight()
Expression
.
Note: Check if this is indeed a complex Expression
.public char getOperator()
Expression
.
Note: Check if this is indeed a complex Expression
.


|
Viewer Events
Back to Contents
First, make sure you have:
(as of June 2020)
Creating an event
These aren't acutally events. True events can have multiple listeners added to them, this is not the case here.
The following functions are only functions, if you make two with the same name, the last one to be created
is the only one to be used.
These functions are called when potentially important updates happen in the viewer.
If an important event occurs, the viewer looks for a function attached to the window (the parent object of everything
that both your JavaScript and the viewer can see), if it finds one it runs it, otherwise nothing happens.
A function added to the window anonymously:
window.sayHi = function(x){ console.log(Hello World, I saw an + x);}
Or you can define a function elsewhere and attach it separately.
function hidy(x){ console.log(Hello World, I saw an + x);}
window.sayHi = hidy;
- Preloader functions:
window.viewerLoadingBarAdvance = function(percent){} : Called every time the preloading bar advances with the percent loaded from 0 to 1.
window.viewerCustomLoadingBar = function(panel){} : Called once when the preloader is created. panel is the root object of the preloader
you can attach things to. If you use this function, be sure to use window.viewerLoadingBarAdvance as well, otherwise the preloader will try to
advance a loading bar which may not exist.
- Initial functions:
window.viewerStatsWidth = function(){ return 700; } : Called when the viewer first starts. This function should return
the desired width in pixels if you are setting it dynamicly.
window.viewerEventResetFinished = function(){} : Not called when the viewer first initilaizes, but called after a
resizing task is complete (The viewerResetSize function triggers a reset).
window.viewerListenerProcessing = function(remaining,progress){} : Called between image processing tasks. This will generally not be
called more often than the yield time in config.ini . The function informs you of the number of tasks remaining ,
as well as the progress on the current task (a number between 0 and 1). When all processing is complete (even if there was none
to do in the first place, this function will be called with 0 remaining tasks with the current progress at 1.
window.viewerListenerLoadingStateChanged = function(state){} : This function informs you when a loading state changes.
The state is a numeric flag:
FLAGviewerReady : Indicates everything loaded properly and every image is processed and in the GPU.
FLAGviewerLoaded : Indicates everything loaded properly, but there may still be images to be processed.
FLAGviewerFailedLoad : Indicates an error the viewer can't recover from (usually if the server goes down before
the loading process completes).
- Runtime functions:
window.viewerListenerInput = function(){} : Called when any known input occurs.
window.viewerListenerClickAdded = function( click ){} : Called when a click is added to the viewer.
window.viewerListenerClickRemoved = function( click ){} : Called when a click is removed from the viewer. The click is a string
with x,y,z,time separated by commas. Note that the coordinates are scaled to the dimensions specified in
config.ini . It represents the position of the click when it was added, not the click that removed it (it is guaranteed to be
the same values as provided in window.viewerListenerClickAdded above, even if the viewer has been resized between events).
window.viewerListenerScrollSuccess = function(slideIndex){} : Called when the viewer scrolls to a new slide. Provides the
slideIndex of the current slide.
window.viewerListenerScrollFail = function(slideIndex){} : Called when the viewer tries to scroll to a new slide but fails
because it is either at the first or last available slide. Provides the slideIndex of the current slide.
window.viewerCoroutine = function(){} : Called everytime the screen renders before any changes or updates occur
(after drawing and updating). This will always run every frame , even if the viewer image set is 0.
- System:
window.viewerConsoleOut = function(msg){} : called anytime the viewer would output to the console. Note that the output
from your own JavaScript (and errors created there) will not output through this function. This can be used if you want to send
all of your log output back from each client for debugging (not generally recommended) or you can use this to create a console
in mobile browsers if you are targeting that platform.
Tutorial Videos
| |


| theme_gtsummary {gtsummary} | R Documentation |
The following themes are available to use within the gtsummary package.
Use the set_gtsummary_theme()
function to set a theme.
theme_gtsummary_journal(journal = c("jama", "lancet"), set_theme = TRUE) theme_gtsummary_compact(set_theme = TRUE) theme_gtsummary_printer( print_engine = c("gt", "kable", "kable_extra", "flextable", "huxtable", "tibble"), set_theme = TRUE ) theme_gtsummary_language( language = c("de", "en", "es", "fr", "gu", "hi", "ja", "mr", "pt", "se", "zh-cn", "zh-tw"), decimal.mark = NULL, big.mark = NULL, iqr.sep = NULL, ci.sep = NULL, set_theme = TRUE )
journal |
String indicating the journal theme to follow.
|
set_theme |
Logical indicating whether to set the theme. Default is |
print_engine |
String indicating the print engine. Default is |
language |
String indicating language. Must be one of
If a language is missing a translation for a word or phrase, please feel free to reach out on GitHub with the translated text! |
decimal.mark |
The character to be used to indicate the numeric decimal point.
Default is |
big.mark |
Character used between every 3 digits to separate
hundreds/thousands/millions/etc.
Default is |
iqr.sep |
string indicating separator for the default IQR in |
ci.sep |
string indicating separator for confidence intervals.
If |
theme_gtsummary_journal(journal=)
"jama"
sets theme to align with the JAMA reporting guidelines
large p-values are rounded to two decimal places
in tbl_summary()
the IQR is separated with a dash, rather than comma
in tbl_summary()
the percent symbol is not printed next to percentages
"lancet"
sets theme to align with the The Lancet reporting guidelines
large p-values are rounded to two decimal places
in tbl_summary()
the IQR is separated with a dash, rather than comma
confidence intervals are separated with 4.5 to 7.8
, rather than a comma
theme_gtsummary_compact()
tables printed with gt or flextable will be compact with smaller font size and reduced cell padding
theme_gtsummary_printer(print_engine=)
"gt"
sets the gt package as the default print engine
"kable"
sets the knitr::kable()
function as the default print engine
"flextable"
sets the flextable package as the default print engine
"kable_extra"
sets the kableExtra package as the default print engine
Use reset_gtsummary_theme()
to restore the default settings
Review the themes vignette to create your own themes.
Example
set_gtsummary_theme()
, reset_gtsummary_theme()
# Setting JAMA theme for gtsummary theme_gtsummary_journal("jama") # Themes can be combined by including more than one theme_gtsummary_compact() set_gtsummary_theme_ex1 <- trial %>% dplyr::select(age, grade, trt) %>% tbl_summary(by = trt) %>% add_stat_label() %>% as_gt() # reset gtsummary themes reset_gtsummary_theme()


Voting blocs and vetos
This post looks at the Assembly division vote records from 2007 to present (which can be seen in full at What They Do). We use the designation, required of each member, as one of 'Unionist', 'Nationalist', or 'Other', to separate both votes cast and motions proposed into the three main ideological groups, to understand how membership of these groups affects voting behaviour.
Passing motions has not got (much) easier
Overall, members with 'Other' designation have approached division voting more positively than Unionists and Nationalists, as they have voted 'Aye' on 59% of occasions, compared to 54% for Unionists and 46% for Nationalists. Over time, there has been an upward trend in 'Aye' voting from Others and Nationalists. We cannot easily determine whether or not this is partly due to 'better' motions (more deserving of an 'Aye' vote) being proposed in recent years.
This increased positivity has translated into an increase in the frequency of votes receiving support of 50% or more (blue points and line below), but this has been partly countered by an increase in the use of the cross-community support requirement (a.k.a. the 'petition of concern' blocker) (green), with the net result being that the fraction of votes passing each year has increased (black), but at a lower rate than the fraction of motions earning majority support.
Parties vote for their own motions
Unsurprisingly, members and parties are more likely to support motions that are proposed by members of the same party or designation than those proposed by different designations. In the plot below, which again covers the whole 2007-2020 period, MLAs in the lower right support almost all Unionist motions and few Nationalist motions, and for MLAs in the upper left, the reverse is true. Some notable outliers are labelled.
The plot is not quite symmetric: the DUP members lie closer to the bottom-right corner than Sinn Fein members are to the top-left corner, meaning that they more consistently voted to support 'their own' motions and reject those from the opposing side. Sinn Fein, and to a greater extent, SDLP, members lie above the diagonal line, which means that although they usually supported Nationalist motions (large y values), they also sometimes supported Unionist motions (moderately large x values). Alliance members are found in the centre of the grid, meaning that they were equally as likely to support a Unionist motion as a Nationalist motion (see below).
Overall, Unionist motions pass the frequently often (52%), followed by mixed (36%), Other (35%), and Nationalist (28%). Unionist motions have had an unusually low pass rate in this session compared to previous years. It is interesting that mixed proposals do not have a significantly higher success rate. Further investigation reveals that a third of these motions were proposed by DUP and Sinn Fein, and these were relatively successful (passing 75% of the time). Most of the other motions did not involve DUP (the most common combinations were Alliance-SDLP and SDLP-UUP), and these were unlikely to succeed (passing only 10% of the time).
Alliance really are in the centre
The two parties that use the 'Other' designation in the current session and have been present in the Assembly since 2007 are Alliance and Green (the latter albeit with only a single member for most of that time). Although these parties are officially, and intentionally, affiliated with neither the Nationalist nor the Unionist viewpoints, their voting record may reveal some preference one way or the other.
Alliance have been positioned firmly in the centre of the Unionist-Nationalist dimension over the period 2007-2020: they have sided with Nationalists only slightly more often than with Unionists (53% of the occasions where their vote aligned with one bloc or other). In the current session, however, they have tended to vote with Nationalists, which partly reflects the Brexit party alignment that has been a deciding factor in some of the votes in the last few years.
Green have voted much more consistently (69%) with Nationalists, particularly in the 2011-2016 session, although the party vote consisted of a single member from 2007 until 2016. Voting with Nationalists is probably reflective of the Green Party's leftist position on social issues.
Previous article: {{prev_and_next_article_title[0]}}
{% endif %}Next article: {{prev_and_next_article_title[1]}}
{% endif %}


| 008:019 Khan | : |
(O disbelievers) if you ask for a judgement, now has the judgement come unto you and if you cease (to do wrong), it will be better for you, and if you return (to the attack), so shall We return, and your forces will be of no avail to you, however numerous it be, and verily, Allah is with the believers. |
| 008:019 Maulana | : |
If you sought a judgment, the judgment has indeed come to you; and if you desist, it is better for you. And if you return (to fight), We (too) shall return and your forces will avail you nothing, though they may be many; and (know) that Allah is with the believers. |
| 008:019 Pickthal | : |
(O Qureysh!) If ye sought a judgment, now hath the judgment come unto you. And if ye cease (from persecuting the believers) it will be better for you, but if ye return (to the attack) We also shall return. And your host will avail you naught, however numerous it be, and (know) that Allah is with the believers (in His Guidance). |
| 008:019 Rashad | : |
You sought victory (O disbelievers), and victory did come; it belonged to the believers. If you refrain (from aggression) it would be better for you, but if you return, so will we. Your armies will never help you, no matter how great. For GOD is on the side of the believers. |
| 008:019 Sarwar | : |
If you (the pagans) are looking for conquest, you certainly had a great chance (at the battle of Badr). But if you were to give up such a desire, it would be better for you. If you again wage war against Us, We will be ready for such a confrontation. Your man-power will be of no help to you no matter how much you have; God is with the believers. |
| 008:019 Shakir | : |
If you demanded a judgment, the judgment has then indeed come to you; and if you desist, it will be better for you; and if you turn back (to fight), We (too) shall turn back, and your forces shall avail you nothing, though they may be many, and (know) that Allah is with the believers. |
| 008:019 Sherali | : |
If you, O disbelievers, sort a judgment, then judgment has indeed come to you. And if you desist, it will be better for you; but if you return to mischief, WE too will return to punishment. And your party shall be of no avail to you, however numerous it be, and know that ALLAH is with the believers. |
| 008:019 Yusufali | : |
(O Unbelievers!) if ye prayed for victory and judgment, now hath the judgment come to you: if ye desist (from wrong), it will be best for you: if ye return (to the attack), so shall We. Not the least good will your forces be to you even if they were multiplied: for verily Allah is with those who believe! |
Concepts/Themes Covered: الجهاد > الغزوات > غزوة بدر Jihad> The Holy Battles> Bader Battle الجهاد > نتائج الحرب > النصر من عند الله Jihad> The War Results> Victory is from Allah
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


Sinatra ActiveRecord MVC Application
27 Mar 2016I’ve learned a ton since I built my first CLI gem in my last project. Flatiron School’s Full Stack Dev curriculum really knows how to keep us just on the edge of our knowledge - Always challenging and I’m absolutely addicted. This project’s requirements are as follows:
REQUIREMENTS
- Build an MVC Sinatra Application.
- Use ActiveRecord with Sinatra.
- Use Multiple Models.
- Use at least one has_many relationship
- Must have user accounts. The user that created the content should be the only person who can modify that content
- Models must have validations to ensure that bad data isn’t created
- Any validation failures must be shown to user with an error message
I decided I wanted to build a game collection app that keeps track of a users games. When I was younger (the days before Steam was a thing) I had a ton of games on PC/DVD, SNES, N64 and no where to keep track of them! My first task is to determine file structure, more importantly.. which gems I will be needing to create this app.
Next let’s build out the models. A User has many
games and a Game belongs to
a user. We’re being taught that starting out with the models first is a great pattern for building web apps from scratch. This way we can directly interact with our data first before committing to building out the larger portion of the framework like the controllers and routing. We can always come back to add attributes or functionality to the models in the future as well.
Now let’s setup our database. We have to create 2 tables, one for users and one for games. We’re going to run rake db:create_migration NAME=create_users
and do the same for games. Our code in our migration file will look like this:
We’re creating 3 columns for our 3 attributes: Games have a name, year, and a foreign key: user_id
since games belong_to
a User. We’ll do the same for Users then run rake db:migrate
to execute the changes. After our tables are setup we’ll need to add our 2 models to our app.
With our tables and models setup and migrated our Users and Games are now associated. Remember that the model that has belongs_to will always have the foreign key. In this case, our Game model has the foreign key user_id
.
Let’s start with the User class. We’re include
ing instance method slug
that will take a user’s username, downcase it, and replace all spaces with dashes. That’s the beauty of ruby.. we can just look at the method and know exactly what it does. The purpose of this method is to have our URLs remain RESTful. Next we’re extend
ing our class method find_by_slug
that will give us the ability to find a user by their slugified name.
has_secure_password
is a macro given to us by ActiveRecord. However in order to use this we will need to have sessions
enabled and also our gem bcrypt
that we installed earlier. Bcrypt
gives us the ability to store a salted and hashed version of a user’s password in a database column called password_digest
. Let’s add that now.
To wrap up user auth we are given a method authenticate
that is provided to us by the Bcrypt gem, which takes a string as an argument. If the string password matches the string password in the password digest, it will return the user object, otherwise it will return false.
We ensure that bad data isn’t being passed with our helper methods logged_in?
which evaluates the truthiness of a session[:id] and empty_field?
which ensures that a user fills out all form fields when logging in or signing up. Since the our session hash persists across our URLs, it is a very useful tool allowing a web app to persist a user across the entire scope of the application. In other words, the user does not have to log in every time they request a new page. This introduces “state” in an otherwise stateless web. Check out all of my controller routes and actions on my full github repo.
For our last requirement I decided to use the flash gem found here. This cool little gem adds an error message for the user when they fail a validation.
##Conclusion
I learned a ton about how the web operates doing this project. It was a lot of work and I’m glad that I’m learning a basically smaller version of Rails before moving onto the behemoth. Feel free to send me an email<EMAIL_ADDRESS>I’d love to hear from you!


This is my music portfolio it has a my completed songs, assignments, and incomplete songs. I also have my research at the bottom of the page.
Completed Songs:
| Title | Music | Description |
|---|---|---|
| Comfy Nighttime | I wrote this song to convey the image of autumn at night. I tried to use a lot of delay effect to give the song a dreamy atmosphere. | |
| Sommeil | I wrote this song without an image or story in mind, instead using the feeling of just being tired or sleepy. I primarily chose instruments that had an airy feel to them to fit with the "feeling" of the song. | |
| Phase Caverns | I wrote this song imagining the exploration of a deep cave system and the nearly alien environment. To fit the darkness of this cave system I put a lot of effort into creating a strong and memorable baseline. To convey the uncertainty of this sort of place I filled one section with bits of dissonance (in rhythm and pitch) and added a phaser to the instruments used to make the listener feel like something is off. See 'Extras' for more information. | |
| Forest Tree |
The rhythm for this song is sort of messed up because I composed it on my ipad and don't have the ability to be able to edit recorded sound files.
I wrote the lyrics from the perspective of an adult remeniscing about when they were younger and played in nature. I designed the lyrics to use odd combinations of words to fit with the illogical ideas and crazyness of childhood. To add some structure to the lyrics I decided to break up the song into the four seasons, starting in summer. This also helps reinforce the theme of nature. Lyrics: I lived under a tree, Watching the green sunset, Carefree. Wind trickles down from the mountain. ** Break ** Copper leaves fall. ** Break ** Silent wisps disappear. I sat under frozen branches. By a fireplace, New things live. ** Interlude ** My forest rings, Water through the air, Under a tree. (x2) |
Assignments:
| Title | Music | Description |
|---|---|---|
| Spooky Story | This is my song that is written to a story. | |
| Halloween Soundscape | This track was written to be a soundscape but it has parts that are structured. This song loops. | |
| Assignment 2 & 3 | I wrote this track imagining an image of a forest in ancient Japan. |
Incomplete Songs & Ideas:
| Codename | Music | Image | Description |
|---|---|---|---|
| chiptune-1 | This is pretty much just 3 different songs mashed together with some poor transitions. My favorite section is at 1:10. | ||
| testing melodies | This is when I was playing around with melodies, looking for a song idea. The melodies led to the creation of sommeil. | ||
| portfolio-1 | I made this song during a portion of a class around the start of the year. I like my composition at the beginning of this piece with the broken chords and interesting melody. | ||
| spooky-soundtrack-extras | no image | I'm mostly just saving this part for myself because I like the compositional ideas. I made this at the same time as my spooky soundtrack. This was the initial inspiration for my song, Sommeil. | |
| sommeil-extras | no image | This song was some random improv that I decided to fix up. It's still not great but I like the different emotions that it evokes. The improv actually takes inspiration from the theme song of "The Legend of Zelda" and uses one of its motifs. | |
| assignment-2-extras | no image | I made this little melody while working on assignment 2. I like how playful it sounds. | |
| dry orange grass | I didn't have the time to complete this song, but I was able to add a piano and add some echo onto it. | ||
| piano song | no image | This is another one of my piano improvs except I recorded, then edited this one. | |
| lmms songs | no images | These are just a few small songs that I made on my laptop using lmms. |
Research Information:
The first part of my research is small summaries of different elements of music or concepts that I researched.
Texture -> A combination of tempo, melody, and harmony. This is all the raw notes and when they are played. Texture is usually described in the sense of the range and frequency of notes. Lots of notes played quickly or many layers of instruments sounds thick, while fewer layers or notes feels thin. Texture is also affected by the timbre of an instrument or the voices used. Texture is described with the terms thin/thick, wide/narrow, and light/heavy.
Common Types of Textures:
Monophonic -> A single melodic line with no accompanying instruments / lines.
Biphonic -> Two distinct lines, a lower drone melody and a higher melody above it.
Polyphonic / Contrapuntal -> More than one melodic voices which are independent from eachother.
Homophonic -> Multiple voices with one main melody and multiple harmonic accompanyments. Rhythmic similarity.
Heterophonic -> Two or more voices playing variations of the same melody simultaneously.
Textural Elements: -> Knowing the textural elements helps in analysing texture in songs. (in more depth)
A. Melodic Elements -> "The Melodies"
- Primary Melody -> The most important or significant melody.
- Secondary Melody -> Melodies that are less significant than the primary melody but are still independent.
- Parallel Supporting Melody -> Have a similar contour to another Primary or Secondary melody.
B. Supporting Elements -> "The Flavour"
- Static Support -> Sustained tones (drones), repeated melodies (arpeggios), and ostanti.
- Harmonic Support -> An element of accompaniment that provides a harmonic background to the melody. Often seen as long sustained notes or chords.
- Rhythmic Support -> An element of accompaniment that provides a rhythmic background to the melody. This is seen as a drum track or with general percussion instruments.
C. Timbral Elements -> The individual timbre of each voice and how it affects the texture.
Timbre -> The sound quality or colour of an individual musical note. Timbre is what determines the difference between two notes with the same pitch and loudness. Changing settings on a synthesizer changes the timbre of the ntoes produced. Different envelopes also count as different timbres.
Pedal Tone -> A droning bass note that starts out dissonant but then the key changes to make it consonant.
Motif -> A short musical phrase that often repeats. It is a recognizable aspect of a piece and carries some meaning. Motifs are what make up thematic identity. (Themes with significant associated meaning)
Theme / Subject -> A suject is the material (or regognizable melody) which a composition is based off of. A subject is similar to a motif except a subject is more of a complete phrase than an idea.
Melodic Movement -> The change in pitch between two notes. Large / short leaps up / down.
Contour -> The curve that is the change in pitch over time. Usually just a single voice. Similar to melodic movement.
Counterpoint / Contrapuntal -> The relationship between voices independent in harmony and rhythm. Examples of counterpoint:
Rounds -> Singing the same melody but starting at different times. Melody must be designed to sound good at different points.
Contrapuntal Inversion -> This is when low and high voices switch places. --I think this is a really cool effect.--
Voice Leading -> How the different lines of melodies combine to form a whole. Must follow certain rules. The progression of each separate line of a contrapuntal section of music, although it's "not just for contrapuntal melodies."
Mode -> This is a type of scale combined with melodic behaviours.
Ornament -> Ornaments are flourishes that accompany the overall melody and serve to decorate a melodic line by adding variety or expressiveness. Ornaments are often a lot of fast notes around a main note.
Ostinato -> A short motif that persistantly repeats in the same voice. Can just be thought of as a small repeating melody.
Candence -> This is a melodic pattern that creates a sense of resolution or completion. This is often accomplished by ending a melody on the tonic note.
Extras:
I took my song Phase Caverns and converted it into the textural elements:
Original:
With Textural Elements:
Notes:
1.) The instrument playing the secondary melody gain focus and becomes the primary melody.
2.) The section is static and rhythmic support because it has a dissonant effect on the rhythm as well as being static support.
3.) This section is harmonic and rhythmic support because it is the harmonic background but also changes the rhythm.
4.) This part is actually two layers being played by one instrument, a higher pitched parallel supporting melody and a lower pitched harmonic support.
The Bottom Bar is the current texture type:
*1 - Monophonic
*2 - Biphonic
*3 - Homophonic
*4 - Polyphonic
*5 - Heterophonic
main source: http://www.rogerbissell.com/id11e.html
Return to main page


All functions |
|
|---|---|
Class representing a set of intervals |
|
Left- or right-closed breaks |
|
Create a |
|
Cut numeric data into intervals |
|
Chop by standard deviations |
|
Chop into fixed-sized groups |
|
|
|
Chop by quantiles |
Chop into equal-width intervals |
|
Syntactic sugar |
|
Create a chopping function |
|
Labels like 1 - 3, 4 - 5, ... |
|
Labels using breaks, with arbitrary formatting |
|
Labels using set notation |
|
|
|
Label in sequence |
Tabulate data by intervals |


A web app that builds an APK from Git URL and installs it on a USB connected device
{% if result%} {% for line in result %} {{ line }} {% endfor %} {% else %} {% endif %}


An IMO Problem Solved
17 Feb 2012I recently encountered an IMO question that’s stated as follows: Given a function f: \mathbb{R} \rightarrow \mathbb{R} such that for any x, y \in \mathbb{R}, f(x + y) \leq yf(x) + f(f(x)), show that f(x) = 0 for all x \leq 0.
There are two solutions, and I will present the one that AM and I came up with: one can easily verify that f(x) \leq f(f(x)). Let f^2(x) = f(f(x)). We will proceed by showing the following:
- f(x) \leq f^2(0)
- f(x) \leq 0
- f^2(0) = 0
At which point the result should be fairly straight-forward.
To show (1), consider f(f(x)) = f(f(x) + 0) \leq f(x)f(0) + f^2(0). From this, we have that f(x – f(0)) \leq -f(0)f(x) + f^2(x) \leq -f(0)f(x) + f(0)f(x) + f^2(0) = f^2(0). As x is arbitrary, (1) follows.
For (2), let y > 0, and consider f(x – y + y) \leq yf(x – y) + f^2(x + y). As y is positive, we have that yf(x – y) \leq -y^2f(x) + yf(f(x)), so f(x) \leq -y^2f(x) + yf^2(x) + f^2(x + y). Via (1), we have that f(f(x)) \leq f^2(0), f^2(x + y) \leq f^2(0), which in turn implies that f(x) \leq -y^2f(x) + (1 + y)f^2(0).
But this implies (1 + y^2)f(x) \leq (1 + y)f^2(0), which in turn implies that
f(x) \\leq \\frac{1 + y}{1 + y^2}f^2(0).
As y is arbitrary, we have that f(x) \leq 0: this proves (2).
To prove (3), notice that for any x, f(x) = f(x – 1 + 1) \leq f(x – 1) + f(f(x – 1)), and use (1). That is 2f^2(0) \geq f(x) for any x — in particular, x = f(0). Together with (2), we have f^2(0) = 0.
Finally, as f^2(0) \leq f^3(0) = f(0), we have that f(0) = 0; now observe 0 = f(0) = f(x – x) \leq -xf(x) + f(f(x)). The main result follows.


# A sample Guardfile # More info at github.com/guard/guard#readme
## Uncomment and set this to only include directories you want to watch # directories %w(app lib config test spec features) \ # .select{|d| Dir.exists?(d) ? d : UI.warning(“Directory #{d} does not exist”)}
## Note: if you are using the `directories` clause above and you are not ## watching the project directory ('.'), then you will want to move ## the Guardfile to a watched dir and symlink it back, e.g. # # $ mkdir config # $ mv Guardfile config/ # $ ln -s config/Guardfile . # # and, you'll have to watch “config/Guardfile” instead of “Guardfile”
guard 'livereload' do
extensions = { css: :css, scss: :css, sass: :css, js: :js, coffee: :js, html: :html, png: :png, gif: :gif, jpg: :jpg, jpeg: :jpeg, # less: :less, # uncomment if you want LESS stylesheets done in browser } rails_view_exts = %w(erb haml slim) # file types LiveReload may optimize refresh for compiled_exts = extensions.values.uniq watch(%r{public/.+\.(#{compiled_exts * '|'})}) extensions.each do |ext, type| watch(%r{ (?:app|vendor) (?:/assets/\w+/(?<path>[^.]+) # path+base without extension (?<ext>\.#{ext})) # matching extension (must be first encountered) (?:\.\w+|$) # other extensions }x) do |m| path = m[1] "/assets/#{path}.#{type}" end end # file needing a full reload of the page anyway watch(%r{app/views/.+\.(#{rails_view_exts * '|'})$}) watch(%r{app/helpers/.+\.rb}) watch(%r{config/locales/.+\.yml})
end


Featured Controls:
This application consists of:
- Visuals and styles inspired by MS Office software
- Patterns and Practices from MS Prism library
- Common design patterns and principals such as MVVM (Model-View-ViewModel), IoC (Inversion of Control), DI (dependency injection), event aggregation, commanding, navigation, and modular application development techniques
Customize application
Troubleshooting:
| Issue | Recommendations |
|---|---|
| The Infragistics WPF product is not installed on your system. | Verify the Infragistics WPF product is installed. To download a free trial, please visit www.infragistics.com. |
| The Infragistics assembly (DLL) references must be updated to the correct/desired version. |
By default, the template uses the latest major/volume release of Infragistics WPF controls. If you want to use a different compatible version, you must update the version numbers. The minimum compatible version for this template is 14.2. You can use the version utility to automate this process. |
| Missing references to Microsoft Prism and/or Microsoft Unity assemblies. |
Build the application solution and the assemblies will be downloaded as NuGet packages.
|


Which timebox and habits techniques did you try?
I tried Pomodoro and some of The Seven Counterintuitive Ways to be Insanely Productive.
What did you find interesting?
Lots of methods involved breaking large tasks into smaller ones, and rewarding yourself with short breaks. In the Seven Ways, they highlight that you don't need to be super productive all of the time. A quote from the Seven Ways that I found interesting and perhaps true: "people don’t procrastinate because they’re lazy. People procrastinate as a self-defense mechanism against doing stuff they despise or doing things too mechanically."
What worked for you?
I found breaking things into smaller sections and taking more regular breaks worked. After I achieved a certain amount of work, I would turn up my music and have a dance to a couple of songs before getting back to it! Also, going back to the Seven Ways methods, I found that telling someone I would have XYZ completed by a certain time and then showing them my achievement helped me to stay focused.
Which will you experiment further with?
Fogg's technique of changing behaviours through having a trigger to prompt a habit, and then celebration after.


---
layout: post
title: "Co-op placements"
background: '/img/experience/pexels-cadeau-maestro-1170412.jpg'
---
Index Exchange
- Full stack developer using nodejs, MySQL, AngularJS and Bootstrap
- Completed a web-pased portal ahead of schedule
- Received praise from UX team for solid application design
- Followed agile methodology throughout the project
- Helped another team to catch up with testing and documentation on their project
Genesys
- Front-end web developer using AngularJS, Bootstrap, Grunt and jQuery
- Created a calendar application capable of scheduling multiple appointments on different days across different time zones
- Maintained high code quality by writing a comprehensive test suite to ensure over 90% code coverage
- Created detailed documentation of project features and design


| DOSE: |
37.45 mg |
smoked |
MDA |
(freebase) |
I never heard of anyone smoking MDA.  I purchased 200mg of pure MDA crystals from a friend, and decided to committ 40mg to the experiment. I added the 40mg of MDA to 50ml of water. I allowed the solution to dissolve and I took the PH of the solution the soluion read 6.8. I then added a 50/50 solution of lye and water to the solution until it read a PH of 10. I then added 6 ml of naptha and let sit for 6 hrs, and then I filtered off the solevent, and repeated. after repeating 4 times I allowed the solevent to evaporate and I was left with 37.45 mg of a crystaline solid. I scraped the crystal up and loaded them into my DMT pipe.
I decided to smoke the MDA similiar to the way I smoke DMT as fast as possible. I took my first inhalation of this disgusting tasting smoke and held it as long as possible, I was able to finish off the crystals in my second toke. I layed back and waited for the effects to set in.
After about 15s I felt a huge rush oh happiness, love, and empathy run across my body. I felt extremly warm, and the effects were so strong I felt as though I couldnt walk. 6min into the experience I got up to check my pupils which were extremely dialated. after the peak subsided I was able to walk and carry on normal activities, the total effects lasted about 90 min.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


{{? it.auto_approve_users == false }}
{{?}}
Updating..please wait
Could not load new image.
Retry in 5 seconds.


My Thinking Style and Learning
The biggest strugle for me in Phase 0 thus far has been the time management. Week1 was pretty straightforward, so I didn't have much difficulty, but Week 2, the material was more difficult, and I was faced with four midterms/quizzes in school simultaneously. I didn't manage my time properly and I ended up delaying my Week 2 material in order to study for school. As a result, the material carried over from week 2 to week 3 and made it a hell lot harder than it should have been. School was not as time-consuming, fortunately, so I had the opportunity to catch up. Another good thing for me was that the challenges this week were easy to me since they chiefly focused on Ruby programming, and I have prior programming experience. I did manage my time much better in week 3, but I want to continue managing my time properly so I don't have to deal with unnecessary stress.
Was I struggling because of the way I think I learn? Well, according to the Gregorc
Thinking Style test, I am: Abstract Sequential (12 points), Concrete Sequential (8),
Concrete Random (7) and Abstract Random (3).
- Concrete means being capable of directly getting information, focusing on the present (practical), and not connecting the dots among different ideas/events/concepts etc.
- Abstract is being able to conceive novel ideas, using intuition, imagination, etc.
- Sequential means doing/thinking like a computer -- logically, and step by step
- Random means not thinking in organized, methodical ways, but still achieving a goal
So by these definitions, I excel in the Sequential mindset, and I should be better at planning and working. When I get my hands dirty and actually begin working, I work brutally fast; I can quickly craft plans to tackle a big problem, be resourceful when I stumble upon a question that I don't understand, and for the most part stay focused. The reason why I struggled last week, I think, is that I had everything planned, but I didn't follow through 100%. For example, I hoped to finish my homework by Wednesday (and thus expected to do DevBootcamp stuff Friday), but I underestimated the workload and finished it Friday. Then I was burned out from that, and was incapable of completing the Bootcamp material. In other words, I made a big planning error which snowballed into chaos as I struggled to get caught up with my schedule. One mistake led to an array of other mistakes, and I believe that is why I didn't have such an easy time. And honestly, I did just have a TON of work to do.
When I plan properly, everything is nice and smooth--and even if I make minor errors, I can adjust and adapt fairly well. Now, when I make a major error, however, everything just falls apart. I do think the solution is pretty simple. I need to plan better and be more discplined. To plan better, I should pump some extra time in my schedule to cushion myself for when I take too long. So if I believe I can finish all my homework by Tuesday, I'll plan everything as if I finish Wednesday, so in the worst case scenario that I can't finish my homework by Tuesday, I won't be so ill-prepared. In regards to the discipline part, I need to begin things early, and if I act irresponsibly (starting late, not adhering to my schedule, etc), work hard until I get everything back on track, even if it means less time for gaming and sleeping.


Illinois Chapter of the Trail of Tears Association
Home
(current)
About
Educational Resource
Get Involved
Recent Research
Click on the link below to download the Mail in Membership Application
Download Application


Middleware objects give you the ability to ‘wrap’ your application in re-usable, composable layers of Request handling, or response building logic. Visually, your application ends up at the center, and middleware is wrapped aroud the app like an onion. Here we can see an application wrapped with Routes, Assets, Exception Handling and CORS header middleware.
When a request is handled by your application it enters from the outermost middleware. Each middleware can either delegate the request/response to the next layer, or return a response. Returning a response prevents lower layers from ever seeing the request. An example of that is the AssetMiddleware handling a request for a plugin image during development.
If no middleware take action to handle the request, a controller will be located and have its action invoked, or an exception will be raised generating an error page.
Middleware are part of the new HTTP stack in CakePHP that leverages the PSR-7 request and response interfaces. Because CakePHP is leveraging the PSR-7 standard you can use any PSR-7 compatible middleware available on The Packagist.
CakePHP provides several middleware to handle common tasks in web applications:
Cake\Error\Middleware\ErrorHandlerMiddleware
traps exceptions from the
wrapped middleware and renders an error page using the
Error & Exception Handling Exception handler.Cake\Routing\AssetMiddleware
checks whether the request is referring to a
theme or plugin asset file, such as a CSS, JavaScript or image file stored in
either a plugin’s webroot folder or the corresponding one for a Theme.Cake\Routing\Middleware\RoutingMiddleware
uses the Router
to parse the
incoming URL and assign routing parameters to the request.Cake\I18n\Middleware\LocaleSelectorMiddleware
enables automatic language
switching from the Accept-Language
header sent by the browser.Cake\Http\Middleware\SecurityHeadersMiddleware
makes it easy to add
security related headers like X-Frame-Options
to responses.Cake\Http\Middleware\EncryptedCookieMiddleware
gives you the ability to
manipulate encrypted cookies in case you need to manipulate cookie with
obfuscated data.Cake\Http\Middleware\CsrfProtectionMiddleware
adds CSRF protection to your
application.Middleware can be applied to your application globally, or to individual routing scopes.
To apply middleware to all requests, use the middleware
method of your
App\Application
class. If you don’t have an App\Application
class, see
the section on Adding the new HTTP Stack to an Existing Application for more information. Your application’s
middleware
hook method will be called at the beginning of the request
process, you can use the MiddlewareQueue
object to attach middleware:
namespace App;
use Cake\Http\BaseApplication;
use Cake\Error\Middleware\ErrorHandlerMiddleware;
class Application extends BaseApplication
{
public function middleware($middlewareQueue)
{
// Bind the error handler into the middleware queue.
$middlewareQueue->add(new ErrorHandlerMiddleware());
return $middlewareQueue;
}
}
In addition to adding to the end of the MiddlewareQueue
you can do
a variety of operations:
$layer = new \App\Middleware\CustomMiddleware;
// Added middleware will be last in line.
$middlewareQueue->add($layer);
// Prepended middleware will be first in line.
$middlewareQueue->prepend($layer);
// Insert in a specific slot. If the slot is out of
// bounds, it will be added to the end.
$middlewareQueue->insertAt(2, $layer);
// Insert before another middleware.
// If the named class cannot be found,
// an exception will be raised.
$middlewareQueue->insertBefore(
'Cake\Error\Middleware\ErrorHandlerMiddleware',
$layer
);
// Insert after another middleware.
// If the named class cannot be found, the
// middleware will added to the end.
$middlewareQueue->insertAfter(
'Cake\Error\Middleware\ErrorHandlerMiddleware',
$layer
);
In addition to applying middleware to your entire application, you can apply middleware to specific sets of routes using Connecting Scoped Middleware.
After the middleware queue has been prepared by the application, the
Server.buildMiddleware
event is triggered. This event can be useful to add
middleware from plugins. Plugins can register listeners in their bootstrap
scripts, that add middleware:
// In ContactManager plugin bootstrap.php
use Cake\Event\EventManager;
EventManager::instance()->on(
'Server.buildMiddleware',
function ($event, $middlewareQueue) {
$middlewareQueue->add(new ContactPluginMiddleware());
});
Middleware and the new HTTP stack are built on top of the PSR-7 Request & Response Interfaces. While all middleware will be exposed to these interfaces, your controllers, components, and views will not.
The RequestInterface
provides methods for interacting with the headers,
method, URI, and body of a request. To interact with the headers, you can:
// Read a header as text
$value = $request->getHeaderLine('Content-Type');
// Read header as an array
$value = $request->getHeader('Content-Type');
// Read all the headers as an associative array.
$headers = $request->getHeaders();
Requests also give access to the cookies and uploaded files they contain:
// Get an array of cookie values.
$cookies = $request->getCookieParams();
// Get a list of UploadedFile objects
$files = $request->getUploadedFiles();
// Read the file data.
$files[0]->getStream();
$files[0]->getSize();
$files[0]->getClientFileName();
// Move the file.
$files[0]->moveTo($targetPath);
Requests contain a URI object, which contains methods for interacting with the requested URI:
// Get the URI
$uri = $request->getUri();
// Read data out of the URI.
$path = $uri->getPath();
$query = $uri->getQuery();
$host = $uri->getHost();
Lastly, you can interact with a request’s ‘attributes’. CakePHP uses these attributes to carry framework specific request parameters. There are a few important attributes in any request handled by CakePHP:
base
contains the base directory for your application if there is one.webroot
contains the webroot directory for your application.params
contains the results of route matching once routing rules have been
processed.session
contains an instance of CakePHP’s Session
object. See
Accessing the Session Object for more information on how to use the session
object.The methods available to create a server response are the same as those available when interacting with Response Objects. While the interface is the same the usage scenarios are different.
When modifying the response, it is important to remember that responses are immutable. You must always remember to store the results of any setter method. For example:
// This does *not* modify $response. The new object was not
// assigned to a variable.
$response->withHeader('Content-Type', 'application/json');
// This works!
$newResponse = $response->withHeader('Content-Type', 'application/json');
Most often you’ll be setting headers and response bodies on requests:
// Assign headers and a status code
$response = $response->withHeader('Content-Type', 'application/json')
->withHeader('Pragma', 'no-cache')
->withStatus(422);
// Write to the body
$body = $response->getBody();
$body->write(json_encode(['errno' => $errorCode]));
Middleware can either be implemented as anonymous functions (Closures), or as
invokable classes. While Closures are suitable for smaller tasks they make
testing harder, and can create a complicated Application
class. Middleware
classes in CakePHP have a few conventions:
Middleware
. For example:
LinkMiddleware
.While not a formal interface (yet), Middleware do have a soft-interface or ‘protocol’. The protocol is as follows:
__invoke($request, $response, $next)
.ResponseInterface
.Middleware can return a response either by calling $next
or by creating
their own response. We can see both options in our simple middleware:
// In src/Middleware/TrackingCookieMiddleware.php
namespace App\Middleware;
class TrackingCookieMiddleware
{
public function __invoke($request, $response, $next)
{
// Calling $next() delegates control to the *next* middleware
// In your application's queue.
$response = $next($request, $response);
// When modifying the response, you should do it
// *after* calling next.
if (!$request->getCookie('landing_page')) {
$response->cookie([
'name' => 'landing_page',
'value' => $request->here(),
'expire' => '+ 1 year',
]);
}
return $response;
}
}
Now that we’ve made a very simple middleware, let’s attach it to our application:
// In src/Application.php
namespace App;
use App\Middleware\TrackingCookieMiddleware;
class Application
{
public function middleware($middlewareQueue)
{
// Add your simple middleware onto the queue
$middlewareQueue->add(new TrackingCookieMiddleware());
// Add some more middleware onto the queue
return $middlewareQueue;
}
}
The SecurityHeaderMiddleware
layer makes it easy to apply security related
headers to your application. Once setup the middleware can apply the following
headers to responses:
X-Content-Type-Options
X-Download-Options
X-Frame-Options
X-Permitted-Cross-Domain-Policies
Referrer-Policy
This middleware is configured using a fluent interface before it is applied to your application’s middleware stack:
use Cake\Http\Middleware\SecurityHeadersMiddleware;
$headers = new SecurityHeadersMiddleware();
$headers
->setCrossDomainPolicy()
->setReferrerPolicy()
->setXFrameOptions()
->setXssProtection()
->noOpen()
->noSniff();
$middlewareQueue->add($headers);
New in version 3.5.0: The SecurityHeadersMiddleware
was added in 3.5.0
If your application has cookies that contain data you want to obfuscate and protect against user tampering, you may can use CakePHP’s encrypted cookie middleware to transparently encrypt and decrypt cookie data via middleware. Cookie data is encrypted with via OpenSSL using AES:
use Cake\Http\Middleware\EncryptedCookieMiddleware;
$cookies = new EncryptedCookieMiddleware(
// Names of cookies to protect
['secrets', 'protected'],
Configure::read('Security.cookieKey')
);
$middlewareQueue->add($cookies);
Note
It is recommended that the encryption key you use for cookie data, is used exclusively for cookie data.
The encryption algorithms and padding style used by the cookie middleware are
backwards compatible with CookieComponent
from earlier versions of CakePHP.
New in version 3.5.0: The EncryptedCookieMiddleware
was added in 3.5.0
CSRF protection can be applied to your entire application, or to specific scopes
by applying the CsrfProtectionMiddleware
to your middleware stack:
use Cake\Http\Middleware\CsrfProtectionMiddleware;
$options = [
// ...
];
$csrf = new CsrfProtectionMiddleware($options);
$middlewareQueue->add($csrf);
Options can be passed into the middleware’s constructor. The available configuration options are:
cookieName
The name of the cookie to send. Defaults to csrfToken
.expiry
How long the CSRF token should last. Defaults to browser session.secure
Whether or not the cookie will be set with the Secure flag. That is,
the cookie will only be set on a HTTPS connection and any attempt over normal HTTP
will fail. Defaults to false
.field
The form field to check. Defaults to _csrfToken
. Changing this
will also require configuring FormHelper.When enabled, you can access the current CSRF token on the request object:
$token = $this->request->getParam('_csrfToken');
New in version 3.5.0: The CsrfProtectionMiddleware
was added in 3.5.0
The CsrfProtectionMiddleware
integrates seamlessly with FormHelper
. Each
time you create a form with FormHelper
, it will insert a hidden field containing
the CSRF token.
Note
When using CSRF protection you should always start your forms with the
FormHelper
. If you do not, you will need to manually create hidden inputs in
each of your forms.
In addition to request data parameters, CSRF tokens can be submitted through
a special X-CSRF-Token
header. Using a header often makes it easier to
integrate a CSRF token with JavaScript heavy applications, or XML/JSON based API
endpoints.
The CSRF Token can be obtained via the Cookie csrfToken
.
Using HTTP Middleware in an existing application requires a few changes to your application.
Application
class. See the Using Middleware section
above for how to do that. Or copy the example in the app skeleton.Once those two steps are complete, you are ready to start re-implementing any application/plugin dispatch filters as HTTP middleware.
If you are running tests you will also need to update your tests/bootstrap.php by copying the file contents from the app skeleton.


regexpu is a source code transpiler that enables the use of ES6 Unicode regular expressions in JavaScript-of-today (ES5).
regexpu-core contains regexpu’s core functionality, i.e. rewritePattern(pattern, flag)
, which enables rewriting regular expressions that make use of the ES6 u
flag into equivalent ES5-compatible regular expression patterns.
To use regexpu-core programmatically, install it as a dependency via npm:
bash
npm install regexpu-core --save-dev
Then, require
it:
js
const rewritePattern = require('regexpu-core');
This module exports a single function named rewritePattern
.
rewritePattern(pattern, flags)
This function takes a string that represents a regular expression pattern as well as a string representing its flags, and returns an ES5-compatible version of the pattern.
```js rewritePattern(‘foo.bar’, ‘u’); // → ‘foo(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF])bar’
rewritePattern(‘[\u{1D306}-\u{1D308}a-z]’, ‘u’); // → ‘(?:[a-z]|\uD834[\uDF06-\uDF08])’
rewritePattern(‘[\u{1D306}-\u{1D308}a-z]’, ‘ui’); // → ‘(?:[a-z\u017F\u212A]|\uD834[\uDF06-\uDF08])’ ```
regexpu-core can rewrite non-ES6 regular expressions too, which is useful to demonstrate how their behavior changes once the u
and i
flags are added:
```js // In ES5, the dot operator only matches BMP symbols: rewritePattern(‘foo.bar’); // → ‘foo(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uFFFF])bar’
// But with the ES6 u
flag, it matches astral symbols too:
rewritePattern(‘foo.bar’, ‘u’);
// → ‘foo(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF])bar’
```
rewritePattern
uses regjsgen, regjsparser, and regenerate as internal dependencies.
| Mathias Bynens |
regexpu-core is available under the MIT license.


App Settings:
Set
“Image Directory Path”
with the browse
“Save”
button.
Add your all jewel images into this folder.
will retrieve images from this folder.


ARena: Improving the construction process of line-follower robot arenas through Projection Mapping
Select image for projection:
Step-by-Step instructions:
0) Connect projector to computer and duplicate views
1) Place the camera pointing to the projection area. Make sure the entire projection area is viewed by the camera
2) Select image for projection
3) Press 'P' to go full screen
4) Press 'Q' to capture image from camera
5) Press 'ESC' key until canvas image comes back to its original size
6) Click on the four colored points projected in the following order: Red, Green, Blue and Yellow
7) Click on the four corner points in which the image will be projected (top-left, top-right, bottom-right and bottom-left)
8) Press 'R' key to compute the calibration and render the projection
9) Press 'S' key to go full screen
10) Use the black tape to cover the projected black areas


--- layout: default title: N1grumHarenae's Page ---
Now in England
Nothing here...(for real)
About Me...


Exposing Theme Metadata
All available UI Customization Keys that can be used in Custom Themes must be defined in a dedicated *.themeMetadata.json
file which is registered via com.intellij.themeMetadataProvider
extension point.
The following minimal sample demonstrates all details required when exposing UI customization keys of your plugin’s UI.
/resources/META-INF/plugin.xml
:
<idea-plugin>
[...]
<extensions defaultExtensionNs="com.intellij">
<themeMetadataProvider path="/META-INF/MyPlugin.themeMetadata.json"/>
</extensions>
[...]
</idea-plugin>
/resources/META-INF/MyPlugin.themeMetadata.json
:
{
"name": "My Plugin",
"fixed": false,
"ui": [
{
"key": "MyComponent.border",
"description": "The border for my component. Not used anymore.",
"deprecated": true,
"source": "com.myplugin.MyComponent",
},
{
[more keys...]
}
]
}
Attributes
name
- Human-readable name, e.g., plugin namefixed
-false
by default,true
if metadata describes external elements, e.g., an UI library-
ui
- Root element listing all customization keys:key
- Customization key name (see Key Naming Scheme)description
- Description to be shown to Theme authors editing*.theme.json
filesdeprecated
-true
when key is deprecated, please provide explanation and/or replacement indescription
if availablesource
- FQN of the underlying UI component implementationsince
- The release number (e.g.[2019.2]
) when this UI customization key was exposed. A release number prior to 2019.2 is valid.
Color keys can be used via JBColor.namedColor()
providing defaults for Light and Dark theme:
private static final Color SECTION_HEADER_FOREGROUND =
JBColor.namedColor("Plugins.SectionHeader.foreground", new JBColor(0x787878, 0x999999));
Other keys can be obtained via javax.swing.UIManager#getXXX()
methods.
Key Naming Scheme
All keys must follow this Naming Pattern:
Object[.SubObject].[state][Part]Property
Property
| Word | Use for | Example |
|---|---|---|
foreground |
Text color. | Label.foreground |
background |
Background color for objects with text. | Label.background |
<part>Color |
Objects with a single color (do not have foreground/background). Do not use the word “Color” separately, always use with the “part” word. The word “Color” shows that this is a color property. Otherwise, it can be confused with a property of another type. |
Popup.borderColor Group.separatorColor |
State
| Word | Use for | Example |
|---|---|---|
Active |
Enabled components, default state. Omit this word. The default state does not need explicit naming. | Notification.background |
Inactive |
Enabled components that might be perceived as interactive but are actually not. Example: a tree with visible selection but not in focus. Goes after other state words. | Tree.inactiveBackground ToolWindow.HeaderTab.hoverInactiveBackground |
Focused |
The current focused component. | Button.focusedBorderColor |
Selected |
A selected tab or any other control that has equally meaningful selected and inactive states. | ToolWindow.HeaderTab.selectedBackground |
Hover Pressed |
An action as indicated in states. | Link.hoverForeground Link.pressedForeground |
Error Warning Success |
Validation states. See example in the guide article. | ValidationTooltip.errorBackground ValidationTooltip.warningBorderColor |
Disabled |
Unavailable components. | Label.disabledForeground |
Part
A part is an internal element of a component, e.g., an arrow button in a combo box. Create a separate key for a part if its properties differ from the parent object.
If a part is common among several components, use the same name for it. Notable examples of common parts:
| Common parts | Use for | Example |
|---|---|---|
Accelerator Shortcut |
Shortcut foreground. | Menu.acceleratorForeground Editor.shortcutForeground |
Border |
A line around a component. | NavBar.borderColor |
Caret |
The vertical line that denotes typing place. | TextField.caretForeground |
ModifiedItem |
An object that has been modified but not yet saved. Example: change anything in the Settings dialog, the setting group name in the tree becomes blue. |
Tree.modifiedItemForeground |
Focus |
Wide focus border around a component. | Component.focusColor “Component” is a special key that sets common properties for several basic input components. |
Info |
Secondary labels with additional useful information. Usually appear in gray color to the right or below a regular label. | CompletionPopup.infoForeground |
Icon |
An icon that is created with a source code (not an image file). | Table.sortIconColor |
Selection |
The focus place in a component with selectable text. Can be in a typed text or in a list or tree. Goes before other state words (for historical reasons). |
TextField.selectionForeground Tree.selectionInactiveBackground |
Separator |
A horizontal or vertical line inside a component. Can be with a label. | Menu.separatorColor |
Shadow |
A shadow below a component. | Button.shadowColor |
SubObject
Use a subobject when creating keys for one of the following:
- An implementation variation. Usually has a similar set of UI property keys as the parent object. Examples:
- Default button:
Button.Default.background
- Tool window notification:
Notification.ToolWindow.errorBackground
- Default button:
- An internal smaller component of a complex component with its own UI and behavior. Examples:
- Tool window tab:
ToolWindow.HeaderTab.inactiveBackground
- The hint text at the bottom of a popup:
Popup.Advertiser.background
- Tool window tab:
Gradient Color
If a component has a gradient color, add the words “start” and “end” for the beginning and ending of a gradient. Examples:
Button.startBorderColor
/Button.endBorderColor
SearchMatch.startBackground
/SearchMatch.endBackground
Capitalization
Capitalize Object and SubObject. Use lowerCamelCase for property.
Do not use
| Do not use | Use instead |
|---|---|
Color as a separate word |
<Part>Color |
Outline |
borderColor |
Text |
Foreground |
darcula and other look-and-feel names |
Omit |
Swing legacy
Some color keys are not named according to the rules above. Such keys are inherited from Java Swing and cannot be renamed for compatibility reasons. Do not use naming patterns from the legacy keys.
Examples of Swing keys:
activeCaption
Correct:WindowsDialogHeader.background
Button.disabledText
Correct:Button.disabledForeground
TableHeader.background
Correct:Table.Header.background
IntelliJ Platform Metadata
Metadata is split up as follows:
IntelliJPlatform.themeMetadata.json
- all keys from IntelliJ Platform and custom UI componentsJDK.themeMetadata.json
- all keys from Swing components
New keys should be added to IntelliJPlatform.themeMetadata.json
only (or corresponding “local” *.themeMetadata.json
file of the plugin if applicable).
Please make sure to add a description
and use since
and deprecated
attributes explained in Attributes. Respect Key Naming Scheme and keep alphabetical ordering of keys.


Pope Francis arrives in Thailand at start of Asia trip
Pope Francis arrived in Thailand on Wednesday (November 20) to meet with the country's small but devoted Catholic minority on a seven-day Asian trip that will include a family reunion in Bangkok and take his anti-nuclear message to Japan.
The pope's plane touched down outside Bangkok around midday for a visit that coincides with the 350th anniversary of the first papal mission in Siam, the former name of Thailand.
Catholics are a tiny minority in mostly Buddhist Thailand, accounting for less than 2% of the population.
Waiting for a glimpse of the pontiff, excited Catholics thronged around the Vatican's Bangkok embassy and St. Louis Hospital to take selfies.
"I'm so happy when he waved his hand, I was so delightful. This is the greatest moment of being Christian," said 54-year-old devotee, Nathita Laomanotham who has been waiting for pope motorcade since morning.
The pope's plane touched down outside Bangkok around midday and he descended to a red-carpet airport welcome from church leaders for a visit that coincides with the 350th anniversary of the first papal mission in Siam, the former name of Thailand.


to expend money with the expectation of achieving a profit or material result by putting it into financial schemes, shares, or property, or by using it to develop a commercial venture:
Now that you know the definition, you can begin to understand the basics. As mentioned above, you can invest in shares of stock, property, or other types of commerical ventures. The idea is to use your money to make more money in return and this is where you must pick your route. I will present many possible routes but as an invester, it is your job to do the research.


|
| static JTable | table |
| |
| static Object [][] | rowData |
| |
| static String | columnNames [] = { "S.No.","Title","Author(s)" ,"Year", "Volume","Pages","Journal/Booktitle","Url" } |
| |
§ ResultPanel()
| ResultPanel.ResultPanel |
( |
| ) |
|
§ buildGui()
| void ResultPanel.buildGui |
( |
| ) |
|
|
private |
§ getPane()
| JScrollPane ResultPanel.getPane |
( |
| ) |
|
§ updateData()
| static void ResultPanel.updateData |
( |
Object |
_data[][], |
|
|
String [] |
colData |
|
) |
| |
|
static |
§ updateTable()
| static void ResultPanel.updateTable |
( |
| ) |
|
|
static |
§ columnNames
| String ResultPanel.columnNames[] = { "S.No.","Title","Author(s)" ,"Year", "Volume","Pages","Journal/Booktitle","Url" } |
|
staticprivate |
§ pane
| JScrollPane ResultPanel.pane |
|
private |
§ rowData
| Object [][] ResultPanel.rowData |
|
staticprivate |
Initial value:={
{" "," "," "," "," "," "," "," "}
}
§ table
The documentation for this class was generated from the following file: