Our Team Members
Yazan Tafesh I am a civil engineer that graduated from the University of Jordan, I am new to the software development field and looking forward to becoming a respectful full stack developer. 🤔
Fatima Alshraa I am Radiologic technician, and I want to become a software developer in the future. 😎
Osama Baker I'm new to programming. I aspire to be a full stack developer capable of producing high end websites and apps. 😊
Ahmad Alsayed I hold a BSc degree in civil engineering. I seek to advance my programming skills hoping to get a career position at the place that I can achieve fulfillment. 🧐
Amro Albarham I am an electrical engineer I wanna be a professional software developer And to be distinguished in my work. 😈
Bahaa' Qasim I'm Bahaa' Qasim , I Studied Cis , I am interested in technology i aspire to improve my technical knowledge and be a professional full stack developer 🤠


Initially, User must enter Access Code in order to get authority to change page settings. User must input the correct Access Code. If the Access Code is incorrect, User is not allowed to change web page settings. In order to change settings, Users are given various options with their respective text boxes. User must click on the text box to produce the colour icon and then pick a colour. It will show the selected colour on the text box by changing the text box colour and, at the same time, changing all the selected settings on the web page. Press “Save” to apply all settings on the web page. If a User does not press “Save,” no change will be applicable on web page. If, by chance, User selected the wrong colour and wants to go to the default colours, User can select the link at the bottom of the Settings panel to change all the colours to default colours.
Created with the Personal Edition of HelpNDoc: Free Web Help generator


| 1 |
Choi_2017 |
Novel Pharmacological Activity of Artesunate and Artemisinin: Their Potential as Anti-Tubercular Agents |
Choi, Won Hyung |
2017 |
2017-03-10 |
COMM-USE |
N |
PMC5372999 |
28287416.0 |
10.3390/jcm6030030 |
tm99olh4 |
0.717825 |
|
Zhao_2016, Zhong_2009 |
| 2 |
Liu_J_2007 |
Treatment of lycorine on SCID mice model with human APL cells |
Liu, J.; Li, Y.; Tang, L.J.; Zhang, G.P.; Hu, W.X. |
2007 |
2007-05-31 |
PMC |
N |
PMC7126558 |
17336028.0 |
10.1016/j.biopha.2007.01.003 |
nt11f2x8 |
0.653383 |
|
|
| 3 |
McNulty_2009 |
Structure-activity studies on the lycorine pharmacophore: A potent inducer of apoptosis in human leukemia cells |
McNulty, James; Nair, Jerald J.; Bastida, Jaume; Pandey, Siyaram; Griffin, Carly |
2009 |
2009-05-31 |
PMC |
N |
PMC7111684 |
19464034.0 |
10.1016/j.phytochem.2009.04.012 |
wigi4or3 |
0.487486 |
|
Dude_2008 |
| 4 |
Ishag_2016 |
Griffithsin binds to the glycosylated proteins (E and prM) of Japanese encephalitis virus and inhibit its infection |
Ishag, Hassan Z.A.; Li, Chen; Wang, Fengjuan; Mao, Xiang |
2016 |
2016-04-02 |
PMC |
N |
PMC7114533 |
26820432.0 |
10.1016/j.virusres.2016.01.016 |
nje6gl83 |
0.472131 |
|
|
| 5 |
Fang_2013 |
Identification of Three Antiviral Inhibitors against Japanese Encephalitis Virus from Library of Pharmacologically Active Compounds 1280 |
Fang, Jin'e; Sun, Leqiang; Peng, Guiqing; Xu, Jia; Zhou, Rui; Cao, Shengbo; Chen, Huanchun; Song, Yunfeng |
2013 |
2013-11-04 |
COMM-USE |
N |
PMC3857149 |
24348901.0 |
10.1371/journal.pone.0078425 |
xkqxawj2 |
0.464293 |
|
Hu_H_2019 |
| 6 |
Pandey_2018 |
Broad-spectrum neutralization of avian influenza viruses by sialylated human milk oligosaccharides: in vivo assessment of 3′-sialyllactose against H9N2 in chickens |
Pandey, Ramesh Prasad; Kim, Dae Hee; Woo, Jinsuk; Song, Jaeyoung; Jang, Sang Ho; Kim, Joon Bae; Cheong, Kwang Myun; Oh, Jin Sik; Sohng, Jae Kyung |
2018 |
2018-02-07 |
COMM-USE |
N |
PMC5803236 |
29416087.0 |
10.1038/s41598-018-20955-4 |
53lnboez |
0.445726 |
|
|
| 7 |
Patil_2015 |
Phosphonooxymethyl Prodrug of Triptolide: Synthesis, Physicochemical Characterization, and Efficacy in Human Colon Adenocarcinoma and Ovarian Cancer Xenografts |
Patil, Satish; Lis, Lev G.; Schumacher, Robert\nJ.; Norris, Beverly J.; Morgan, Monique L.; Cuellar, Rebecca A. D.; Blazar, Bruce R.; Suryanarayanan, Raj; Gurvich, Vadim J.; Georg, Gunda I. |
2015 |
2015-11-24 |
PMC |
N |
PMC4678411 |
26596892.0 |
10.1021/acs.jmedchem.5b01329 |
zhf8jdcl |
0.436422 |
David_2013 |
Mehellou_2010, McGuigan_2013 |
| 8 |
Hu_H_2019 |
Antiviral activity of Piscidin 1 against pseudorabies virus both in vitro and in vivo |
Hu, Han; Guo, Nan; Chen, Shuhua; Guo, Xiaozhen; Liu, Xiaoli; Ye, Shiyi; Chai, Qingqing; Wang, Yang; Liu, Binlei; He, Qigai |
2019 |
2019-07-31 |
COMM-USE |
N |
PMC6670175 |
31366370.0 |
10.1186/s12985-019-1199-4 |
de1lmzl1 |
0.418772 |
|
Zhong_2009 |
| 9 |
Taherkhani_2013 |
In Vitro Anti-rotaviral Activity of Achillea kellalensis |
Taherkhani, Reza; Farshadpour, Fatemeh; Makvandi, Manoochehr |
2013 |
2013-07-17 |
COMM-USE |
N |
PMC3941895 |
24624203.0 |
|
qebswt0o |
0.403082 |
|
|
| 10 |
Barnard_2008 |
Is the anti-psychotic, 10-(3-(dimethylamino)propyl)phenothiazine (promazine), a potential drug with which to treat SARS infections? Lack of efficacy of promazine on SARS-CoV replication in a mouse model |
Barnard, Dale L.; Day, Craig W.; Bailey, Kevin; Heiner, Matthew; Montgomery, Robert; Lauridsen, Larry; Jung, Kie-Hoon; Li, Joseph K.-K.; Chan, Paul K.S.; Sidwell, Robert W. |
2008 |
2008-08-31 |
None |
N |
PMC2582943 |
18423639.0 |
10.1016/j.antiviral.2007.12.005 |
envplcno |
0.403009 |
|
Saijo_2005, Zhao_2016, Li_J_2006, de_Oliveira_2013 |
| 11 |
Zhong_2009 |
Antiviral activity of Arbidol against Coxsackie virus B5 in vitro and in vivo |
Zhong, Qiong; Yang, Zhanqiu; Liu, Yuanyuan; Deng, Haiying; Xiao, Hong; Shi, Liqiao; He, Jing |
2009 |
2009-03-17 |
PMC |
N |
PMC7086808 |
19291363.0 |
10.1007/s00705-009-0346-4 |
ckm0ol20 |
0.391030 |
|
|
| 12 |
Sebastian_2009 |
Pentoxifylline inhibits replication of Japanese encephalitis virus: a comparative study with ribavirin |
Sebastian, Liba; Desai, Anita; Madhusudana, Shampur Narayan; Ravi, Vasanthapuram |
2009 |
2009-02-28 |
PMC |
N |
PMC7126905 |
18804347.0 |
10.1016/j.ijantimicag.2008.07.013 |
q3fyo3rx |
0.355758 |
|
Zhong_2009 |
| 13 |
Collins_2008 |
Cystatin D, a natural salivary cysteine protease inhibitor, inhibits coronavirus replication at its physiologic concentration |
Collins, A. R.; Grubb, A. |
2008 |
2008-06-28 |
PMC |
N |
PMC7167923 |
9573825.0 |
10.1111/j.1399-302x.1998.tb00753.x |
84bcvgq9 |
0.354361 |
|
|
| 14 |
Chang_2012 |
Antiviral Activity of Isatis indigotica Extract and Its Derived Indirubin against Japanese Encephalitis Virus |
Chang, Shu-Jen; Chang, Yi-Chih; Lu, Kai-Zen; Tsou, Yi-Yun; Lin, Cheng-Wen |
2012 |
2012-07-17 |
COMM-USE |
N |
PMC3405817 |
22911608.0 |
10.1155/2012/925830 |
m86ty1r0 |
0.349803 |
|
|
| 15 |
Hsiang_2009 |
Emodin is a novel alkaline nuclease inhibitor that suppresses herpes simplex virus type 1 yields in cell cultures |
Hsiang, C-Y; Ho, T-Y |
2009 |
2009-01-29 |
PMC |
N |
PMC2538697 |
18552872.0 |
10.1038/bjp.2008.242 |
s7w70kqy |
0.348555 |
|
|
| 16 |
Pérard-Viret_2017 |
Chapter Four Cephalotaxus Alkaloids |
Pérard-Viret, Joëlle; Quteishat, Laith; Alsalim, Rana; Royer, Jacques; Dumas, Françoise |
2017 |
2017-12-31 |
PMC |
N |
PMC7110560 |
28838429.0 |
10.1016/bs.alkal.2017.07.001 |
m3mhj6op |
0.342591 |
|
Gondim_2019 |
| 17 |
Weiss_1989 |
Inhibitory effects of ribavirin alone or combined with human alpha interferon on feline infectious peritonitis virus replication in vitro |
Weiss, Richard C.; Oostrom-Ram, Theresia |
1989 |
1989-07-31 |
PMC |
N |
|
2549687.0 |
10.1016/0378-1135(89)90049-7 |
nrvk1a7q |
0.333233 |
|
|
| 18 |
Pervez_2011 |
Synthesis and Toxicity Evaluation of Some N(4)-Aryl Substituted 5-Trifluoromethoxyisatin-3-thiosemicarbazones |
Pervez, Humayun; Saira, Naveeda; Iqbal, Mohammad Saeed; Yaqub, Muhammad; Khan, Khalid Mohammed |
2011 |
2011-07-29 |
COMM-USE |
N |
PMC6264754 |
25134761.0 |
10.3390/molecules16086408 |
a7hiw0vw |
0.333176 |
David_2013 |
Pomeisl_2019, Głowacka_2015, Głowacka_2016, Carbone_2013 |
| 19 |
Paragas_2005 |
Interferon alfacon1 is an inhibitor of SARS-corona virus in cell-based models |
Paragas, Jason; Blatt, Lawrence M.; Hartmann, Chris; Huggins, John W.; Endy, Tim P. |
2005 |
2005-06-30 |
PMC |
N |
PMC7114208 |
15911026.0 |
10.1016/j.antiviral.2005.01.002 |
o8ygdd14 |
0.333125 |
|
|
| 20 |
Lim_J_2020 |
The Author's Response: Case of the Index Patient Who Caused Tertiary Transmission of Coronavirus Disease 2019 in Korea: the Application of Lopinavir/Ritonavir for the Treatment of COVID-19 Pneumonia Monitored by Quantitative RT-PCR |
Lim, Jaegyun; Jeon, Seunghyun; Shin, Hyun Young; Kim, Moon Jung; Seong, Yu Min; Lee, Wang Jun; Choe, Kang Won; Kang, Yu Min; Lee, Baeckseung; Park, Sang Joon |
2020 |
2020-01-01 |
NONCOMM |
N |
|
32080993.0 |
10.3346/jkms.2020.35.e89 |
fjmchbew |
0.327736 |
|
|
| 21 |
Morán-Santibañez_2018 |
Virucidal and Synergistic Activity of Polyphenol-Rich Extracts of Seaweeds against Measles Virus |
Morán-Santibañez, Karla; Peña-Hernández, Mario A.; Cruz-Suárez, Lucia Elizabeth; Ricque-Marie, Denis; Skouta, Rachid; Vasquez, Abimael H.; Rodríguez-Padilla, Cristina; Trejo-Avila, Laura M. |
2018 |
2018-08-30 |
COMM-USE |
N |
PMC6164608 |
30200234.0 |
10.3390/v10090465 |
4glq9iqo |
0.302928 |
|
|
| 22 |
Kwon_2015 |
In vitro anti-reovirus activity of kuraridin isolated from Sophora flavescens against viral replication and hemagglutination |
Kwon, Hyung-Jun; Jeong, Jae-Ho; Lee, Seung Woong; Ryu, Young Bae; Jeong, Hyung Jae; Jung, Kyungsook; Lim, Jae Sung; Cho, Kyoung-Oh; Lee, Woo Song; Rho, Mun-Chual; Park, Su-Jin |
2015 |
2015-08-31 |
PMC |
N |
|
26076959.0 |
10.1016/j.jphs.2015.04.007 |
6uuitwip |
0.300607 |
|
|


HTTP is the protocol underlying the Web. The protocol is agnostic to the content it carries - while it was originally designed to carry HTML documents it is now used to transport image files, Postscript documents, PowerPoint files and almost anything. This includes media files, the subject of this book.
Content is delivered from a Web site by means of HTTP servers. The most well-known of these is Apache, but in the Linux world Nginx and Lighttpd are also common. There are a number of proprietary servers as well.
An HTTP server can deliver static files stored on the server, or construct content dynamically from e.g. a database connection.
Point the browser to the URL of an audio file and it will pass the content to a helper which will attempt to play the file. The browser will choose the helper based on the file extension of the URL, or based on the Content-Type of the file as delivered in the HTTP header from the HTTP server.
MPlayer is HTTP-aware: just give the URL of the file
mplayer http://localhost/audio/enigma/audio_01.ogg
VLC is also HTTP-aware: just give the URL of the file
vlc http://localhost/audio/enigma/audio_01.ogg
If you download a file from the Web, then you can play it once it has finished downloading. This means that play is delayed until the entire file has been saved into the local file file system. On the other hand, since it is now local it can play without worrying about network delays. A simple shell script to illustrate this is
wget -O tmp http://localhost/audio/enigma/audio_01.ogg
mplayer tmp
rm tmp
The alternative is to read the resource from the Web and hand it as it is received to a player, using some sort of pipeline. This is fine as long as the pipeline is large enough to buffer enough of the resource that it can cope with network delays. It is illustrated by
wget -O - http://localhost/audio/enigma/audio_01.ogg | mplayer -
(Yes, I know, mplayer can stream URLs directly - I'm using this way it for the point I'm making.).


title: Case Studies description: Crate is an open source database built with familiar SQL syntax with replication, sharding and Lucene indexes in one complete package. {% extends "base.html" %} {% block header %}
{{ post.author|title }} {{ post.date|date }}
{{ post.raw_body|markdown|striptags|truncatewords:75 }}


.text-(primary|secondary|success|danger|warning|info|light|dark|body|muted|white|black-50|white-50)
.color-black-50
and .color-white-50
set translucent colors with 50% opacity.span.text-(primary|secondary|...)
.text-primary
.text-secondary
.text-success
.text-danger
.text-warning
.text-info
.text-light
.text-dark
.text-body
.text-muted
.text-white
.text-black-50
.text-white-50
a.text-(primary|secondary|...)
.bg-(primary|secondary|success|danger|warning|info|light|dark|white|transparent)
.bg-transparent
is used to remove default background colors. See Cards - Mixin utilities example.Utility for setting CSS display
property (see CSS reference for detail).
.d(-sm|-md|-lg|-xl)?-(none|inline|inline-block|block|...)
.d-
apply as default (xs).d-sm-
apply for sm(≧576px) breakpoint
.d-md-
apply for md(≧768px) breakpoint
.d-lg-
apply for lg(≧992px) breakpoint
.d-xl-
apply for xl(≧1200px) breakpoint
display
propertynone
inline
inline-block
block
table
table-cell
table-row
flex
inline-flex
Division elements forced as inline div.d-inline
⇒ arranged horizontally
div.d-inline
div.d-inline
Span elements forced as block span.d-block
⇒ arranged vertically
span.d-block
span.d-block
(1) e.g. setting for hiding a block element on md (768px≤width<992px) only (least to most prior).
display:block
as default.d-md-none
hide for md (and above) (overrides default).d-lg-block
display as a block for lg and above (most prior)Sample for all cases (see source for detail)
(2) e.g. setting for display as a block element on md (768px≤width<992px) only (least to most prior)
.d-none
hide element as default.d-md-block
display on md (and above).m-lg-none
hide on lg and above (most prior)Sample for all cases (see source for detail)
Use .d-print-(none|inline|inline-block|block|...)
for changing display setting only on printing.
Responsive setting (structure) for embedded objects.
div.embed-responsive.embed-responsive-(21by9|16by9|4by3|1by1)
(iframe|embed|video|object).embed-responsible-item
src="..."
Parent's (21by9|16by9|4by3|1by1)
specifies aspect ratio.
21by9
21:9 - Ultra-Widescreen16by9
16:9 - HD TV (Hi-Vision)4by3
4:3 - SD(traditional) TV1by1
1:1 - Square


User Experience
The Greatest Hits
|
|
-
Davi Vieira
-
Software Engineer
-
Javascript fan-boy
-
Cooking Enthusiast
-
Knowledge Sharer
|
Question #01
When did we start to think about UX?
Wait... that's not the correct question.
Question #1
Why do we care about UX?
What are we going to talk about today?
-
Information Architecture
-
User Research
-
User's Psychology
-
Storytelling
|
|
Definition:
Structural design of an information systems, interactive systems, and
user experiences. The organization, search, and the navigation systems
that help people to complete tasks, find what they need, and
understand what they've found.
Wait! There's a better way to understand this topic!
Confusion
??????????????????????????????
Something needed to be done!
Information Architects and the...
Website Tree
Question #2
And then, something dramatic happened...
What?
Ups! Trouble...
Question #3
What is IA all about?
Organization
How to organize?
Flat x Deep
User Research
Understanding your product!
Question #4
In which stage of development should we use User Research?
Ok. Let's see how...
|
x |
|
Since we need ways to do it...
Let's meet them
Why?
-
Why users prefer a website over another?
-
Why user clicks first this button than that one?
-
Why do people share my product?
-
Why one page design will be better then other?
Intuition
Understand the effect of your actions without use of reason
What makes a product intuitive?
What makes an experience?
Emotions
It all starts here
Gain
|
x |
Loss
|
| When I feel... |
...I use |
| Lonely |
Facebook |
| Hungry |
Yelp, Grubhub |
| Unsure |
Google |
| Anxious |
Email |
| Lost |
GPS |
| Mentally Fatigued |
ESPN, E! |
Motivation
Why people do things? And why others don't do what we want them to do?
1. BJ Fogg's Behavior Model
Behavior = Motivation + Ability + Triggers
Do it now!
2. Psychological Flow State
The Habit Forming programs
Question #5
Name the keywords of User's Psychology
Storytelling
What history does your product tells?
-
Human's attention is a must-have
-
People can focus for 90min (max)
-
This is not about marketing!
“People think that stories are shaped by people. In fact, it’s the
other way around.”
—Terry Pratchett, English fantasy author
Question #6
Which are the elements of a story?
-
What users are trying to achieve?
-
Who are the users?
-
How do you reflect the overall obstacles users must overcome?
-
What kind of approach will you take?
-
will the overall design pattern appear pleasant and predictable
to users, moving them emotionally?
-
Which kind of design match the user: classic or modern?
-
Why your story will be memorable?
User Journey
and the Experience Mapping
What do you remember?
Peak-end rule
Example:
How do I apply storytelling?
Character
Plot + Conflict
Journey along the app
Environment
Where your story will fit?


The Struts Utilities Package offers several families of classes that assist in solving commonly encountered problems when building web applications. Most of the classes in this package do not rely on the controller servlet framework, or the custom tag libraries, so they are also suitable for general Java application programming. The following families are included:
java.util.Locale
object representing a
particular user's preferred language.FIXME
Version 1.2 of the Java 2 Standard Edition (J2SE) introduced a powerful
set of collection classes that are generally useful in Java programming, based
on the fundamental interfaces java.util.Collection
,
java.util.List
, java.util.Map
, and
java.util.Set
. Compared to the collection classes available in
JDK 1.1 (principally java.util.Hashtable
and
java.util.Vector
), the new classes offer much richer functionality
as well as the opportunity to improve performance.
The performance increase potential comes from the fact that none of the
methods used to access the new collection classes are synchronized
as were the methods of Hashtable
and Vector
. In a
single thread application, this means that method calls can execute much more
quickly because synchronization is never necessary. In a multiple thread
environment, though, it is up to the developer to ensure that any method calls
made while another thread is modifying the collection must be synchronized.
There are many cases in multithreaded server environments (such as a web
application) where data structures are initialized at application startup
time, and are then predominantly accessed in a read-only manner. An example
of this is the Struts controller application, which initializes its collection
of ActionMapping
instances (each corresponding to an
<action>
element in the struts-config.xml
file) at startup time. However, it is legal for an application to dynamically
change the set of available mappings while the application is running -- so,
to be safe, it would normally be necessary to synchronize access to such
collections, even though 99% of those accesses are read only and would not
otherwise require synchronization.
To deal with such scenarios, the Struts utility package includes a series of specialized collection classes designed to operate in a multithread environment where the large majority of accesses are read only, without requiring synchronization on every operation, but still protecting against the possibility of runtime modifications to the underlying collection.
Each of the available collection classes operates in one of two modes:
fast or slow. When first created, the collection operates
in slow mode, which is appropriate for initially populating the
contents of the collection. Once the initial population is complete, switch
to fast mode by calling setFast(true)
for maximum
performance when most accesses are read-only.
When operating in slow mode, all methods that access this
collection, even read-only methods, are synchronized - resulting in impacts on
performance similar to that always performed by the Hashtable
and
Vector
classes. This mode is appropriate when you are
initializing the content of the collection, or when you need to perform a large
series of updates.
Using fast mode, on the other hand, causes method calls to operate in the following manner:
As you can see, modification operations are much more expensive when operating in fast mode, but doing things in this way allows read only operations, which should be the vast majority, to operate at maximum speed.
If your collection will never be accessed in a multithread environment, you should use one of the standard collection classes instead, without synchronization, for maximum performance.
The following collection classes, with the ability to operate in either fast or slow mode, are included:
java.util.ArrayList
.java.util.HashMap
.java.util.TreeMap
.A large number of web applications require interaction with a relational database to access or update persistently stored information. In a typical client-server application, each concurrent user opens their own database connection at program initialization, and uses this connection throughout the period of time the application is open.
While this approach can work well in an environment where the number of active users is reasonably fixed, it does not scale well to a web application where the number of simultaneous users could be very large. In addition, open database connections (even when not actively used) do impose some overhead costs, and most web application users (at a given instant) are reviewing the contents of a previously generated page (or typing in their next set of input information), rather than actively accessing the database.
To deal with this situation, several basic strategies are possible:
The first strategy has the virtue of simplicity - you merely need to open a database connection any time you need one, perform the appropriate data accesses and updates, and close the connection. However, it suffers from a major disadvantage: on most databases, establishing a connection can be very time consuming (often requiring multiple seconds of clock time), in order to perform a database transaction that might take milliseconds.
Opening a connection per user, as the second strategy suggests, is similar to the approach taken with client-server applications described earlier. As long as the number of simultaneous users can be controlled at a manageable number (such as with many intranet-based applications), this approach is feasible. However, it becomes unmanageable when the number of users can climb rapidly to very large numbers (as is typical of many Internet-hosted public applications), and still requires more overhead than a strategy that would share a smaller number of connections.
Connection pooling is an implementation of the third strategy. It is based on the assumption that most users of a web application will be interacting locally with the last page that was sent to their browser. The number of users actually performing a request at any given time is usually a very small percentage of the total number of active users, and during request processing is the only time that a database connection is required.
Struts provides a simple connection pool class called
org.apache.struts.util.GenericDataSource
. It allows you to
configure a set of connections (with identical connection parameters) to a
particular database, using a particular JDBC driver, and then share those
connections among a number of simultaneously operating threads (such as the
various request threads that are concurrently active in a servlet container).
The GenericDataSource
class implements the
javax.sql.DataSource
interface from the Java Database Connectivity
(version 2.0) Standard Extension API, so any programs you use to access it
should reference this interface, rather than the class name directly.
That way, you can migrate to a more advanced connection pool implementation
later, with little or no impact on your application.
For more information about the JDBC 2.0 Standard Extension API, you can download the spec (and the corresponding API classes), from http://java.sun.com/products/jdbc. You can also find pointers to a substantial amount of other information about available JDBC drivers, programming tutorials, and so on, at this web address.
The following instructions show you how to configure the connection pool class and use it, from any Java application. As you will see below, the Struts controller servlet offers you convenient mechanisms to configure one or more connection pools, and make them available to Action classes and JSP pages by storing the connection pool instances as servlet context attributes (in JSP terms, application-scope beans).
To configure a GenericDataSource
instance, you must first
create one:
GenericDataSource dataSource = new GenericDataSource();
Next, you must set the appropriate properties, by calling the corresponding JavaBeans property setter methods provided by this class. (See the Javadoc API for the GenericDataSource class for more details on the available properties). An example of configuring the connection pool object to a Postgres database might look like this:
dataSource.setAutoCommit(false); dataSource.setDescription("My Database Connection Pool"); dataSource.setDriverClass("org.postgresql.Driver"); dataSource.setMaxCount(4); dataSource.setMinCount(1); dataSource.setPassword("mypassword"); dataSource.setUrl("jdbc:postgresql://localhost/mydatabase"); dataSource.setUser("myusername");
Finally, you must open()
the connection pool. This will
establish the initial connections to the database (based on the value you have
configured for the minCount
property). As you use connections
from the pool in multiple threads, additional connections (up to the number
you specify with the maxCount
property) will be created as needed.
try { dataSource.open(); } catch (SQLException e) { ... deal with exception ... }
When you are completely through with the connection pool, you can gracefully close all of the currently open database connections by executing
try { dataSource.close(); } catch (SQLException e) { ... deal with exception ... }
To access the database from within an application class, you must follow a simple four-step procedure each time you need a connection:
An example code sequence that performs this procedure might look like this:
DataSource dataSource = ... acquire reference to dataSource ... Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; try { conn = dataSource.getConnection(); stmt = conn.prepareStatement("SELECT cust_id, name FROM customers" + " WHERE (last_purchase_date >= ?)" + " ORDER BY name"); stmt.setDate(1, lastPurchaseDate); rs = stmt.executeQuery(); while ((row = rs.next()) != null) { ... process this row ... } rs.close(); rs = null; stmt.close(); stmt = null; conn.commit(); conn.close(); conn = null; } catch (SQLException e) { if (rs != null) { try { rs.close(); } catch (SQLException f) { ; } rs = null; } if (stmt != null) { try { stmt.close(); } catch (SQLException f) { ; } stmt = null; } if (conn != null) { try { conn.rollback(); } catch (SQLException f) { ... deal with exception ... } } ... deal with exception ... } finally { if (conn != null) { try { conn.close(); } catch (SQLException f) { ... deal with exception ... } conn = null; } }
One aspect of the above code example that might surprise developers who
have previously used JDBC connections individually is the idea of calling
close() on the Connection. Normally, this call will sever the Connection's
underlying link to the database, and render that Connection unuseable for
any further operations. However, when used in a connection pool environment,
the actual Connection you receive by calling getConnection()
is a customized "wrapper" around a real JDBC Connection instance. Calling
close()
on this wrapper simply causes this connection to be
returned to the pool.
What would happen if your application failed to return a connection to the pool when it was through? As you might expect, that particular connection becomes "lost" to the server, and can never again be used (even though it remains connected to the database throughout the life of the connection pool itself). If this happens repeatedly, you will eventually exhaust the pool of available connections, and application processing will stop.
To avoid this problem, your application logic must ensure that it
ALWAYS returns allocated connections to the pool, no matter
what problems might happen in the interim. The Java language provides one
convenient mechanism to achieve this - using a finally
block,
as in the code example above. This is not the only way to ensure that a
connection is always returned, but it is very convenient.
If your application is running underneath the Struts controller servlet
(org.apache.struts.action.ActionServlet
), you can take advantage
of the servlet's ability to preconfigure one or more connection pools for you,
based on information included in the struts-config.xml
file.
Simply include a section that looks like this:
<data-sources> <data-source autoCommit="false" description="My Database Connection Pool" driverClass="org.postgresql.Driver" maxCount="4" minCount="1" password="mypassword" url="jdbc:postgresql://localhost/mydatabase" user="myusername" /> </data-sources>
After being initialized, the connection pools will be stored as servlet
context attributes under the bean name specified by the key
attribute. If you did not specify a key
, the default key is the
value of the string constant Action.DATA_SOURCE_KEY
. Thus, you
can access and utilize a connection, from within an Action
class,
like this (for the default data source):
DataSource dataSource = (DataSource) servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY); conn = dataSource.getConnection(); ... perform required functions as in the previous example ... conn.close();
Modern applications often include the requirement to support multiple languages, for users who prefer to interact in a language other than the default language configured on the server platform. In addition, sentences often need to be constructed, with dynamic content whose placement in the message depends on the standard sentence structure in that particular language.
The standard Java platform includes a family of classes
(java.util.ResourceBundle
) designed to support looking up message
strings based on a standard "key". The resource bundle classes automatically
access a Java class (or properties file) that is named with a naming
convention that includes the Locale to which messages in that class (or file)
pertain. However, this selection is based only on the default Locale of the
server platform, and cannot be adjusted on a per-user basis as required for an
internationalized web application.
Struts includes a family of classes
(org.apache.struts.util.MessageResources
) that extends the basic
approach to looking up message strings by key, allowing you to optionally
specify a Locale along with the key. In this way, you can build applications
that let your users select which Locale they wish to operate within, and then
look up messages in that language - using the same message keys no matter what
language is selected.
In addition to supporting dynamic selection of a Locale for message lookup,
the MessageResources
family of classes optionally allow you to
specify up to four parameter replacement objects, which are used to replace the
parameter placeholders "{0}" through "{3}" in the retrieved message. This
replacement uses the facilities of the standard Java
java.text.MessageFormat
class, which supports many extended
formatting capabilities as well.
For more information about internationalized messages, consult the following resources in your Java Development Kit documentation bundle:
<$JAVA_HOME/docs/guide/internat/index.html>
.
The "Internationalization Overview" section includes useful information
about Locales, localized resources, message formatting, and other
relevant topics.java.text.MessageFormat
java.util.ResourceBundle
java.util.PropertyResourceBundle
java.util.Properties
- See the documentation for the
load()
method for the valid syntax of properties files
that you prepare.The standard MessageResources
implementation provided by the
Struts library uses Java properties files to initialize message strings, in a
manner very similar to that supported by the
java.util.PropertyResourceBundle
class. The following steps are
required to use these facilities in your Java application.
First, prepare a Java properties file for each language (or Locale) in which you wish to support your messages. The filenames you use must conform to the naming convention for property resource bundles, as described in the documentation referenced above. Be sure you use the same message keys in each file to identify the same message.
For example, you might prepare files in French, Spanish, and English that
contain language-specific versions of the word "Hello". The French file would
be named Messages_fr.properties
and contain the following:
hi=Bonjour
while the Spanish and English files would be named
Messages_es.properties
and Messages_en.properties
respectively. The corresponding message string definitions would say
hi=Hola
and hi=Hello
in these files.
Second, place these properties files into the class path for your application, exactly as you would with class files themselves. The name actually used to load resources will look like a fully qualified Java class name (with appropriate package prefixes), so the file should be nested inside a directory structure that matches the packaging (either in an unpacked directory, or within a JAR file, as appropriate). For example, assume you place directory "foo" on your classpath, and stored the above properties files in directory "foo/com/mycompany/mypackage". (If you were using a JAR file like "foo.jar" instead, the files would be in directory "com/mycompany/mypackage" within the JAR file).
Third, initialize a MessageResources
object that corresponds
to the set of properties files for a particular name, within a particular
package. The easiest way to do this is to initialize a variable in your main
application class, like this:
public static MessageResources messages = MessageResources.getMessageResources("com.mycompany.mypackage.Messages");
Note that the "com.mycompany.mypackage" part of the name matches the package
directory into which you placed your properties files, and "Messages" is the
filename prefix for the particular family of properties files supported by this
MessageResources
instance. Depending on your development process,
you might find it convenient to store all message strings for an entire
application in a single properties file family, or to have several families -
in Struts, for example, there is a family of properties files for each Java
package.
To access a message string with a particular Locale, execute a statement like this:
Locale locale = ... select the locale to be used ... String message = messages.getMessage(locale, "hi");
In this case, the variable message
will contain the message
string corresponding to the key "hi", in the language that corresponds to the
locale that was selected.
For an example of message formatting with replaceable parameters, assume that the message strings looked like this, instead (only the English version is shown - corresponding changes would be made in the other files):
hi=Hello {0}
Now, you can personalize the retrieved message like this:
Locale locale = ... select the locale to be used ... String name = "Joe"; String message = messages.getMessage(locale, "hi", name);
and the marker "{0}" will have been replaced by the specified name (Joe),
no matter which language is in use. See the JavaDoc API documentation for the
java.text.MessageFormat
class for more advanced uses of the
parameter replacement mechanism.
In the above example, we were using the default
MessageResources
implementation supplied by Struts, which uses
property files to store the message strings. It is also possible to create
customized mechanisms to retrieve messages (such as loading them on demand
from a database). The steps required are as follows:
org.apache.struts.util.MessageResources
that implements
message lookup operations as you require.org.apache.struts.util.MessageResourcesFactory
that will
create an instance of your custom MessageResources
class
when the createResources
method is called. Note that the
"config" argument to this method can be used to select families of
messages in any manner appropriate to your needs - you are not required
to emulate the "fully qualified Java class name" approach that is used
by the standard PropertyMessageResourcesFactory
class.MessageResourcesFactory
class the name of the
customized MessageResourcesFactory
implementation to use
when creating new factory instances.MessageResources
instance for you.A code example that illustrates this technique is:
MessageResourcesFactory.setFactoryClass("com.mycompany.mypkg.MyFactory"); MessageResourcesFactory factory = MessageResourcesFactory.createFactory(); MessageResources resources = factory.createResources("configuration information");
Once you have created your custom MessageResources instance, you utilize it to access message strings (with or without parameter replacement objects), exactly as we illustrated with the standard implementation in the previous section.
If your application uses the Struts controller servlet, you can optionally configure Struts to load an application-specific message resources instance for you, and make it available as a servlet context attribute (in JSP terms, an application-scope bean). This mechanism is managed by setting the following servlet initialization parameters in the web application deployment descriptor:
createResources()
method of the message
resources factory, in order to identify the family of resources to be
supported. If you use the standard message resources factory, this must
be the base fully qualified name of the property resources files used
to contain these messages, as illustrated above.MessageResourcesFactory
to be used. By default, the standard
implementation provided by Struts
(org.apache.struts.util.PropertyMessageResourcesFactory
)
will be used.Struts provides several JSP custom tags that assume the existence of a
java.util.Locale
attribute in the user's session, under the key
named by the constant string value of Action.LOCALE_KEY
. Your own
application logic can set this attribute at any time, or you can ask Struts to
set it automatically (if not already set) based on the
Accept-Language
HTTP header included with the request. There are
two mechanisms by which you request Struts to perform this service:
locale
to
the value true
in the application deployment descriptor.<form:html ... locale="true" ... />
tag at the top of each page.


People who have a creative side and do not live it out are most disagreeable clients. They make a mountain out of a molehill, fuss about unnecessary things, are too passionately in love with somebody who is not worth so much attention, and so on.
There is a kind of floating charge of energy in them which is not attached to its right object and therefore tends to apply exaggerated dynamism to the wrong situation.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep
To live a creative life
Reinvent new combinations of what you already own. Improvise. Become more creative. Not because you have to, but because you want to. Evolution is the secret for the next step.
Custom post listing
- Energy in them which is not attached
- Right object and therefore tends
- Evolution is the secret for the next step
- They make a mountain out of a molehill
Let us be about setting high standards for life, love, creativity, and wisdom. When we are angry or depressed in our creativity.
Energy in them which is not attached
Reinvent new combinations of what you already own. Improvise. Become more creative.
Improvise. Become more creative. Not because you have to, but because you want to.
They make a mountain out of a molehill, fuss about unnecessary things, are too passionately in love with somebody


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object me.edwards.des.block.Ballot
public class Ballot
Data structure to store and maintain a single cast Ballot for a single entity
(user). Ballots are created in an Election Application when a user votes.
The Ballot contains the Votes
chosen by the user in addition to
the user's unique UUID (created by the Election Authority). To prevent
changes from being made to the Ballot, its hash is signed using the ECDSA
private key generated by the Election Application. After the Ballot is
signed, the private key is destroyed and the public key is sent to the
Election Authority, marking the Ballot as cast. When the Node
receives
a Ballot, the signature is authenticated with the Ballot's hash to
ensure that the Ballot was not changed en-route to the Node.
Created on: Nov 1, 2015 at 11:30:16 PM
| Field Summary | |
|---|---|
private byte[] |
bytes
|
private java.lang.String |
id
|
private java.lang.String |
root
|
private java.lang.String |
signature
|
private java.lang.String |
signatureRoot
|
private byte |
version
|
static byte |
VERSION
This class' Ballot version |
private byte[] |
votes
|
| Constructor Summary | |
|---|---|
Ballot(byte[] binary)
Initializes Ballot from binary data as a byte array. |
|
Ballot(java.lang.String id,
java.lang.String signature,
java.util.ArrayList<Vote> votes)
Creates new Ballot from a UUID, Signatures, and list of votes. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
byte[] |
getBytes()
Returns the Ballot in binary format as a byte array. |
java.lang.String |
getID()
Returns this Ballot's (user) UUID |
java.lang.String |
getRoot()
Returns the root hash of this ballot. |
java.lang.String |
getSignature()
Returns this Ballot's signature. |
java.lang.String |
getSignatureRoot()
Returns the signature root hash of this ballot. |
java.util.ArrayList<Vote> |
getVotes()
Returns the Votes contained in this Ballot as an ArrayList. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final byte VERSION
private byte version
private java.lang.String id
private byte[] votes
private java.lang.String signature
private java.lang.String signatureRoot
private java.lang.String root
private byte[] bytes
| Constructor Detail |
|---|
public Ballot(java.lang.String id, java.lang.String signature, java.util.ArrayList<Vote> votes)
Nodes
and
Blocks
only create Ballots from
binary data
.
id
- UUID of Ballot signer (User who cast this Ballot)signature
- Signature on this ballot generated using user's private ECDSA
keyvotes
- List of Votes
on this Ballotpublic Ballot(byte[] binary)
Nodes
and Blocks
to load Ballots.
binary
- Byte array representing this Ballot| Method Detail |
|---|
public java.lang.String getID()
public java.lang.String getSignature()
Node
.
public java.lang.String getSignatureRoot()
Node
.
public java.lang.String getRoot()
Inventory requests
and in the Node's memory.
public byte[] getBytes()
public java.util.ArrayList<Vote> getVotes()
Votes
contained in this Ballot as an ArrayList.
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Note
This tutorial was generated from a Jupyter notebook that can be downloaded here.
The Rossiter-McLaughlin effect¶
In this notebook, we’ll show how to use starry
to model the Rossiter-McLaughlin effect (and radial velocity measurements in general). Check out the notebook on the Derivation of the radial velocity field to understand how starry
models radial velocity under the hood.
[3]:
import matplotlib.pyplot as plt
import starry
import numpy as np
import astropy.units as u
starry.config.lazy = False
starry.config.quiet = True
The basics¶
To define a radial velocity map, simply pass the rv=True
keyword when instantiating a starry
Map
object. We’ll add quadratic limb darkening just for fun. Note that the spherical harmonic degree ydeg
is implicitly set to zero, since we’re not modeling any brightness structure on the surface of the star other than limb darkening (though we can; see below).
[4]:
map = starry.Map(udeg=2, rv=True)
Next, let’s set the properties that affect the projected radial velocity field. We’ll set the inclination (in degrees), obliquity (also in degrees), equatorial velocity (in meters per second), and the differential rotation shear (unitless):
[5]:
map.inc = 60
map.obl = 30
map.veq = 1.0e4
map.alpha = 0.3
Let’s also set the limb darkening coefficients:
[6]:
map[1] = 0.5
map[2] = 0.25
We can see what the map currently looks like. We can choose to either view the brightness map (using rv=False
) or the velocity-weighted brightness map (using rv=True
). The former is uninteresting, so let’s view the latter:
[7]:
map.show(rv=True)
As expected, the map is inclined toward the observer and rotated on the plane of the sky. The left hemisphere is blueshifted (negative radial velocities) and the right hemisphere is redshifted (positive radial velocities). Limb darkening and differential rotation add some additional structure, causing deviations from a perfect dipolar field.
As an example, we can plot what happens when the star is transited by a planet. As usual, we can call map.flux()
to get a light curve, but for RV maps we can also call map.rv()
to get the radial velocity anomaly one would measure from the object:
[8]:
# Occultor properties
xo = np.linspace(-1.5, 1.5, 1000)
yo = -0.25
ro = 0.1
# Plot the flux
plt.figure(figsize=(12, 5))
plt.plot(xo, map.flux(xo=xo, yo=yo, ro=ro))
plt.xlabel("Occultor x position [stellar radii]", fontsize=24)
plt.ylabel("Flux [normalized]", fontsize=24)
# Plot the radial velocity
plt.figure(figsize=(12, 5))
plt.plot(xo, map.rv(xo=xo, yo=yo, ro=ro))
plt.xlabel("Occultor x position [stellar radii]", fontsize=24)
plt.ylabel("Radial velocity [m/s]", fontsize=24);
The first plot is the usual transit light curve, and the second plot is the Rossiter-McLaughlin effect. Note that the units of the RV in the second plot are given by map.velocity_units
.
Accounting for surface features¶
The effect of a planet occulting a star on the observed radial velocity is similar to that of a spot rotating in and out of view. With starry
, we can model both using the same formalism. Let’s define a map of a higher spherical harmonic degree to model the effect of a spot on the RV measurements:
[9]:
map = starry.Map(ydeg=10, udeg=2, rv=True)
We’ll give it the same properties as before:
[10]:
map.inc = 60
map.obl = 30
map.veq = 1.0e4
map.alpha = 0.3
map[1] = 0.5
map[2] = 0.25
And this time we’ll also add a large spot:
[11]:
map.add_spot(-0.015, sigma=0.03, lat=30, lon=0)
Here’s what the map looks like in white light:
[12]:
map.show(rv=False, theta=np.linspace(0, 360, 50))
And here’s what it looks like in velocity space:
[13]:
map.show(rv=True, theta=np.linspace(0, 360, 50))
Let’s plot the light curve and the radial velocity anomaly for this map over one rotation period:
[14]:
theta = np.linspace(-180, 180, 1000)
# Plot the flux
plt.figure(figsize=(12, 5))
plt.plot(theta, map.flux(theta=theta))
plt.xlabel("Angle of rotation [degrees]", fontsize=24)
plt.ylabel("Flux [normalized]", fontsize=24)
# Plot the radial velocity
plt.figure(figsize=(12, 5))
plt.plot(theta, map.rv(theta=theta))
plt.xlabel("Angle of rotation [degrees]", fontsize=24)
plt.ylabel("Radial velocity [m/s]", fontsize=24);
As expected, the signal is similar to the Rossiter-McLaughlin effect! Note that this is a very simple version of Doppler imaging, as we are modeling only the observed radial velocity — not any details of the line shape changes due to the spot rotating in and out of view. This feature of starry
is therefore not meant to enable the mapping of stellar surfaces from RV data, but it can be used to model the RV effects of spots on the surface for, say, de-trending radial velocity observations
when modeling planetary signals.
The full RV model¶
So far we’ve shown how to manually specify the occultor properties and position to get the Rossiter-McLaughlin signal, but we can use the formalism of starry.System
to model a full system of Keplerian bodies.
Here’s an example of a misaligned hot Jupiter on an eccentric orbit, where we compute both the flux and the radial velocity:
[15]:
# Define the star
A = starry.Primary(
starry.Map(udeg=2, rv=True, amp=1, veq=5e4, alpha=0, obl=30),
r=1.0,
m=1.0,
length_unit=u.Rsun,
mass_unit=u.Msun,
)
A.map[1] = 0.5
A.map[2] = 0.25
# Define the planet
b = starry.Secondary(
starry.Map(rv=True, amp=0, veq=0),
r=0.1,
porb=1.0,
m=0.01,
t0=0.0,
inc=80.0,
ecc=0.3,
w=60,
length_unit=u.Rsun,
mass_unit=u.Msun,
angle_unit=u.degree,
time_unit=u.day,
)
# Define the system
sys = starry.System(A, b)
# Compute the flux & RV signal
time = np.linspace(-0.5, 0.5, 1000)
flux = sys.flux(time)
rv = sys.rv(time)
# Plot it
fig, ax = plt.subplots(2, figsize=(12, 8))
ax[0].plot(time, flux)
ax[1].plot(time, rv)
ax[1].set_xlabel("time [days]", fontsize=24)
ax[0].set_ylabel("flux [normalized]", fontsize=24)
ax[1].set_ylabel("radial velocity [m / s]", fontsize=24);


Changelog
Latest
Version 2.4.1
We’re happy to introduce our new Feedback control. Check it out.
What’s New
- Much far proper exotically precise unaccountable.
- Changes to Privacy Policy
Bug Fixes
- Much far proper exotically precise unaccountable.
- Changes to Privacy Policy
Initial Release
Version 1.0
Introducing Wallpaper service app with weekly updates and whole new blog
Version 1.0.1
What’s New
• Lighter version than previous build • Save to gallery fix
Version 1.0.2
What’s New
We’re happy to make a bug free user experience. Here are the bug fixes : • Search bar fixed within search • Added new wallpaper categories • Feedback UI changes
Version 1.0.3
What’s New
We’re happy to make a bug free user experience. Here are the bug fixes :
• Search bar fixed within search
• Added new wallpaper categories
• Feedback UI changes
Version 2.0
What’s New
We’re happy to make a bug free user experience. Here are the bug fixes : • Set as wallpaper is fully functioning now • Search bar fixed within search • Added new wallpaper categories • Feedback UI changes
Version 2.1
What’s New
We’re happy to make a bug free user experience. Here are the bug fixes : • Added app shortcuts • App bar fix
Version 2.2 - Alpha
What’s New
Alpha Test
Version 2.3
What’s New
We’re happy to introduce :
• Rate feature
• Buy me coffee
Stay tuned for more updates.
Version 2.3.1
What’s New
We’re happy to introduce : • Rate feature • Buy me coffee Stay tuned for more updates.
Version 2.3.2
What’s New
Added extra categories check them out…


{% extends 'base.html' %} {% block title %}Weatherman poll{% endblock %} {% block main %}
Last successful poll was at:
{{last_poll}}


list works!
the id if the meal is as follows {{theId}}
{{theId}}
{{theinstructionstocook}}
{{the1stingrediant}}
{{the2stingrediant}}
{{the3stingrediant}}
{{the4stingrediant}}
{{the5stingrediant}}
{{the6stingrediant}}
{{the7stingrediant}}
{{the8stingrediant}}
{{theId}}


| Search Hints: | Examples |
|---|
| Adjacency | Search multiple words together as a phrase. Adjacency is the default search. | stock market |
| Truncation |
Use * for right-hand or embedded truncation of 1-5 characters. Use ** for right-hand-only truncation of any number of characters. Use ? for right-hand or embedded truncation of a single character. The * and ? truncation characters must have at least 2 characters to their LEFT. |
environment* wom*n gender ident** duck? gentlem?n |
| Operators | Use "and" to specify ALL words. Use "or" to specify ANY single word. Use "and not" to exclude words. Use parentheses to group words with operators. | stock market and japan (alaska or canada) and adventure columbus and not christopher |
| Proximity | Use "near" to specify words within 10 words of each other, in any order. Use "within n" to specify words within "n" words of each other. The value of "n" has no limit. | spectroscopy near polymer* ohio within 3 (native* or indian*) |
| Fields | Use labels to search specific fields:
|
a:higham a:(twain or clemens) and t:huck** biological diversity and n:wiley |
About the Catalog
New Books List
| Other
Collections | View Your Circulation
Record
Items
to Acquire | Interlibrary Loan Request
| Comments |
MiamiLINK


example: , this is a test
因此, $out[0]是包含匹配完整模式的字符串的数组， $out[1]是包含闭合标签内
的字符串的数组。
PREG_SET_ORDER
结果排序为$matches[0]包含第一次匹配得到的所有匹配(包含子组)， $matches
[1]是包含第二次匹配到的所有匹配(包含子组)的数组，以此类推。
]+>(.*)[^>]+>|U",
"example:
, this is a test
PREG_OFFSET_CAPTURE
如果这个标记被传递，每个发现的匹配返回时会增加它相对目标字符串的偏移量
。注意这会改变matches中的每一个匹配结果字符串元素，使其成为一个第0个元
素为匹配结果字符串，第1个元素为匹配结果字符串在subject中的偏移量。
如果没有给定排序标记，假定设置为PREG_PATTERN_ORDER。
offset
通常，查找时从目标字符串的开始位置开始。可选参数offset用于从目标字符串中指
定位置开始搜索(单位是字节)。
Note:
使用 offset 参数不同于传递 substr($subject, $offset) 的结果到
preg_match_all() 作为目标字符串，因为 pattern 可以包含断言比如^， $ 或
者 (?<=x) 。示例查看 preg_match()。
返回值
返回完整匹配次数（可能是0），或者如果发生错误返回FALSE。
更新日志
版本 说明
5.4.0 参数matches成为可选的。
5.3.6 如果 offset 大于 subject 的程度，将返回 FALSE。
5.2.2 子命名分组语法可以接受(?)，(?'name')以及 (?P)了。之前版本仅接
受(?P)方式。
4.3.3 增加了offset参数。
4.3.0 增加了PREG_OFFSET_CAPTURE标记。
范例
Example #1 查找所有文本中的电话号码。
Example #2 查找匹配的HTML标签（贪婪）
bold textclick me";
preg_match_all("/(<([\w]+)[^>]*>)(.*?)(<\/\\2>)/", $html, $matches,
PREG_SET_ORDER);
foreach ($matches as $val) {
echo "matched: " . $val[0] . "\n";
echo "part 1: " . $val[1] . "\n";
echo "part 2: " . $val[2] . "\n";
echo "part 3: " . $val[3] . "\n";
echo "part 4: " . $val[4] . "\n\n";
}
?>
以上例程会输出：
matched: bold text
part 1:
part 2: b
part 3: bold text
part 4:
matched: click me
part 1:
part 2: a
part 3: click me
part 4:
Example #3 使用子命名组
\w+): (?P\d+)/', $str, $matches);
/* 下面代码在php 5.2.2(pcre 7.0)或更高版本下工作, 不过, 为了向后兼容
* 推荐使用上面的方式. */
// preg_match_all('/(?\w+): (?\d+)/', $str, $matches);
print_r($matches);
?>
以上例程会输出：
Array
(
[0] => Array
(
[0] => a: 1
[1] => b: 2
[2] => c: 3
)
[name] => Array
(
[0] => a
[1] => b
[2] => c
)
[1] => Array
(
[0] => a
[1] => b
[2] => c
)
[digit] => Array
(
[0] => 1
[1] => 2
[2] => 3
)
[2] => Array
(
[0] => 1
[1] => 2
[2] => 3
)
)
参见
• PCRE 匹配
• preg_match() - 执行一个正则表达式匹配
• preg_replace() - 执行一个正则表达式的搜索和替换
• preg_split() - 通过一个正则表达式分隔字符串
• preg_last_error() - 返回最后一个PCRE正则执行产生的错误代码
User Contributed Notes 30 notes
===============================================================================
I needed a function to rotate the results of a preg_match_all query, and made
this. Not sure if it exists.
Example - Take results of some preg_match_all query:
Array
(
[0] => Array
(
[1] => Banff
[2] => Canmore
[3] => Invermere
)
[1] => Array
(
[1] => AB
[2] => AB
[3] => BC
)
[2] => Array
(
[1] => 51.1746254
[2] => 51.0938416
[3] => 50.5065193
)
[3] => Array
(
[1] => -115.5719757
[2] => -115.3517761
[3] => -116.0321884
)
[4] => Array
(
[1] => T1L 1B3
[2] => T1W 1N2
[3] => V0B 2G0
)
)
Rotate it 90 degrees to group results as records:
Array
(
[0] => Array
(
[1] => Banff
[2] => AB
[3] => 51.1746254
[4] => -115.5719757
[5] => T1L 1B3
)
[1] => Array
(
[1] => Canmore
[2] => AB
[3] => 51.0938416
[4] => -115.3517761
[5] => T1W 1N2
)
[2] => Array
(
[1] => Invermere
[2] => BC
[3] => 50.5065193
[4] => -116.0321884
[5] => V0B 2G0
)
)
===============================================================================
Recently I had to write search engine in hebrew and ran into huge amount of
problems. My data was stored in MySQL table with utf8_bin encoding.
So, to be able to write hebrew in utf8 table you need to do
But then I had to find if some word exists in stored text. This is the place I
got stuck. Simple preg_match would not find text since hebrew doesnt work that
easy. I've tried with /u and who kows what else.
Solution was somewhat logical and simple...
I've used preg_match_all since it returns number of occurences. So I could sort
search results acording to that.
Hope someone finds this useful!
===============================================================================
The code that john at mccarthy dot net posted is not necessary. If you want
your results grouped by individual match simply use:
preg_match_all($pattern, $string, $matches, PREG_SET_ORDER);
?>
E.g.
preg_match_all('/([GH])([12])([!?])/', 'G1? H2!', $matches); // Default
PREG_PATTERN_ORDER
// $matches = array(0 => array(0 => 'G1?', 1 => 'H2!'),
// 1 => array(0 => 'G', 1 => 'H'),
// 2 => array(0 => '1', 1 => '2'),
// 3 => array(0 => '?', 1 => '!'))
preg_match_all('/([GH])([12])([!?])/', 'G1? H2!', $matches, PREG_SET_ORDER);
// $matches = array(0 => array(0 => 'G1?', 1 => 'G', 2 => '1', 3 => '?'),
// 1 => array(0 => 'H2!', 1 => 'H', 2 => '2', 3 => '!'))
?>
===============================================================================
Here is a function that replaces all occurrences of a number in a string by the
number--
===============================================================================
if you want to extract all {token}s from a string:
output:
Array
(
[0] => Array
(
[0] => {token1}
[1] => {token2}
)
)
===============================================================================
To count str_length in UTF-8 string i use
$count = preg_match_all("/[[:print:]\pL]/u", $str, $pockets);
where
[:print:] - printing characters, including space
\pL - UTF-8 Letter
/u - UTF-8 string
other unicode character properties on http://www.pcre.org/pcre.txt
===============================================================================
For parsing queries with entities use:
===============================================================================
Here's some fleecy code to 1. validate RCF2822 conformity of address lists and
2. to extract the address specification (the part commonly known as 'email'). I
wouldn't suggest using it for input form email checking, but it might be just
what you want for other email applications. I know it can be optimized further,
but that part I'll leave up to you nutcrackers. The total length of the
resulting Regex is about 30000 bytes. That because it accepts comments. You can
remove that by setting $cfws to $fws and it shrinks to about 6000 bytes.
Conformity checking is absolutely and strictly referring to RFC2822. Have fun
and email me if you have any enhancements!
$cfws?)";
$name_addr = "(?:$display_name?$angle_addr)";
$mailbox = "(?:$name_addr|$addr_spec)";
$mailbox_list = "(?:(?:(?:(?<=:)|,)$mailbox)+)";
$group = "(?:$display_name:(?:$mailbox_list|$cfws)?;$cfws?)";
$address = "(?:$mailbox|$group)";
$address_list = "(?:(?:^|,)$address)+";
//output length of string (just so you see how f**king long it is)
echo(strlen($address_list) . " ");
//apply expression
preg_match_all("/^$address_list$/", $string, $array, PREG_SET_ORDER);
return $array;
};
?>
===============================================================================
This is a function to convert byte offsets into (UTF-8) character offsets (this
is reagardless of whether you use /u modifier:
===============================================================================
i have made up a simple function to extract a number from a string..
I am not sure how good it is, but it works.
It gets only the numbers 0-9, the "-", " ", "(", ")", "."
characters.. This is as far as I know the most widely used characters for a
Phone number.
$v) {
$ready .= $v;
}
var_dump($ready);
die;
if (mb_strlen($cleaned) > 4 && mb_strlen($cleaned) <=25) {
return $cleaned;
}
else {
return false;
}
}
return false;
}
?>
===============================================================================
I found simpleXML to be useful only in cases where the XML was extremely small,
otherwise the server would run out of memory (I suspect there is a memory leak
or something?). So while searching for alternative parsers, I decided to try a
simpler approach. I don't know how this compares with cpu usage, but I know it
works with large XML structures. This is more a manual method, but it works for
me since I always know what structure of data I will be receiving.
Essentially I just preg_match() unique nodes to find the values I am looking
for, or I preg_match_all to find multiple nodes. This puts the results in an
array and I can then process this data as I please.
I was unhappy though, that preg_match_all() stores the data twice (requiring
twice the memory), one array for all the full pattern matches, and one array
for all the sub pattern matches. You could probably write your own function
that overcame this. But for now this works for me, and I hope it saves someone
else some time as well.
// SAMPLE XML
PropertyID
521897
677208
686037
/', $xml,
$matches);
if(!empty($matches[1])) {
$results["delimiter"] = chr($matches[1]);
} else {
// DEFAULT DELIMITER
$results["delimiter"] = "\t";
}
unset($match_res, $matches);
// GET MULTIPLE DATA NODES (multiple instances)
$results["data_count"] = preg_match_all("/(.*)<\/DATA>/", $xml,
$matches);
// GET MATCHES OF SUB PATTERN, DISCARD THE REST
$results["data"]=$matches[1];
unset($match_res, $matches);
// UNSET XML TO SAVE MEMORY (should unset outside the function as well)
unset($xml);
// RETURN RESULTS ARRAY
return $results;
}
?>
===============================================================================
PREG_OFFSET_CAPTURE always seems to provide byte offsets, rather than character
position offsets, even when you are using the unicode /u modifier.
===============================================================================
Using preg_match_all I made a pretty handy function.
-1) {
foreach ($matches as $count => $value )
{
if ($count + 1 > $limit ) { unset($matches[$count]); }
}
}
foreach ($matches[0] as $match) {
$rep = ereg_replace($replacementChar, $match, $replacement);
$subject = ereg_replace($match, $rep, $subject);
}
return $subject;
}
?>
This function can turn blocks of text into clickable links or whatever.
Example:
$$$', $description)
?>
will turn all email addresses into actual links.
Just substitute $$$ with the text that will be found by the regex. If you
can't use $$$ then use the 4th parameter $replacementChar
===============================================================================
Be careful with this pattern match and large input buffer on preg_match_*
functions.
if $buffer is 80+ KB in size, you'll end up with segfault!
[89396.588854] php[4384]: segfault at 7ffd6e2bdeb0 ip 00007fa20c8d67ed sp
00007ffd6e2bde70 error 6 in libpcre.so.3.13.1[7fa20c8c3000+3c000]
This is due to the PCRE recursion. This is a known bug in PHP since 2008, but
it's source is not PHP itself but PCRE library.
Rasmus Lerdorf has the answer: https://bugs.php.net/bug.php?id=45735#1365812629
"The problem here is that there is no way to detect run-away regular
expressions
here without huge performance and memory penalties. Yes, we could build PCRE in
a
way that it wouldn't segfault and we could crank up the default backtrack limit
to something huge, but it would slow every regex call down by a lot. If PCRE
provided a way to handle this in a more graceful manner without the performance
hit we would of course use it."
===============================================================================
I had been crafting and testing some regexp patterns online using the tools
Regex101 and a `preg_match_all()` tester and found that the regexp patterns I
wrote worked fine on them, just not in my code.
My problem was not double-escaping backslash characters:
array(4) {
[0]=>
string(11) ""something""
[1]=>
string(17) ","something here""
[2]=>
string(17) ","some
new
lines""
[3]=>
string(18) ","this is the end""
}
[1]=>
array(4) {
[0]=>
string(9) "something"
[1]=>
string(14) "something here"
[2]=>
string(14) "some
new
lines"
[3]=>
string(15) "this is the end"
}
}
*/
?>
===============================================================================
Here is a awesome online regex editor https://regex101.com/
which helps you test your regular expressions (prce, js, python) with real-time
highlighting of regex match on data input.
===============================================================================
// Here is function that allows you to preg_match_all array of patters
function getMatches($pattern, $subject) {
$matches = array();
if (is_array($pattern)) {
foreach ($pattern as $p) {
$m = getMatches($p, $subject);
foreach ($m as $key => $match) {
if (isset($matches[$key])) {
$matches[$key] = array_merge($matches[$key], $m[$key]);
} else {
$matches[$key] = $m[$key];
}
}
}
} else {
preg_match_all($pattern, $subject, $matches);
}
return $matches;
}
$patterns = array(
'/(.*?)<\/span>/',
'/(.*?)<\/a>/'
);
$html = 'some text';
$html .= 'some text in another span';
$html .= 'here is the link';
$html .= 'address is here';
$html .= 'here is one more span';
$matches = getMatches($patterns, $html);
print_r($matches); // result is below
/*
Array
(
[0] => Array
(
[0] => some text
[1] => some text in another span
[2] => here is one more span
[3] => here is the link
)
[1] => Array
(
[0] => some text
[1] => some text in another span
[2] => here is one more span
[3] => here is the link
)
)
*/
===============================================================================
This is very useful to combine matches:
$a = array_combine($matches[1], $matches[2]);
===============================================================================
Here http://tryphpregex.com/ is a php based online regex editor which helps
you test your regular expressions with real-time highlighting of regex match on
data input.
===============================================================================
Better use preg_replace to convert text in a clickable link with tag
$html = preg_replace('"\b(http://\S+)"', '$1', $text);
===============================================================================
Extract fields out of csv string : ( since before php5.3 you can't use
str_getcsv function )
Here is the regex :
===============================================================================
I have received complains, that my html2a() code (see below) doesn't work in
some cases.
It is however not the problem with algorithm or procedure, but with PCRE
recursive stack limits.
If you use recursive PCRE (?R) you should remember to increase those two ini
settings:
ini_set('pcre.backtrack_limit', 10000000);
ini_set('pcre.recursion_limit', 10000000);
But be warned: (from php.ini)
;Please note that if you set this value to a high number you may consume all
;the available process stack and eventually crash PHP (due to reaching the
;stack size limit imposed by the Operating System).
I have written this example mainly to demonstrate the power of PCRE LANGUAGE,
not the power of it's implementation :)
But if you like it, use it, of course on your own risk.
===============================================================================
The power of pregs is limited only by your *imagination* :)
I wrote this html2a() function using preg recursive match (?R) which provides
quite safe and bulletproof html/xml extraction:
])*)?)\>
((?:(?>[^\<]*)|(?R))*)
\<\/\s*?\\1(?:\b[^\>]*)?\>
|\<\s*(\w+)(\b(?:\'[^\']*\'|"[^"]*"|[^\>])*)?\/?\>
@uxis', $html = trim($html), $m, PREG_OFFSET_CAPTURE | PREG_SET_ORDER) )
return $html;
$i = 0;
$ret = array();
foreach ($m as $set) {
if ( strlen( $val = trim( substr($html, $i, $set[0][1] - $i) ) ) )
$ret[] = $val;
$val = $set[1][1] < 0
? array( 'tag' => strtolower($set[4][0]) )
: array( 'tag' => strtolower($set[1][0]), 'val' => html2a($set[3][0]) );
if ( preg_match_all( '
/(\w+)\s*(?:=\s*(?:"([^"]*)"|\'([^\']*)\'|(\w+)))?/usix
', isset($set[5]) && $set[2][1] < 0
? $set[5][0]
: $set[2][0]
,$attrs, PREG_SET_ORDER ) ) {
foreach ($attrs as $a) {
$val['attr'][$a[1]]=$a[count($a)-1];
}
}
$ret[] = $val;
$i = $set[0][1]+strlen( $set[0][0] );
}
$l = strlen($html);
if ( $i < $l )
if ( strlen( $val = trim( substr( $html, $i, $l - $i ) ) ) )
$ret[] = $val;
return $ret;
}
?>
Now let's try it with this example: (there are some really nasty xhtml
compliant bugs, but ... we shouldn't worry)
... and some other ...
< dIv > < empty> empty>
This is yet another text
that wasn't compliant too...
this one is better but we don't care anyway
end of paragraph
some trailing text
EOT;
$a = html2a($html);
//now we will make some neat html out of it
echo a2html($a);
function a2html ( $a, $in = "" ) {
if ( is_array($a) ) {
$s = "";
foreach ($a as $t)
if ( is_array($t) ) {
$attrs="";
if ( isset($t['attr']) )
foreach( $t['attr'] as $k => $v )
$attrs.=" ${k}=".( strpos( $v, '"' )!==false ? "'$v'" : "\"$v\"" );
$s.= $in."<".$t['tag'].$attrs.( isset( $t['val'] ) ? ">\n".a2html( $t[
'val'], $in." " ).$in."".$t['tag'] : "/" ).">\n";
} else
$s.= $in.$t."\n";
} else {
$s = empty($a) ? "" : $in.$a."\n";
}
return $s;
}
?>
This produces:
some leftover text...
... and some other ...
This is yet another text
that wasn't
compliant
too...
[\s\w\/<>=\\\"]*<\/table>/'
Should be able to match:
a
b
.. with all there is under those table tags.
I'm not really sure why this is so, but I tried just the double quote and one
or even two escape characters and it won't work. In my frustration I added
another one and then it's cool.
===============================================================================
As I intended to create for my own purpose a clean PHP class to act on XML
files, combining the use of DOM and simplexml functions, I had that small
problem, but very annoying, that the offsets in a path is not numbered the same
in both.
That is to say, for example, if i get a DOM xpath object it appears like:
/ANODE/ANOTHERNODE/SOMENODE[9]/NODE[2]
and as a simplexml object would be equivalent to:
ANODE->ANOTHERNODE->SOMENODE[8]->NODE[1]
So u see what I mean? I used preg_match_all to solve that problem, and finally
I got this after some hours of headlock (as I'm french the names of variables
are in French sorry), hoping it could be useful to some of you:
===============================================================================
The next function works with almost any complex xml/xhtml string
\s]+(?=>|[\s]+[^>]*[^/]>)(?!/>))
%";
$patt_close = "%((?<=)([^>]+)(?=>))%";
if (preg_match_all($patt_open,$text,$matches))
{
$m_open = $matches[1];
if(!empty($m_open))
{
preg_match_all($patt_close,$text,$matches2);
$m_close = $matches2[1];
if (count($m_open) > count($m_close))
{
$m_open = array_reverse($m_open);
foreach ($m_close as $tag) $c_tags[$tag]++;
foreach ($m_open as $k => $tag) if ($c_tags[$tag]--<=0)
$text.=''.$tag.'>';
}
}
}
return $text;
}
?>
===============================================================================
6
[1] => all the
)
*/
?>


Sequence constraints
[Testing finite sets]
Classes | |
| class | Test::Set::Sequence::Sequence |
| Test for sequence constraint. More... | |
| class | Test::Set::Sequence::SeqU |
| Test for sequential-union constraint. More... | |
Functions | |
| virtual bool | Test::Set::Sequence::Sequence::solution (const SetAssignment &x) const |
| Test whether x is solution. | |
| virtual void | Test::Set::Sequence::Sequence::post (Space *home, SetVarArray &x, IntVarArray &) |
| Post constraint on x. | |
| Test::Set::Sequence::SeqU::SeqU (int n0) | |
| Create and register test. | |
| virtual bool | Test::Set::Sequence::SeqU::solution (const SetAssignment &x) const |
| Test whether x is solution. | |
| virtual void | Test::Set::Sequence::SeqU::post (Space *home, SetVarArray &x, IntVarArray &) |
| Post constraint on x. | |
Variables | |
| Sequence | Test::Set::Sequence::_sequence ("Sequence::Sequence") |
| SeqU | Test::Set::Sequence::_sequ0 (0) |
| SeqU | Test::Set::Sequence::_sequ1 (1) |
| SeqU | Test::Set::Sequence::_sequ3 (3) |
Function Documentation
| virtual bool Test::Set::Sequence::Sequence::solution | ( | const SetAssignment & | x | ) | const [inline, virtual, inherited] |
Test whether x is solution.
Implements Test::Set::SetTest.
Definition at line 62 of file sequence.cc.
| virtual void Test::Set::Sequence::Sequence::post | ( | Space * | home, | |
| SetVarArray & | x, | |||
| IntVarArray & | ||||
| ) | [inline, virtual, inherited] |
| Test::Set::Sequence::SeqU::SeqU | ( | int | n0 | ) | [inline, inherited] |
| virtual bool Test::Set::Sequence::SeqU::solution | ( | const SetAssignment & | x | ) | const [inline, virtual, inherited] |
Test whether x is solution.
Implements Test::Set::SetTest.
Definition at line 92 of file sequence.cc.
| virtual void Test::Set::Sequence::SeqU::post | ( | Space * | home, | |
| SetVarArray & | x, | |||
| IntVarArray & | ||||
| ) | [inline, virtual, inherited] |
Variable Documentation
| Sequence Test::Set::Sequence::_sequence("Sequence::Sequence") |
| SeqU Test::Set::Sequence::_sequ0(0) |
| SeqU Test::Set::Sequence::_sequ1(1) |
| SeqU Test::Set::Sequence::_sequ3(3) |


We exchange interfaces!
- synergize clicks-and-mortar solutions
- monetize viral synergies
- iterate one-to-one partnerships
- generate extensible metrics
- incentivize 24/365 ROI
- grow killer infrastructures
- transform clicks-and-mortar systems
- visualize killer action-items
- benchmark revolutionary action-items


The exercise below will test your newly acquired knowledge on the KMP algorithm. Assume the two characters highlighted in red were just compared and it is discovered they don't match. Please click the index of the master string that will be compared
after the current mismatch and then the index of the substring that will be compared to it. When you are finished hit
Check Answer to see if you are correct. The values in the strings that have already been compared are highlighted in green so there is no confusion. In effect what you are doing is tracing the string
sub_str through the string
master_str using the KMP Algorithm for just one step.
[started]
if (!checkAnswer(main_text, search_string, sub_str) && !guess[0])
return "";
else return checkAnswer(main_text, search_string, sub_str);


CodeMirror: JSHM mode
# This is a example of how # to count down from 100 to # 0 using rhe simulator # Putting data into the memory .db 0x19 100 .db 0x18 -1 jmp :begining # interrupts here .at 4 # Begining of the program :begining # Load from the address 0x19 lda 0x19 :add_point call :sum_subroutine # Jump if zero jz :sleep_point # Jump jmp :add_point # Sleep :sleep_point hlt # Sum subroutine :sum_subroutine # Add from address 0x18 add 0x18 # Store the AC on address 0x18 sta 0x20 # Return of the subroutine ret


3 references to s_staticStateLock
Microsoft.PowerShell.ConsoleHost (3)
host\msh\Executor.cs (3)
672
lock (
s_staticStateLock
)
682
lock (
s_staticStateLock
)
699
lock (
s_staticStateLock
)


{% if 'show' in request.path %} {% else %} {% endif %}
'Can I say that?' is a simple tool that gives you a sense for how others may perceive your writing. It was developed over three weeks as a pilot project for the Insight Data Science program.
It's digested thousands of pages from forums, blog posts, government reports, and PhD dissertations, to learn how we express ourselves in different contexts.
Try it out! Enter that email you've been staring at, and we'll let you know if it's better on Reddit or in your boss' inbox.


Package net.ssehub.comani.core
Class Setup
- java.lang.Object
-
- net.ssehub.comani.core.Setup
-
public class Setup extends java.lang.Object
This class reads the configuration file and provides the user-defined properties for other components of the tool.- Author:
- Christian Kroeher
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_ANALYSIS_CLASS
The string representation of the property's key identifying the user-defined analysis main class name.static java.lang.String
PROPERTY_ANALYSIS_OUTPUT
The string representation of the property's key identifying the user-defined analysis result directory.static java.lang.String
PROPERTY_CORE_COMMIT_QUEUE_MAX_ELEMENTS
The string representation of the property's key identifying the user-defined maximum number of elements (commits) in theCommitQueue
.static java.lang.String
PROPERTY_CORE_LOG_LEVEL
The string representation of the property's key identifying the user-defined log level.static java.lang.String
PROPERTY_CORE_OS
The string representation of the property's key identifying the operating system this tool is currently running on.static java.lang.String
PROPERTY_CORE_PLUGINS_DIR
The string representation of the property's key identifying the user-defined path to the directory, in which the extractor and analyzer plug-ins are located.static java.lang.String
PROPERTY_CORE_THREADS
The string representation of the property's key identifying the available processors of the machine this tool is currently running on.static java.lang.String
PROPERTY_CORE_VERSION_CONTROL_SYSTEM
The string representation of the property's key identifying the user-defined name of target version control system, e.g., from which the commits will be extracted.static java.lang.String
PROPERTY_EXTRACTION_CACHING
The string representation of the property's key identifying the user-defined directory for caching extracted commits.static java.lang.String
PROPERTY_EXTRACTION_CLASS
The string representation of the property's key identifying the user-defined extractor main class name.static java.lang.String
PROPERTY_EXTRACTION_COMMIT_LIST
The string representation of the property's key identifying the user-defined commit list file.static java.lang.String
PROPERTY_EXTRACTION_INPUT
The string representation of the property's key identifying the user-defined repository directory.static java.lang.String
PROPERTY_EXTRACTION_REUSE
The string representation of the property's key identifying the user-defined directory for reusing cached commits.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Properties
getAnalysisProperties()
Returns theanalysisProperties
as defined in the properties file.java.lang.String
getCommitString()
Returns thecommitString
retrieved in interactive mode.java.util.Properties
getCoreProperties()
Returns thecoreProperties
as defined in the properties file.java.util.Properties
getExtractionProperties()
Returns theextractionProperties
as defined in the properties file.static Setup
getInstance()
Returns the singleton instance of this class.
Important: the methodgetInstance(String[])
for initializing the instance has to be called at least once before this method is called.static Setup
getInstance(java.lang.String[] args)
Initializes and returns the singleton instance of this class.
-
-
-
Field Detail
-
PROPERTY_CORE_OS
public static final java.lang.String PROPERTY_CORE_OS
The string representation of the property's key identifying the operating system this tool is currently running on. This is automatically detected by this class.- See Also:
- Constant Field Values
-
PROPERTY_CORE_THREADS
public static final java.lang.String PROPERTY_CORE_THREADS
The string representation of the property's key identifying the available processors of the machine this tool is currently running on. This is automatically detected by this class.- See Also:
- Constant Field Values
-
PROPERTY_CORE_PLUGINS_DIR
public static final java.lang.String PROPERTY_CORE_PLUGINS_DIR
The string representation of the property's key identifying the user-defined path to the directory, in which the extractor and analyzer plug-ins are located.- See Also:
- Constant Field Values
-
PROPERTY_CORE_VERSION_CONTROL_SYSTEM
public static final java.lang.String PROPERTY_CORE_VERSION_CONTROL_SYSTEM
The string representation of the property's key identifying the user-defined name of target version control system, e.g., from which the commits will be extracted.- See Also:
- Constant Field Values
-
PROPERTY_CORE_LOG_LEVEL
public static final java.lang.String PROPERTY_CORE_LOG_LEVEL
The string representation of the property's key identifying the user-defined log level. This is an optional property, hence, if not specified, no further actions are required.- See Also:
- Constant Field Values
-
PROPERTY_CORE_COMMIT_QUEUE_MAX_ELEMENTS
public static final java.lang.String PROPERTY_CORE_COMMIT_QUEUE_MAX_ELEMENTS
The string representation of the property's key identifying the user-defined maximum number of elements (commits) in theCommitQueue
. This is an optional property, hence, if not specified, no further actions are required.- See Also:
- Constant Field Values
-
PROPERTY_EXTRACTION_CLASS
public static final java.lang.String PROPERTY_EXTRACTION_CLASS
The string representation of the property's key identifying the user-defined extractor main class name.- See Also:
- Constant Field Values
-
PROPERTY_EXTRACTION_INPUT
public static final java.lang.String PROPERTY_EXTRACTION_INPUT
The string representation of the property's key identifying the user-defined repository directory.- See Also:
- Constant Field Values
-
PROPERTY_EXTRACTION_COMMIT_LIST
public static final java.lang.String PROPERTY_EXTRACTION_COMMIT_LIST
The string representation of the property's key identifying the user-defined commit list file.- See Also:
- Constant Field Values
-
PROPERTY_EXTRACTION_CACHING
public static final java.lang.String PROPERTY_EXTRACTION_CACHING
The string representation of the property's key identifying the user-defined directory for caching extracted commits. The definition of this property enables the caching feature for the extraction.- See Also:
- Constant Field Values
-
PROPERTY_EXTRACTION_REUSE
public static final java.lang.String PROPERTY_EXTRACTION_REUSE
The string representation of the property's key identifying the user-defined directory for reusing cached commits. The definition of this property enables the caching (reuse) feature for the extraction.- See Also:
- Constant Field Values
-
PROPERTY_ANALYSIS_CLASS
public static final java.lang.String PROPERTY_ANALYSIS_CLASS
The string representation of the property's key identifying the user-defined analysis main class name.- See Also:
- Constant Field Values
-
PROPERTY_ANALYSIS_OUTPUT
public static final java.lang.String PROPERTY_ANALYSIS_OUTPUT
The string representation of the property's key identifying the user-defined analysis result directory.- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static Setup getInstance(java.lang.String[] args) throws SetupException
Initializes and returns the singleton instance of this class.- Parameters:
args
- the arguments as provided toComAnI.main(String[])
- Returns:
- the singleton instance of this class; never
null
. - Throws:
SetupException
- if preparing theSetup
fails due to missing or false information
-
getInstance
public static Setup getInstance() throws SetupException
Returns the singleton instance of this class.
Important: the methodgetInstance(String[])
for initializing the instance has to be called at least once before this method is called.- Returns:
- the singleton instance of this class; never
null
. - Throws:
SetupException
- ifgetInstance(String[])
was not called before
-
getCoreProperties
public java.util.Properties getCoreProperties()
Returns thecoreProperties
as defined in the properties file.- Returns:
- the core properties for setting up this tools; never
null
but may be empty
-
getExtractionProperties
public java.util.Properties getExtractionProperties()
Returns theextractionProperties
as defined in the properties file.- Returns:
- the extraction properties for setting up the extraction process and the extractor in use;
never
null
but may be empty
-
getAnalysisProperties
public java.util.Properties getAnalysisProperties()
Returns theanalysisProperties
as defined in the properties file.- Returns:
- the analysis properties for setting up the analysis process and the analyzer in use;
never
null
but may be empty
-
getCommitString
public java.lang.String getCommitString()
Returns thecommitString
retrieved in interactive mode.- Returns:
- the string containing a particular commit or
null
if the tool is not used in interactive mode
-
-


Sultan Baabullah Ternate
The Ruler of 72 Islands.
Here's a time line of Sultan Baabullah life:
- 1528 - Born in February 10 Ternate, North Moluccas.
- 1545 – 1546 - Since childhood he always accompanied his father (Sultan Khairun), even to the point of following him in temporary exile to Goa (India).
- 1560 - Helped his father to run the affairs of government and the sultanate, and co-signed an act of Vassalage (the oldest preserved Indonesian letter with seals).
- 1563 - Undertook an expedition to the northern parts of Sulawesi in order to bring these lands under his father's realm.
- 1570 - The tragic death of Sultan Hairun triggered the anger of the Ternatans as well as the various kings of Maluku.
- 1570 - Lead the siege of Gammalamo Fort with a force of 2.000 Korakoras fleets and approximately 130.000 soldiers.
- 1570-1571 - Sultan Baabullah sent a large fleet of 6 Korakoras containing 500 soldiers and led by Kapita Kalasinka to expel the Portuguese who were in Ambon.
- 1571-1575 - Leading the expulsion of the Portuguese in Buton, Selayar and Makassar.
- 1575 - Expelling the Portuguese from Ternate and making Ternate the center of the clove trade in Maluku with an international network.
- 1579 - Sultan Babullah received a visit of Francis Drake (the well-known English seafarer and adventurer) and make diplomatic relations with United Kingdom.
- 1580-1583 - Sultan Baabullah led a large naval expedition (hongi) which visited a number of places to increase its territory and influence to several areas in Moluccas, Sulawesi, Nusa Tenggara, Papua and Southern Philippines.
- 1580-1583 - Spain and Portugal Join the Spanish-Portuguese Union. Then Sultan Baabullah put up a fight against Governor of Spain in Manila, Philippines, including : Juan de Morones, Don Gomez Perez Dasmarinas and Gonzalo Ronquillo.
- 1583 - May 25, Sultan Baabullah died at the age of 55 and was buried in Foramadiahi, Ternate.
"What shall we value the Portuguese if we once become sensible of our own strength? What can we fear, or not dare to attempt? The Portuguese value him who robs most, and is guilty of the greatest crimes and enormities ... Ours are our country, and the defense of our parents, our wives, our children and our liberty."
-- Bartholomew Leonardo de Argensola (1708) The Discovery and Conquest of the Molucco and Philippine Islands. London, p. 54. --


Upload an image of yourself so we can know how are you feeling and recommend the best songs for your to listen with your current mood.


Kim K reveals she almost lost $10m in Kimono cultural appropriation scandal
Kim Kardashian’s cultural appropriation scandal played out on Sunday’s episode of Keeping Up With the Kardashians – where the stay is seen panicking over the offensive name of her shapewear line.
The reality star came under fire after announcing her new line of underwear would be called Kimono – a traditional Japanese dress with symbolic meaning to the country.
As a result, she was called out for appropriating the name and was begged to consider a rethink of the brand that would disrespect the Japanese culture.
Advertisement Advertisement
Even the Mayor of Kyoto, Japan, penned an open letter to the star asking her to come up with another name.
A panicked Kim shared her business worries with Scott Disick, claiming the change could cost $10million (£7.71million)
‘Who would ever think that hey, I would want to do something that would be disrespectful?’ she told him.
‘They’re saying that I’m cultural appropriating.’
She added that until the official announcement, no one – including the retailers buying the garments – had thought that it was an issue.
Kim admitted later on that it was ‘foolish and ignorant’ of her to think that.
Reading the letter in the confessionals, Kim said: ‘”Kimono is a traditional ethnic dress, and truly symbolizes sense of beauty, spirits and value of Japanese.”’
‘Reading that letter I felt an understanding. I definitely did not want to disrespect a culture,’ she added.
‘That’s not what the brand is even about. It’s about inclusivity, it’s about comfort. It’s not about making people feel uncomfortable.’
Thankfully, after quick thinking from her team, they were able to rebrand without the $10million price tag – and Kim apologised publicly and vowed to change it up, thanking people for making her aware of the issue.
After looking through names including Kim Barely and KKW (Kim Kardashian Wear), she eventually settled on the (seriously much better) name of SKIMS.
Advertisement Advertisement
In a photo, she declared: ‘My fans and followers are a huge inspiration to me – I’m always listening to their feedback and opinions, and am so grateful they shared their ideas for a new brand name.
After much thought and consideration, I’m excited to announce the launch of SKIMS Solutionwear.’
Keeping Up With The Kardashians airs on HeyU in the UK.
Got a showbiz story? If you've got a story, video or pictures get in touch with the Metro.co.uk Entertainment team by emailing us<EMAIL_ADDRESS>calling 020 3615 2145 or by visiting our Submit Stuff page - we'd love to hear from you.


28
1 Terrible things will happen to the city of Samaria, the capital of Israel!
It is on a hill above a fertile valley;
the people who live there, who get drunk by drinking too much wine, are very proud;
it is a beautiful and glorious city,
but some day that beauty will disappear like a flower that wilts and dries up.
2 Listen to this: Yahweh will cause a great army to attack it.
Their soldiers will be like a huge hailstorm or a very strong wind;
they will be everywhere, like the water of a huge flood,
and they will smash to the ground the buildings in Samaria.
3 The people of Samaria are proud,
but everything that the drunks who live there think is wonderful will be trampled on by their enemies.
4 Yes, Samaria is beautiful, set on a hill above a fertile valley, but that beauty will disappear
like a flower that wilts and dries up.
Whenever someone sees a good fig at the beginning of the season when figs become ripe, he quickly picks and eats it;
similarly, when the enemies of Israel see all the beautiful things in Samaria,
they will quickly conquer the city and take away all those things.
5 At that time, Yahweh, Commander of the angel armies, will be like a glorious wreath of flowers for us Israelite people
who are still alive after being exiled.
6 He will cause our judges to want to do what is fair
when they decide people's cases.
He will enable the soldiers who stand at the city gates
to strongly defend the city when our enemies attack it.
7 But now, our leaders stagger
because they have drunk a lot of wine and other alcoholic drinks.
The priests and prophets also stagger
because of drinking a lot of wine and other alcoholic drinks.
They are not able to think right;
they see visions, but they cannot understand what they mean;
they are unable to decide things correctly.
8 All their tables are covered with their vomit;
filth is everywhere.
9 They ridicule Yahweh and say, "Who does he think that he is teaching?
Why is he talking to us like this?
Does he think that we are little children
who have recently been weaned?
10 He continually tells us, 'Do this, do that;'
first he tells us one rule, then another rule,
he tells us only one line at a time."
11 So now, Yahweh will need to force them to listen to Assyrians
speaking to them in a language that they do not understand.
12 Yahweh told his people long ago,
"This is a place where you can rest;
you are exhausted from all your travels through the desert,
but you will be able to rest in this land."
But they refused to pay attention to what he said.
13 So Yahweh continues to tell the people of Samaria,
one line at a time, "Do this, do that,"
first one rule and then another rule.
But because of their ignoring what God said, they will be attacked and defeated;
they will be wounded and snared and captured.
14 Because of what will happen in Samaria,
you rulers in Jerusalem who make fun of me;
listen to this message from Yahweh:
15 You boast and say,
"We have made an alliance with the leaders of Egypt,
so we will not be killed in battles;
we will never go to the place where the dead people are.
When the army of Assyria attacks us, they will never defeat us,
because we have made an agreement with Egypt to protect us!"
But that agreement consists of a lot of lies.
16 Therefore, Yahweh our Lord says this:
"Listen to this!
He will be like a valuable stone on which which it will be safe to build a house;
and whoever trusts in him will never be disappointed.
17 I will test you people of Jerusalem to find out if you will act justly and righteously
like someone uses a plumb line to determine if a wall is straight and level.
But because your agreement with Egypt to protect you was made by leaders lying to each other and deceiving each other,
you will be defeated and taken away from your country
by an army that will come against you like a flood.
18 I will cancel the covenant that you made with the place where the spirits of the dead go.
You thought that because of that covenant you would not be killed and you would not go there.
But when the vast army of Assyria overwhelms you like a flood,
they will trample you into the ground.
19 Their soldiers will come during the morning, at noontime, and at night,
and they will carry you all away."
And when you understand this message,
you will be terrified.
20 You have heard people say, "Your bed is very short; you will not be able to sleep in it;
your blankets are very narrow; they will not cover you!"
That means for you that your treaty with Egypt is not going to save you.
21 Yahweh will come and cause you to be defeated;
he will do to you like he did to the army of Philistia at Mount Perizim,
and like he did to the Amorites at Gibeon Valley.
What he will do will be very strange and unusual.
22 Yahweh, Commander of the angel armies, has told me that he is going to destroy the entire land.
So do not ridicule what I say anymore,
because if you do that,
he will punish you even more severely.
23 Listen to what I say;
pay attention carefully.
24 When a farmer plows some ground, does he never plant seeds?
Does he continue to plow it and never plant anything?
25 No, he makes the ground very level,
and then he plants seeds—
dill and cumin and wheat and barley.
He plants each kind of seed in the correct manner. He does not plant one kind of seed in the way that is not right for it.
26 He does that because God has taught him the correct way to do it.
27 Also, farmers never thresh caraway with a heavy sledge;
instead, they beat it only with a stick.
Farmers never thresh cumin by driving a cart over it;
instead, they only hit it with a rod.
28 And grain for baking bread is crushed easily,
so the farmers do not continue to pound it for a long time.
They sometimes cause their horses to pull a cart over it to thresh it,
but doing that does not grind the grain.
29 Yahweh, Commander of the angel armies,
gives us wonderful advice about how to do things; he gives us great wisdom.


--- title: Principles of Automatic Control keywords: fastai sidebar: home_sidebar summary: "This is a course on principles of automatic control using classical control theory. The course uses Python to implement some of the concepts described in class." description: "This is a course on principles of automatic control using classical control theory. The course uses Python to implement some of the concepts described in class." nb_path: "index.ipynb" ---
You should not need too much to use this repository, and most notebooks run with python 3.9 and numpy.
Notebook 01_Getting_started_with_Python_and_Jupyter_Notebook.ipynb
gives information on how to set up an anaconda environment to get you started.
Each notebook is thought to be independent from every other, so it is possible to run them in any order you prefer.


Change Title with @_page_title property
Example App
Used to show off how cool updoc is.
Spoiler warning: it's really cool.
Guesser module
- module guesser
The main application
Util Module
- module util
Back door debugging stuff
Math
- module util.math
Useful math utilities
Cheating
- module util.cheating
For development only!
.cheat( )
- module util.cheating
- return a number 1-10
Cheat and learn the secret value
.guess( v )
- module guesser
- param guessed value
- return true or false
Guess what the secret value is
.numBetween( x, y )
- module util.math
- param1 x number
- param2 y number
- return number
Create random number between x and y
SECRET
- module guesser
Can't guess this from outside the module.
Is a value from 1 to 10


HTML stands for "HyperText Markup Language"
Hyper Links - Typical internet links
HTML documents form the majority of the
content on the web. HTML documents contain text content which describes "what you see"
and markup which describes "how it looks".
You/User
Computer/Browser
Internet uses HTTP
Servers
HTML is the heart of the web.
HTML is made up of:
- Text content (what you see)
- Markup (what it looks like)
- References to other documents (i.g. images & video)
- Links to other pages
"b" tag - bolds the contents between the opening and ending tag
"em" tag - similarly, the "em" tag italicizes the contents between tages
Note: Omitting closing tag will apply anything after the opening tag i.e. everything after opening bold or italicized.
HTML Attributes
HTML Attributes are used within tags to include links or images.
For example, the Anchor tag used with "href" attribute creates a hyperlink.
Like this: Google.com
Another usful element is for inlcuding images.
img src="URL" alt=text
--> Note: Generally alt=text is 'required'/best practice so people know what they should be viewing if an image is expected.
Whitespace:
br tag = break (void tag)
p tag = paragraph
Why have ""br" and "p - /p" tags?
br - the break tag is "inline" whereas
p - paragraph tag is a "block"
The key distinction between inline and block elements is that block elements create ‘invisible boxes’ around the contents
Container elements: elements that do nothing but contain stuff inside themselves
Two Types: Span / Div
span - /span - inline container
div - /div - block container
div class=“bar”> text /div
!DOCTYPE HTML - this is the doctype
html
head
title title /title
/head


Name
Edgar Calderón
Career
Systems Engineer
Contact
<EMAIL_ADDRESS><EMAIL_ADDRESS>Date
This example page was created on 26/08/2020