"""Module with different loggers for rtd models and its components.
`RtdLogger` is main abstract class that all other loggers implement.
Loggers handle non-fatal events (info, debug, warning and non-fatal
error messages) as well as internally stored intermediate process data.
General guidelines:
- **Skip logging and raise Exception directly** in case of a serious
error.
- ERROR messages for highly probable sources of inaccuracies within the
model (e.g. in case a probability distributions contains only a few
data points), but we don't necessarily want to raise an exception.
- WARNING messages for warnings about potential sources of inaccuracy
in the model.
- INFO for storing short intermediate data (everything apart from time
series).
- DEBUG for storing long intermediate data (time series).
See Also
--------
:class:`bio_rtd.logger.RtdLogger`
Examples
--------
>>> log = DefaultLogger()
>>> log.e("Error Description") # log error
Traceback (most recent call last):
RuntimeError: Error Description
>>> log.w("Warning Description") # log waring
Warning Description
>>> log.i("Info") # log info
>>> log.log_data = True
>>> log.log_level_data = RtdLogger.DEBUG
>>> data_tree = dict()
>>> log.set_data_tree("test_data_tree", data_tree)
>>> log.i_data(data_tree, "a", 3) # store value in logger
>>> log.d_data(data_tree, "b", "lots_of_data") # store at DEBUG level
>>> log.get_data_tree("test_data_tree",)["b"]
'lots_of_data'
>>> log = StrictLogger() # raises RuntimeError already on WARNING level
>>> log.w("Warning Info")
Traceback (most recent call last):
RuntimeError: Warning Info
"""
__all__ = ['RtdLogger', 'DefaultLogger', 'DataStoringLogger', 'StrictLogger']
__version__ = '0.7.1'
__author__ = 'Jure Sencar'
import inspect as _inspect
import typing as _typing
from abc import ABC as _ABC, abstractmethod as _abstractmethod
from collections import OrderedDict as _OrderedDict
[docs]class RtdLogger(_ABC):
"""Abstract class for log and log data in rtd models.
Logger has different levels: DEBUG, INFO, WARNING, ERROR.
Logger has option to hold copies of intermediate data.
Attributes
----------
log_level
Verbosity level for messages. Default = `WARNING`.
log_data
If True, logger collects copies of intermediate data.
Default = False.
log_level_data
'Verbosity level' for data.
Default = `DEBUG`. Ignored if `log_data` is False.
"""
ERROR = 40
"""Log level ERROR.
ERROR level is meant for signaling events (with messages) that very
likely impact the accuracy of the model.
"""
WARNING = 30
"""Log level WARNING.
WARNING level is meant for signaling events (with messages) that
might be the source of inaccuracies in the model.
"""
INFO = 20
"""Log level INFO.
INFO level is meant for events that might indicate potential mishaps
in the model, but can also occur normally (e.g. if surge tank runs
dry). This info might help explain the spectra, but it might also
be a normal occurrence during the shut-down phase.
INFO level is also meant for keeping small intermediate results
(no time series) in logger.
"""
DEBUG = 10
"""Log level DEBUG.
DEBUG level is meant for keeping also large intermediate data
(time series) in logger.
"""
def __init__(self,
log_level: int = WARNING,
log_data: bool = False,
log_level_data: int = DEBUG):
self.log_level = log_level
self.log_data = log_data
self.log_level_data = log_level_data
self._data_tree_root = _OrderedDict()
[docs] def i(self, msg: str):
"""Log message at INFO level
INFO level is meant for events that might indicate potential
mishaps the model, but can also occur normally.
Examples
--------
Reporting that surge tank ran dry.
This info might help explain the spectra, but it might just
as well be a normal occurrence during the shut-down phase.
"""
self.log(level=self.INFO, msg=msg)
[docs] def w(self, msg: str):
"""Log message at WARNING level
WARNING level is meant for signaling events that might be the
source of inaccuracies in the model.
Examples
--------
Suspicious probability distributions.
Empty concentration of flow rate profiles.
Assumptions that might impact the results, such as assumptions
during steady-state estimation.
"""
self.log(level=self.WARNING, msg=msg)
[docs] def e(self, msg: str):
"""Log message at ERROR level
ERROR level is meant for signaling events that are very likely
the source of or the sign of inaccuracies in the model, but not
severe enough to raise an exception in all situations (e.g. in
an interactive session via GUI).
If the issue is big enough to warrant an exception, then raise
the exception instead of using this log.
Examples
--------
Probability distribution with only few data points.
Probability distribution with a high cut-off at time 0.
Load phase of PCC being shorter than the rest of the process.
"""
self.log(level=self.ERROR, msg=msg)
[docs] def set_data_tree(self, data_tree_id: str, data_tree: dict):
"""Seeds data tree in root dictionary.
Typically `tree_id = uo.id` and `tree_root = dict()`.
Unit operation needs to save a reference to the `tree_root`
in order to store data in this logger.
Parameters
----------
data_tree_id: str
Id of root tree (typically id of unit operation).
data_tree: dict
Root for data logging (for that unit operation).
Examples
--------
>>> log = DataStoringLogger()
>>> data_tree = dict()
>>> log.set_data_tree("my_uo", data_tree)
>>> log.i_data(data_tree, "par_a", 10.4)
>>> data_tree["par_a"]
10.4
"""
self._data_tree_root[data_tree_id] = data_tree
# noinspection PyMethodMayBeStatic
[docs] def set_branch(self,
data_tree: dict,
branch_name: str,
branch: _typing.Union[dict, list]):
"""Seeds branch into data tree.
Typically used to store data from nested unit operations or
parts of unit operations (evaluation data of probability
distributions, breakthrough profiles, etc.).
Parameters
----------
data_tree: dict
Parent data tree.
branch_name: dict
Branch (child tree) name.
branch: dict
Branch (child tree).
Examples
--------
>>> log = DataStoringLogger()
>>> data_tree = dict()
>>> branch_tree = dict()
>>> log.set_data_tree("my_uo", data_tree)
>>> log.set_branch(data_tree, "pdf", branch_tree)
>>> log.i_data(branch_tree, "par_b", 8.4)
>>> data_tree["pdf"]["par_b"]
8.4
>>> branch_tree["par_b"]
8.4
"""
data_tree[branch_name] = branch
[docs] def i_data(self, tree: dict, key: str, value: any):
"""Log smaller data (no time series).
Populates (key, value.copy()) pair into `tree`
if `log_level_data` >= `INFO` and `log_data` is True.
If the copy of the value is stored, then the
`self._on_data_stored` function is called.
"""
self._store_data(level=self.INFO, tree=tree, key=key, value=value)
[docs] def d_data(self, tree: dict, key: str, value: any):
"""Log larger intermediate data (time series).
Populates (key, value.copy()) pair into `tree`
if `log_level_data` >= `DEBUG` and `log_data` is True.
If the copy of the value is stored, then the
`self._on_data_stored` function is called.
"""
self._store_data(level=self.DEBUG, tree=tree, key=key, value=value)
def _store_data(self, level: int, tree: dict, key: str, value: any):
if self.log_data and level >= self.log_level_data:
tree[key] = value.copy() if hasattr(value, 'copy') else value
self._on_data_stored(level, tree, key, value)
@_abstractmethod
def _on_data_stored(self,
level: int, tree: dict,
key: str, value: any): # pragma: no cover
"""Functions that is called after the data has been logged."""
raise NotImplementedError
@staticmethod
def _get_parent_log_id() -> str:
"""Find closest 'log_entity_id' of the notifying instance.
It is convenience method to provide unit operation to be used
e.g. for adding information to the printed log messages.
"""
for frame in _inspect.stack():
# noinspection PyProtectedMember
if "self" in frame[0].f_locals.keys() \
and hasattr(frame[0].f_locals["self"], '_log_entity_id')\
and len(frame[0].f_locals['self']._log_entity_id) > 0:
# noinspection PyProtectedMember
return f"{frame[0].f_locals['self']._log_entity_id}: "
return ""
[docs] def get_data_tree(self, data_tree_id: str) -> dict:
"""Returns reference to the registered data tree."""
return self._data_tree_root[data_tree_id]
[docs] def get_entire_data_tree(self):
"""Returns reference to the dict with all logged data."""
return self._data_tree_root
[docs] @_abstractmethod
def log(self, level: int, msg: str): # pragma: no cover
"""Log messages at specific log level.
See documentation of `self.e()`, `self.w()` and `self.i()` on
info about what belongs under which log level.
"""
raise NotImplementedError
[docs]class DefaultLogger(RtdLogger):
"""Prints warnings to terminal and raises errors.
Does not store data.
Parameters
----------
log_level
Default: WARNING.
log_data
Default: False.
log_level_data
Default: DEBUG.
Examples
--------
>>> log = DefaultLogger()
>>> data_tree = dict()
>>> log.set_data_tree("my_uo", data_tree)
>>> log.i_data(data_tree, "par_i", 8.4) # ignored
>>> log.d_data(data_tree, "par_d", 5.4) # ignored
>>> len(data_tree.keys()) # no data
0
>>> log.i(msg="Info msg") # ignored
>>> log.w(msg="Warning msg")
Warning msg
>>> log.e(msg="Error msg")
Traceback (most recent call last):
RuntimeError: Error msg
See Also
--------
:class:`bio_rtd.logger.RtdLogger`
"""
def __init__(self,
log_level: int = RtdLogger.WARNING,
log_data: bool = False,
log_level_data: int = RtdLogger.DEBUG):
super().__init__(log_level, log_data, log_level_data)
[docs] def log(self, level: int, msg: str):
"""Log messages.
Prints warnings (and infos)
to terminal and raises errors as `RuntimeError`.
"""
if level >= self.log_level:
if level >= self.ERROR:
raise RuntimeError(msg)
elif level == self.WARNING:
print(f"WARNING: {self._get_parent_log_id()}{msg}")
else:
print(f"{self._get_parent_log_id()}{msg}")
def _on_data_stored(self, level: int, tree: dict, key: str, value: any):
pass
[docs]class DataStoringLogger(RtdLogger):
"""Prints messages to terminal. Stores all data.
Parameters
----------
log_level
Default: WARNING.
log_data
Default: True.
log_level_data
Default: DEBUG.
Examples
--------
>>> log = DataStoringLogger()
>>> data_tree = dict()
>>> log.set_data_tree("my_uo", data_tree)
>>> log.i_data(data_tree, "par_i", 8.4) # stored
>>> log.d_data(data_tree, "par_d", 5.4) # stored
>>> len(data_tree.keys()) # no data
2
>>> data_tree["par_i"]
8.4
>>> data_tree["par_d"]
5.4
>>> log.i(msg="Info msg") # ignored
>>> log.w(msg="Warning msg")
Warning msg
>>> log.e(msg="Error msg")
Error msg
>>> log.log_level = log.INFO
>>> log.i_data(data_tree, "par_i_2", 18.4) # stored and printed
Value set: par_i_2: 18.4
>>> data_tree["par_i_2"]
18.4
See Also
--------
:class:`bio_rtd.logger.RtdLogger`
"""
def __init__(self,
log_level: int = RtdLogger.WARNING,
log_data: bool = True,
log_level_data: int = RtdLogger.DEBUG):
super().__init__(log_level, log_data, log_level_data)
[docs] def log(self, level: int, msg: str):
"""Prints to terminal everything above `log_level`."""
if level >= self.log_level:
if level == self.ERROR:
print(f"ERROR: {self._get_parent_log_id()}{msg}")
elif level == self.WARNING:
print(f"WARNING: {self._get_parent_log_id()}{msg}")
elif level >= self.INFO:
print(f"INFO: {self._get_parent_log_id()}{msg}")
else:
print(f"DEBUG: {self._get_parent_log_id()}{msg}")
def _on_data_stored(self, level: int, tree: dict, key: str, value: any):
# send to log function if INFO or higher
if level >= self.INFO:
self.log(level, "Value set: " + key + ": " + str(value))
[docs]class StrictLogger(RtdLogger):
"""Raises RuntimeError on warning and error messages.
log_level = WARNING.
log_data = False.
Examples
--------
>>> log = StrictLogger()
>>> log.i(msg="Info msg") # ignored
>>> log.w(msg="Warning msg")
Traceback (most recent call last):
RuntimeError: Warning msg
>>> log.e(msg="Error msg")
Traceback (most recent call last):
RuntimeError: Error msg
See Also
--------
:class:`bio_rtd.logger.RtdLogger`
"""
def __init__(self):
super().__init__(log_level=RtdLogger.WARNING, log_data=False)
[docs] def log(self, level: int, msg: str):
"""Raises RuntimeError if `level` >= WARNING."""
if level >= RtdLogger.WARNING:
raise RuntimeError(self._get_parent_log_id() + msg)
def _on_data_stored(self, level: int, tree: dict, key: str, value: any):
pass


Premier League mascots - ranked! From Manchester United's Fred the Red to Arsenal's Gunnersaurus Rex
by Chris WrightFrom Manchester United's Fred the Red to Arsenal's Gunnersaurus Rex, every single one of the 20 Premier League mascots -- ranked!
The Toe Poke Daily is here every day to bring you all the weirdest stories, quirkiest viral content and top trolling that the internet has to offer, all in one place.
After the purgatory of the international break, the Premier League is finally back! So what better way to mark four months of almost unbroken club action than by re-acqainting ourselves with those most unsung of heroes -- club mascots.
You really can't beat a good mascot. Sure, you pay your ticket money to see an actual game of football, but what with all the waiting around prematch and at half-time, you need someone -- preferably an anthropomorphised character -- to keep the excitement level up.
There was a time, not so long ago, when their presence on the touchline was a novelty in the Premier League, but now they are ubiquitous in England's top flight.
Here is our in-no-way-scientific countdown from worst to best for the 2019-20 season.
20. Hammerhead (West Ham United)
When you fail your audition for the Transformers movie by being far too weird, your second best bet is to try your hand as a Premier League mascot.
19. Monty Magpie (Newcastle United)
Just imagine waking up in the middle of the night to find that monochrome monstrosity glowering over your bed.
18. Wolfie the Wolf (Wolverhampton Wanderers)
Wolfie's a solid character but nothing to write home about.
17.
16. Captain Canary (Norwich City)
The portly yellow bird is a mainstay at Carrow Road, where he's dutifully served as mascot for decades while always looking rather sorrowful.
15. Gully (Brighton & Hove Albion)
A hardy soul, Gully certainly isn't afraid to entertain the Albion faithful in even the most adverse weather conditions.
14. Captain Blade (Sheffield United)
One of two Premier League mascots to have ascended to the rank of captain, which is impressive in its own right.
13. Mighty Red (Liverpool)
We're reliably informed that Mighty is modelled on the mythical liver bird, which is a symbol of both Liverpool as a club and a city, and not some kind of winged fish.
- Euro 2020 mascot: Is it worst from past tournaments?
- Wigan's new mascot is... a pie.
- The most terrifying mascot in soccer
12. Sammy and Mary Saint (Southampton)
Careful what you say about the Saints. They've obviously got friends in high places.
11. Stamford and Bridget (Chelsea)
Any way you choose to slice it, naming Chelsea's mascots "Stamford and Bridget" is undeniable top-level pun work.
10. Chirpy and Lily Cockerel (Tottenham Hotspur)
Is it not rather fitting that Spurs' mascots be a pair of giant chickens?
9. Virtual mascot (Everton)
Changy the Elephant had been Everton's mascot, until the club's sponsorship deal with a Thai beer company ended. There seems to be a vacancy for a fluffy rabble-rouser at Goodison Park these days.
However, the Toffees led the way last season when they became the first club to experiment with a "virtual mascot" -- a small robotic camera unit that allowed a young fan with a long-term illness to attend the game remotely from their hospital bed, which is just lovely.
8. Moonchester and Moonbeam (Manchester City)
Moonchester and Moonbeam are so called because they arrived at the Etihad from the moon after hearing City fans singing "Blue Moon." Sheer lunar-cy if you ask us.
7. Hercules and Bella (Aston Villa)
While Hercules is suitably fearsome, Bella is the often the picture of politeness and manners -- often seeking congratulatory handshakes and hugs with opposing managers.
6. Bertie Bee (Burnley)
Perhaps the only Premier League mascot to spend time behind bars -- for suggesting the linesman needed spectacle-based visual assistance during a game against QPR in 2013.
5. Pete the Eagle (Crystal Palace)
As far as we know, Pete is the only mascot ever to wear sunglasses -- ergo, he must be an extremely cool chap.
4. Fred the Red (Manchester United)
A scene regular since 1994, Fred is a true wizened old timer on the mascot circuit. Nobody can deny his credentials. Through thick and indeed, thin.
3. Harry the Hornet (Watford)
Famed for his scrapes with Roy Hodgson, Harry is still the mascot for all seasons. He'll even muck in with the ground staff if required.
2. Filbert Fox (Leicester City)
Filbert is a title-winning fox. Not many can boast that. He's also the first Premier League mascot to earn his very own boot sponsorship deal.
1. Gunnersaurus Rex (Arsenal)
With high-fives and cuddles on tap for players and managers alike, Gunnersaurus is an affable 7-foot dinosaur who just wants what's best for the team.
It can also dispatch a mean penalty kick when called upon.
Gunnersaurus' Arsenal debut on Aug. 20, 1993 at the club's old Highbury ground before a match against Manchester City, and hasn't looked back since.
It was created by young fan Peter Lovell, who won a competition among Junior Gunners to design a new touchline hero to rally the fans during the trophy-laden yet goal-sparse era of George Graham's management.
"It always gets me," Lovell told ESPN's Chris Jones. "It was one of those moments in the history of my life, if it hadn't have happened. ... How it transformed me, helped to form a growing mind, the confidence it gave me, the belief. So much has come from that belief. That's the moment I went from being intimidated by the world to believing that I could do anything. It's beautiful."
Hard to argue with that.


We love nothing more than giving you one less thing to worry about on your special day. We'll be with you through every toast, dance, and ceremony, making sure that you have the photos to remember it by.
Wedding packages start as low as $250 and include:
Photographs of the venue, rings, ceremony, and reception
Digital editing of the photographs to make sure they look their best
A digital album that you can access and have printed at any time (no more worrying about faded pictures!)


The OasisThe Place for Paradise |
Accommodations |
Activities |
Travel Information |
Picture Gallery |
|---|
Luxury |
|---|
Beachfront |
Casino |
Resort |
Rave |


{% extends 'home/base.html' %} {% load staticfiles%} {% block content %}
Get trainings with practical knowledge on the latest technologies that will make you competent in todays technology job market.
Apply NowOur job placement program will help you reach out to companies, prepare your resume, prepare you for the interviews and help you find the opportunities that match your skillset
This program is one-of-a-kind service designed to help trained technology enthusiasts begin their careers in the technology industry.
This program is a "Must Try" for anyone in the tech industry looking for his or her first job. Every trained person should apply because the program is completely free unless the person gets a job in the area of specialization. There is nothing to lose. You should apply and get started now.
Our Entry Level programme provides young professionals interested in pursuing a career in development an exceptional opportunity to acquire hands-on experience.
Our Senior Entry Level assists professionals, managers, and executives in finding or upgrading their employability. The program includes hands-on practical training, one-on-one coaching and professional-level job leads.
Linux Administration
DevOps
Linux
Database Administration
Cloud Administration and Architecture
Java Development
Python Development
LinuxJobbers job placement program matches
you to top paying tech jobs easily.


{% extends "base.html" %} {% block buttons %} {% if session.uid %} {% endif %} {% endblock %} {% block app %} {%- for post in posts %}
hi, this is some content to go below posts. this is just some dummy content for now but in the future could include information about the nation that wrote this post.


Popular Areas in how did humans arrive on earth
How Did Man Arrive on Earth? - Hinduism Today Magazine
How did humankind come to inhabit a blue marble spinning in black space?  Did we evolve from simpler forms of life? Could we .
http://www.hinduismtoday.com/modules/smartsection/item.php?itemid=3641
How Did Life on Earth Get Started? - US News and World Report
Jul 24, 2008 . How Did People Reach the Americas? . Yet as close as they've come to pinning it down, some admit the particulars may never be fully .
http://www.usnews.com/science/articles/2008/07/24/how-did-life-on-earth-get-started
How did water get to Earth? - Curiosity
How did water get to Earth? Learn about some of a few of the theories of how water got to Earth at Curiosity.com. . Director, MIT Human Dynamics Laboratory .
http://curiosity.discovery.com/question/how-water-got-to-earth
Aliens to come to Earth to enslave and eat humans - English pravda.ru
Aug 25, 2011 . Aliens to come to Earth to enslave and eat humans . "Just as we did to those beings, the extraterrestrials might proceed to kill, infect, dissect, .
http://english.pravda.ru/science/mysteries/25-08-2011/118863-aliens-0/
When did human beings first inhabit the earth
The first record of a hominid is debatable either between 6-7 million years ago ( Toumai fossil from Chad) or 3-4 million years ago (well know Lucy fossil).
http://wiki.answers.com/Q/When_did_human_beings_first_inhabit_the_earth
ZECHARIA SITCHIN (WHERE WE COME FROM)
So how did an ancient race of people know this fact? Sitchin says it is because these ancient people did not come from Earth, but from Nibiru. Profound family .
http://www.mars-earth.com/sitchintext.htm


Main Interface
The main interface allows students and staff to check students in and out, and record when students are outside at the playground.
Java Persistence API Entities Used in the Main Interface
The entities used in the main interface encapsulate data stored and manipulated by Duke's Tutoring, and are located in the dukestutoring.entity package in the dukes-tutoring-common project.
The Person entity defines attributes common to students, guardians, and administrators tracked by the Duke's Tutoring application. These attributes are the person's name and contact information, including phone numbers and email address. The phone number and email address attributes have Bean Validation annotations to ensure that the submitted data is well-formed. The email attribute uses a custom validation class, dukestutoring.util.Email. Person has three subclasses, Student, Guardian, and Administrator. For additional data common to all people, the PersonDetails entity is used to store attributes like pictures and the person's birthday that aren't included in the Person entity for performance reasons.
The Student entity stores attributes specific to the students that come to tutoring. This includes information like the student's grade level and school. The Guardian entity's attributes are specific to the parents or guardians of a Student. Students and guardians have a many-to-many relationship. That is, a student may have a one or more guardians, and a guardian may have one or more students. The Administrator entity is for staff who manage the tutoring center.
The Address entity represents a mailing address, and is associated with Person entities. Addresses and people have a many-to-one relationship. That is, one person may have many addresses.
The TutoringSession entity represents a particular day at the tutoring center. A particular tutoring session tracks which students attended that day, and which students went to the park. Associated with TutoringSession is the StatusEntry entity, which logs when a student's status changes. Student's status changes when they check in to a tutoring session, when they go to the park, and when they check out. The status entry allows the tutoring center staff to track exactly which students attended a tutoring session, when they checked in and out, which students went to the park while they were at the tutoring center, and when they went to and came back from the park.
For information on creating Java Persistence API entities, see Chapter 32, Introduction to the Java Persistence API. For information on validating entity data, seeValidating Persistent Fields and Properties and Chapter 49, Bean Validation: Advanced Topics.
Enterprise Beans Used in the Main Interface
The enterprise beans used in the main interface provide the business logic for Duke's Tutoring, and are located in the dukestutoring.ejb package in the dukes-tutoring-war project.
ConfigBean is singleton session bean used to create the default students, guardians, and administrator when the application is initially deployed, and to create an automatic EJB timer that creates tutoring session entities every weekday.
RequestBean is a stateless session bean containing the business methods for the main interface. Students or staff can check students in and out and track when they go to and come back from the park. The bean also has business methods for retrieving lists of students. The business methods in RequestBean use strongly-typed Criteria API queries to retrieve data from the database.
For information on creating and using enterprise beans, see Part IV, Enterprise Beans. For information on creating strongly-typed Criteria API queries, see Chapter 35, Using the Criteria API to Create Queries.
Facelets Files Used in the Main Interface
The Duke's Tutoring application uses Facelets to display the user interface, and makes extensive use of the templating features of Facelets. Facelets is the default display technology for JavaServer Faces, and consists of XHTML files located in the tut-install/examples/case-studies/dukes-tutoring/dukes-tutoring-war/web directory.
The following Facelets files are used in the main interface:
- template.xhtml
Template file for the main interface.
- error.xhtml
Error file if something goes wrong (this shouldn't occur).
- index.xhtml
Landing page for the main interface.
- park.xhtml
Page showing who is currently at the park.
- current.xhtml
Page showing who is currently in today's tutoring session.
- statusEntries.xhtml
Page showing the detailed status entry log for today's session.
- resources/components/allStudentsTable.xhtml
A composite component for a table displaying all active students.
- resources/components/currentSessionTable.xhtml
A composite component for a table displaying all students in today's session.
- resources/components/parkTable.xhtml
A composite component for a table displaying all students currently at the park.
- WEB-INF/includes/navigation.xhtml
XHTML fragment for the main interface's navigation bar.
- WEB-INF/includes/footer.xhtml
XHTML fragment for the main interface's footer.
For information on using Facelets, see Chapter 5, Introduction to Facelets.
Helper Classes Used in the Main Interface
The following helper classes, in the dukes-tutoring-common project's dukestutoring.util package, are used in the main interface:
- CalendarUtil
A class that provides a method to strip the unnecessary time data from java.util.Calendar instances.
Custom Bean Validation annotation class for validating email addresses in the Person entity.
- StatusType
An enumerated type defining the different statuses that a student can have. Possible statuses are: IN, OUT, and PARK. StatusType is used throughout the application, including in the StatusEntry entity, and throughout the main interface. StatusType also defines a toString method that returns a localized translation of the status based on the locale.
The following helper classes, in the dukes-tutoring-war project's dukestutoring.web.util package, are used in the JavaServer Faces application:
- EntityConverter
A parent class to StudentConverter and GuardianConverter that defines a cache to store the entity classes when converting the entities for use in JavaServer Faces user-interface components. The cache helps increase performance. The cache is stored in the JavaServer Faces context.
- StudentConverter
A JavaServer Faces converter for the Student entity class. This class contains methods to convert Student instances to strings and back again, so they can be used in the user-interface components of the application.
- GuardianConverter
Similar to StudentConverter, this class is a converter for the Guardian entity class.
Properties Files
The strings used in the main interface are encapsulated into resource bundles to allow the display of localized strings in multiple locales. Each of the following properties files has locale-specific files, appended with the locale code, containing the translated strings for that locale. For example, Messages_es.properties contains the localized strings for Spanish locales.
The dukestutoring.util package in the dukes-tutoring-common project has the following resource bundle:
- StatusMessages
Strings for each of the status types defined in the StatusType enumerated type for the default locale. Each supported locale has a property file of the form StatusMessages_locale prefix.properties containing the localized strings. For example, the strings for Spanish-speaking locales are located in StatusMessages_es.properties.
- ValidationMessages.properties
Strings for the default locale used by the Bean Validation runtime to display validation messages. This file must be named ValidationMessages.properties and located in the default package as required by the Bean Validation specification. Each supported locale has a property file of the form ValidationMessages_locale prefix.properties containing the localized strings. For example, the strings for German-speaking locales are located in ValidationMessages_de.properties.
- dukestutoring/web/messages/Messages.properties
Strings for the default locale for the main and administration Facelets interface. Each supported locale has a property file of the form Messages_locale prefix.properties containing the localized strings. For example, the strings for simplified Chinese-speaking locales are located in Messages_zh.properties.
For information on localizing web applications, see Registering Application Messages.
Deployment Descriptors Used in Duke's Tutoring
The following deployment descriptors in the dukes-tutoring-war project are used in Duke's Tutoring:
- src/conf/beans.xml
An empty deployment descriptor file used to enable the CDI runtime.
- web/WEB-INF/faces-config.xml
The JavaServer Faces configuration file.
- web/WEB-INF/glassfish-web.xml
The GlassFish-specific configuration file.
- web/WEB-INF/web.xml
The web application configuration file.
The following deployment descriptor in the dukes-tutoring-common project is used in Duke's Tutoring:
- src/META-INF/persistence.xml
The Java Persistence API configuration file.
No enterprise bean deployment descriptor is used in Duke's Tutoring. Annotations in the enterprise bean class files are used for the configuration of enterprise beans in this application.


| Home | Trees | Indices | Help |
|
|---|
|
|
|
|||
|
long int(x=0) -> int or long int(x, base=10) -> int or long |
|||
| TimeoutError | |||
|
Facts This class should only attempt to populate those facts that are mostly generic to all systems. |
|||
|
Distribution This subclass of Facts fills the distribution, distribution_version and distribution_release variables |
|||
|
Hardware This is a generic Hardware subclass of Facts. |
|||
|
LinuxHardware Linux-specific subclass of Hardware. |
|||
|
SunOSHardware In addition to the generic memory and cpu facts, this also sets swap_reserved_mb and swap_allocated_mb that is available from *swap -s*. |
|||
|
OpenBSDHardware OpenBSD-specific subclass of Hardware. |
|||
|
FreeBSDHardware FreeBSD-specific subclass of Hardware. |
|||
| DragonFlyHardware | |||
|
NetBSDHardware NetBSD-specific subclass of Hardware. |
|||
|
AIX AIX-specific subclass of Hardware. |
|||
|
HPUX HP-UX-specific subclass of Hardware. |
|||
|
Darwin Darwin-specific subclass of Hardware. |
|||
|
Network This is a generic Network subclass of Facts. |
|||
|
LinuxNetwork This is a Linux-specific subclass of Network. |
|||
|
GenericBsdIfconfigNetwork This is a generic BSD subclass of Network using the ifconfig command. |
|||
|
HPUXNetwork HP-UX-specifig subclass of Network. |
|||
|
DarwinNetwork This is the Mac OS X/Darwin Network Class. |
|||
|
FreeBSDNetwork This is the FreeBSD Network Class. |
|||
|
DragonFlyNetwork This is the DragonFly Network Class. |
|||
|
AIXNetwork This is the AIX Network Class. |
|||
|
OpenBSDNetwork This is the OpenBSD Network Class. |
|||
|
SunOSNetwork This is the SunOS Network Class. |
|||
|
Virtual This is a generic Virtual subclass of Facts. |
|||
|
LinuxVirtual This is a Linux-specific subclass of Virtual. |
|||
|
FreeBSDVirtual This is a FreeBSD-specific subclass of Virtual. |
|||
| DragonFlyVirtual | |||
|
OpenBSDVirtual This is a OpenBSD-specific subclass of Virtual. |
|||
|
HPUXVirtual This is a HP-UX specific subclass of Virtual. |
|||
|
SunOSVirtual This is a SunOS-specific subclass of Virtual. |
|||
|
Ohai This is a subclass of Facts for including information gathered from Ohai. |
|||
|
Facter This is a subclass of Facts for including information gathered from Facter. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
HAVE_SELINUX = True
|
|||
HAS_SSLCONTEXT = True
|
|||
GATHER_TIMEOUT = None hash(x) |
|||
FACT_SUBSETS =
|
|||
VALID_SUBSETS =
|
|||
__package__ =
|
Imports: os, sys, stat, time, shlex, errno, fnmatch, glob, platform, re, signal, socket, struct, datetime, getpass, pwd, configparser, get_all_subclasses, StringIO, maketrans, selinux, json, LooseVersion
|
FACT_SUBSETS
|
VALID_SUBSETS
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Fri Jul 29 13:11:37 2016 | http://epydoc.sourceforge.net |


Select to silently finish the merge if the exitCode of the external merge tool is set to 0 (successful). Otherwise, you will be prompted to indicate the success of the resolution after the tool has exited.
exitCode
0


Ruby Basics
Introduction to Ruby
Hello Ruby Koders,
These are our first shownotes from our Google Hangout session that we had on March 1, 2014. This also doesn't include the quiz stuff that we worked on, I'm gonna write a seperate article for that
In our session we discussed the following topics:
Brief Introduction
What is Ruby
Ruby is a programming language created by an awesome Programmer from Japan named Yukihiro Matusumoto(or Matz). He had a vision of creating a scripting language that was more powerful than pearl and more object oriented than python. He wanted to make the language human readable and often said "natural, not simple" in a way that it mirrors life.
Everything is an object in Ruby
In Ruby, just like in real life, our world is filled with objects. Everything is an object - integers, characters, text, arrays - everything. - Ruby Monk
This will be discussed later on when we tackle OOP more in the future
Ruby Version Managers
We need version managers because a Ruby version might have a specific syntax that has been deprecated in another and using another version of Ruby to run an application or script that requires a specific version of Ruby could result to multiple syntax errors.
To solve this we use a tool called version manager, version managers allows us to install and work with different Ruby environment, interpreters and gems.
The following are the most notable ruby version managers out there
Gems
A gem is a module or a library that you can install in your ruby projects so that you are able to use these inside your projects. Gems provide extensions and additional features that extends the capabilities or the Ruby language.
Throughout our hangouts we will be making use of different gems.
Code begins here.
Simple iterations with Ruby
If you were to write a loop in Java it would probably look like this:
class HelloWorld {
public static void main(String[] args) {
for(int i=0;i<3;i++)
System.out.println("Hello World!");
}
}
This will return:
Hello World! Hello World! Hello World!
in Ruby we can do the same thing, with a simple and readable(for beginners) line of code.
3.times { puts "Hello World!" }
Short and sweet, and it returns the same as above. This is what makes Ruby such a likeable language for most people.
Comments
Comments are just words or phrases that you want to put into your code but you don't really want them to be executed as Ruby code. These could be either used in debugging by commenting out lines that are having problems or documenting. To write a variable in Ruby just add the pound key #
before the text
# This line doesn't work I wonder why
# int i = 0
#
# Maybe I'll have a sandwich today.
# Nope.. coffee will do just fine.
# This will print out hello world
puts "Hello world"
puts "I like sushi"
# Hi ruby
you can also write comments with multiple lines using this syntax
=begin
I'm just commenting.. right here.
None of this will be executed.
Don't believe me?
puts "Believe me!"
=end
Variables
Since Ruby is a dynamic programming language we don't have to declare variable types anymore! Goodbye int i = 0
and hello
# we can assign an integer to a variable
i = 0
# replace it with a string
i = "a string! wow!"
# replace it with a boolean
i = true
# replace it with a string again.... with a heart shape because everyone likes hearts
i = "dynamic <3"
Ruby programmers like to use the "Ruby Convention" or the "Ruby Way" . We like using underscores, NOT ~~camel case~~ (sorry programmers from other languages TT_TT we don't hate you I promise <3)
So instead of writing something like: myFirstVariableInRuby
we want to see something like my_first_variable_in_ruby
I would advise you all to follow this convention, it's still acceptable if you use camel case but that's just not the "Ruby Way"
Constants
Constants are variables that contain values that you do not expect to change. Consonants must start with a capital letter, and just like the "Ruby Way" we do it with underscores
Unlike some languages, Ruby will let you change the values in constants by assigning a new value to them
MINIMUM_CUPS_OF_COFFEE_EVERYDAY = 1
NUMBER_OF_FINGERS_IN_ONE_HAND = 5
# I'm changing it, haha!
MINIMUM_CUPS_OF_COFFEE_EVERYDAY = 2 # YESSSS!!!!!!
NUMBER_OF_FINGERS_IN_ONE_HAND = 6 # WHAAAATTTTTT?????!!!!
Conditionals
If statement
Our first conditional! yay!
if-statement is a condtional statement that will execute if the condition is true and it also has an option to execute another code if it returns false. The condition is passed as an argument to the if statement.
# here we have a variable set to true
you_like_ruby = true
# we pass the variable to the if statement
if (you_like_ruby)
# when the value is true this will be executed
puts "We can be friends"
else
# when the value is false this will be executed
puts "We can still be friends"
end
and we can see how natural it feels to read the code.
If you like Ruby we can be friends, if not, we can still be friends
Unless statement
This statement is pretty unique to Ruby, the sytax is similar to the if
statement but it works the opposite(because unless is the opposite of if). If the passed value returns false
the first statement will run, unless
also supports else
so if it returns true it will run the code inside the else
time_to_drink_coffee = true
unless time_to_drink_coffee
# keep programing with ruby
else
# go get coffee
end
Did you notice that i didn't put ()
for passing arguments? Ruby allows us to leave out the parenthesis! :) Isn't it cool?
Let's read this like the if statement
Unless it's time to drink coffee then keep programming with Ruby, if yes(time to drink coffee) then go get coffee
I admin sometimes unless statements gets pretty confusing sometimes. This is how I would use if
and unless
Instead of doing
time_to_go_out = true
if !time_to_go_out
# stay in
end
I would prefer to use unless
time_to_go_out = true
unless time_to_go_out
# just stay inside
end
BUT
I wouldn't use an unless
else
because it could be confusing<EMAIL_ADDRESS>I would just use an if statement
Not this
time_to_go_out = true
unless time_to_go_out
# stay inside
else
# go run
end
But this
time_to_go_out = true
if time_to_go_out
# go run
else
# stay inside
end
I won't put case statements here, lets do that next time alrighty
Nil nils.
What is nil? You might be familiar with NULL or nothing/nada. Let's say we want to perform an operation in an object, but we don't know if it exists.
We can simply do
# .nil is a method that you can call any object to check if they have no value or if they have a value.
# it can get oretty tricky because it doesn't necessarily mean empty.
# "" this is an empty string, it's not nil, but it's empty
if cool_object.nil?
puts "cool object doesn't exist"
else
puts cool_object.inspect
end
Range
A range represents an interval or a set of values with a beginning and an end.
# let's create a range from 1-20
#to do that we can simply do
my_first_range = (1..20)
Yay! we created a range, but hmm, what can we do with it? ...
Well let's try going through each
of them and print out their values!
my_first_range.each { |x| puts x }
## or optionally
my_first_range.each do |x|
puts x
end
awesome! that will return
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Simple shorthand trick
If you're familiar with arrays, this is a trick that I showed to turn a range into an array
range_array = *1..5
# yup that's pretty much it.
# that will return [1,2,3,4,5] (which is an array)
Arrays
Yay our first collection
Arrays are a collection of objects that are in order with index values that start with zero.
# I mentioned that arrays have positions that start with zero.
# here are positions|0|1|2|3|4|
one_to_five_array = [1,2,3,4,5]
Methods we used in the hangout
Array#push
the push
method takes in an argument and this will be added to the array.
x = [1,2,3]
# push for to the array
x.push(4)
# now the x array now has [1,2,3,4]
shorthand bonus
# the code does the same thing as the code above! :)
x << 4
Array#pop
The pop
method deletes the last object in the array. So the object goes.. POP! ... get it? no..? Ok..
x = [1,2,3]
x.pop
# 3 has been 'popped' so the x array now contains [1,2]
Array#delete
The delete
method accepts an argument and it finds it in the array and deletes it.
x = [1,2,3,4,5,6,1,1,1,1,1,1]
# hmmm. too much 1s.. let's delete them ALL!!!
x.delete(1)
# now all the 1s are gone [2,3,4,5,6]
Array#delete_at
Last command we used was delete_at
, delete_at
takes in an argument, the argument that we will pass must be the index/position of the object we want to delete in the array
x = [1,2,3,4,5,6,7]
also I noticed i just kept on using numbers but an array can hold anything. Watch!
so_many_types = [ 0.0123, 1, "Hello Ruby Koding!", true, false, { message: "hello I'm a hash, i will be introduced later" }]


Dirrefence from version1 release1
Several minor changes were made for release2.
- Bug patch
- calc_gj.m
- i_kine.m
- f_kin_j.m
- r_ne.m
- Reorganized global variablesCarguments
- covers almost all functions
- Reconstructed sourses to reduce redundant computation etc.
- calc_gj.m
- calc_hh.m
- calc_jr.m
- f_kin_j.m
Attention!!
Be aware that the order of arguments might be changed from the previous release.
Please make sure that existing programs still work correctly.
Computation speed has slightly improved due to the reduction of redundant computation.


The FoodSpan Staff's Best Memories
As our final time crunch for FoodSpan ends, we asked our FoodSpan staff what their fondest memories of FoodSpan were. Here are their responses:
Mary Jiang, Lead Graphic Designer and Marketing Adviser
Going to sleep after a long evening of working
Loic Darboux, Intellectual Property Specialist
Matt: Hey, can you write a blogpost for the FoodSpan website?
Me: Uh…that’s a terrible idea
Matt: Pretty please…
Me: ughh…(awkward silence)…a’ight man, just for you
This is the first time i’ve committed to writing creatively without being forced to.
Maanvi Dhillon, Business Adviser
My fondest memory would be back at McMaster when FoodSpan won our SHAD campus competition. We were all exhausted and stressed out, and I think the fog of negative feelings prevented us from realizing the value of what we created. Our group, and me especially, was so worried about the details and little parts that we missed in our project and I think the fact that our idea was good , appealing and realistic hadn’t quite sunk in until the judges called our names. Extending upon that foundational project in summer was definitely enjoyable, but it was that original moment that brought us here and I’ll never forget how amazing it felt.
Nathan Maguire, Intellectual Property Specialist
My fondest memory is just working on a project with great people from SHAD, over a month after the program ended.
Matthew Wang, Lead Developer
Finishing a twelve hour crunch of work. That small break before the next crunch… feels sooooo good.


Contact Us We are a little busy exploring space right now; we’ll get back to you when we return to this solar system.


Compound Interest Calculator
Initial Deposit
Contributions
Monthly
Annually
Investment Time Span
Estimated Rate of Return (%)
Compound Frequency
Daily
Monthly
Annually
Initial Deposit
Contributions
Investment Time Spam
Estimated Rate of Return
Future Balance


Our café has a wide range of food and drink to cater to every individual's needs.
Our professional italian coffee
Our professionally brewed tea, made with PG Tips
Our small yet invigorating espresso, brewed with care
Our small yet invigorating latté, brewed with care
Our beautiful Cadbury Dairy Milk Hot Chocolate


---
title: Unsupported Human
author: empijei
layout: single
author_profile: true
excerpt: "Welcome to 'Unsupported Human' a blog about Security, Programming and random stuff"
header:
overlay_color: "#333"
---
This Blog is a collection of weird things that happened to me, a list of random thoughts that passed through my mind.
Do not expect something coherent: this is just meant as a repository of interesting stuff I came across.
Most of the content is collected into series that relate some posts to the others, so if you like an article you should probably read more in that series.
Since what I do in most of my free time is code, there's also a section dedicated to my projects.
To get you started, here are some of my recent post:
{% for post in paginator.posts %}
{% include archive-single.html %}
{% endfor %}
{% include paginator.html %}


{# This is the unchanging top bar that is on every single page. The only piece of context it can take is `search_query`, which should be a string and will populate the search field if it exists #}


{% extends "base.html" %} {% block login %}
Warm and comfortable environment like home.Clean and disinfect the room regularly and do a good job of daily protection. Because our care and profession, Healing Paws have received many honors:
Healing paws introduces international advanced pet medical equipment, such as MRI, MRI, CT, Moller operating microscope, Drager breathing anesthesia machine for small animals in Germany, yum's MyLab color ultrasound in Italy, technix suspended C-arm in Italy, etc. it is also equipped with a number of domestic rare 10000 level laminar flow purification operating rooms. Provide more acontenturate and safe scientific diagnosis for consumers' pet, and effectively guarantee the acontenturacy and sucontentess rate of treatment!
The medical team is led by a medical expert committee composed of professors, deans and doctors. There are many young elite doctors with rich clinical experience and excellent medical skills. All doctors are required to work with certificates. The assistant veterinary doctors are graduated from animal medicine related majors


The upcoming 'Frozen 2' earworms
You won't be able to let them go
by Marianne Garvey, CNN(CNN) - "Frozen 2" is here so get ready to sing your heart out.
Although the soundtrack for the highly anticipated animated sequel was released Nov. 15, the movie's debut in theaters can only help bring new sing-alongs to life.
So what's the next "Frozen"-themed earworm?
Much like Elsa's signature anthem "Let It Go" from 2013's "Frozen," we have another power ballad destined to become iconic. Idina Menzel sings "Into the Unknown," all about unlocking the key to Elsa's past. (Panic! at the Disco does a version of the song as the first single, which plays during the end credits role in "Frozen 2.")
Next, there's "Lost In the Woods," by Weezer. The song features the group's signature sound, but it's also a ballad featuring emo lyrics like, "But is this what it feels like to be growing apart/ When did I become the one who's always chasing your heart/ Now I turn around and find I am lost in the woods/ North is south, right is left, when you're gone."
Kacey Musgraves sings a new tune called "All Is Found," for the movie's soundtrack. Composed by the "Frozen" songwriting team of Kristen Anderson-Lopez and Robert Lopez, it's an acoustic number performed in the movie by Evan Rachel Wood as Queen Iduna. It is also in the end credits.
"Can you face what the river knows?" Musgraves sings.
The movie features seven new songs in all, composed by Anderson-Lopez and Lopez. The track list also includes "Reindeer(s) Are Better Than People" from the first movie, just in time to sing us into the holiday season.


From the Death Certificate
for Velma I. Holiday, nee Wise
Ohio Department of Health
Death Certificate #72252
PLACE OF DEATH
Marietta Memorial Hospital,
Marietta, Washington Co.,
USUAL RESIDENCE OF DECEASED
Ohio, Monroe Co.
rural
street no.: Graysville Rte
PERSONAL
female, white, married to
Cecil Holiday
birth: Oct. 11, 1910, Monroe Co.,
age: 38 years 26 days
housewife
father: Asa Wise, born "don't know"
mother: Jennie Scott, born "don't know"
informant: Cecil Holiday, Graysville
burial: Nov. 9--48; Pleasant Ridge
MEDICAL CERTIFICATION
date of death: Nov. 6, 1948; 5 a.m.
physician's statement: I hereby certify that I attended the deceased
from Oct. 20, 1948 to Nov. 6, 1948; that I last saw her
alive on Nov. 6, 1948, and that death
occurred on the date and hour stated above
cause of death: burns, third degree duration: 17 days
thighs, face & trunk
external causes: accident, Oct. 20, 1948, at home,
physician: Donald
S. Williams, M.D.;
Provided by Betty Latta Kitchen
Click here for the Short-Cut Table of Contents