Represents top down graphics for an Entity as well. More...
#include <TopDownSprite.h>
Public Slots | |
| void | onInternalSpriteAnimationFinished_ (Sprite *sender, std::string animation) |
| Executed when the underlying sprite emits the "animationFinished" signal. More... | |
| void | onInternalSpriteAnimationCompletelyFinished_ (Sprite *sender, std::string animation) |
| Executed when the underlying sprite emits the "animationFinishedCompletely" signal. More... | |
| void | onInternalSpriteFrameSwitched_ (Sprite *sender, int fromFrameNum, int toFrameNum) |
| Public Slots inherited from qge::EntitySprite | |
| void | onTemporaryAnimationDone_ (EntitySprite *sender, std::string animation) |
Public Member Functions | |
| TopDownSprite () | |
| Constructs a TopDownSprite that will have no animations but the frame will by default display a "Default" graphic. More... | |
| TopDownSprite (const QPixmap &pixmap) | |
| Constructs a TopDownSprite that will have no animations but the specified pixmap will be displayed as the currently showing frame. More... | |
| void | addFrames (std::string animationName, const SpriteSheet &fromSpriteSheet, const Node &from, const Node &to) |
| Adds frames from a SpriteSheet to the TopDownSprite. More... | |
| void | addFrames (std::string resourceFolder, int numOfImages, std::string imagePrefix) |
| Another way to add frames to an animation (from a set of images with the same prefix and incrementing postfix numbers in the same folder). More... | |
| void | addFrame (const QPixmap &frame, const std::string &toAnimation) |
| Adds a single frame to the TopDownSprite. More... | |
| virtual double | actualFacingAngle () const override |
| Returns the actual angle that the EntitySprite is facing. More... | |
| virtual QRectF | boundingBox () const override |
| Returns the bounding box of the EntitySprite in local coordinates. More... | |
| virtual bool | hasAnimation (const std::string &animationName) const override |
| Returns true if the EntitySprite has the specified animation. More... | |
| virtual QPixmap | currentlyDisplayedFrame () const override |
| Returns the currently displayed frame of the EntitySprite. More... | |
| virtual void | play (const std::string &animationName, int numTimesToPlay, int fpsToPlayAt, int startingFrameNumber) override |
| Plays the specified animation. More... | |
| virtual void | stop () override |
| Stops playing the currently playing animation. The frame that it was stopped on will still show. More... | |
| virtual PlayingAnimationInfo | playingAnimation () override |
| Returns some information about the currently playing animation. More... | |
| Public Member Functions inherited from qge::EntitySprite | |
| EntitySprite () | |
| virtual | ~EntitySprite () |
| void | setFacingAngle (double angle) |
| Sets the angle that the EntitySprite should face. More... | |
| double | facingAngle () const |
| Returns the current angle that the EntitySprite is supposed to be facing. More... | |
| void | playThenGoBackToOldAnimation (const std::string animationToPlay, int numTimesToPlay, int fpsToPlayAt, int startingFrameNumber) |
| Plays the specified animation and when finished will go back to playing w.e. animation was playing before. More... | |
| void | scale (double scale) |
| Scales the EntitySprite. More... | |
Additional Inherited Members | |
| Signals inherited from qge::EntitySprite | |
| void | frameSwitched (EntitySprite *sender, int fromFrameNumber, int toFrameNumber) |
| Emitted each time the frame of a playing animation switches. More... | |
| void | animationFinished (EntitySprite *sender, std::string animation) |
| Emitted each time the EntitySprite finishes playing an animation. More... | |
| void | animationFinishedCompletely (EntitySprite *sender, std::string animation) |
| Emitted when the EntitySprite finishes playing an animation the full number of times that it was asked to play. More... | |
| Protected Attributes inherited from qge::EntitySprite | |
| QGraphicsItem * | underlyingItem_ |
| double | facingAngle_ |
| PlayingAnimationInfo | animationPlayingBefore_ |
Represents top down graphics for an Entity as well.
This class can be used to represent legit top down entities, or just a picture. If you just want a picture, pass a QPixmap into the constructor.
For TopDownSprite, you only need to add frames from a "pure" top down view. When the sprite is asked to change its facing angle, it will simply rotate the underlying picture.
| TopDownSprite::TopDownSprite | ( | ) |
Constructs a TopDownSprite that will have no animations but the frame will by default display a "Default" graphic.
| TopDownSprite::TopDownSprite | ( | const QPixmap & | pixmap | ) |
Constructs a TopDownSprite that will have no animations but the specified pixmap will be displayed as the currently showing frame.
|
overridevirtual |
Returns the actual angle that the EntitySprite is facing.
This may be different than the facingAngle() if the EntitySprite could not completely face where it was asked to face.
Implements qge::EntitySprite.
| void TopDownSprite::addFrame | ( | const QPixmap & | frame, |
| const std::string & | toAnimation | ||
| ) |
Adds a single frame to the TopDownSprite.
If the specified animation doesn't exist, it will be created.
| void TopDownSprite::addFrames | ( | std::string | animationName, |
| const SpriteSheet & | fromSpriteSheet, | ||
| const Node & | from, | ||
| const Node & | to | ||
| ) |
Adds frames from a SpriteSheet to the TopDownSprite.
| animationName | Name of the animation. |
| fromSpriteSheet | The SpriteSheet to add frames from. |
| from | Where on the SpriteSheet to start adding frames from. |
| to | Where on the SpriteSheet to stop adding frames from. If the animation with the specified name doesn't exit, it will be created. |
| void TopDownSprite::addFrames | ( | std::string | resourceFolder, |
| int | numOfImages, | ||
| std::string | imagePrefix | ||
| ) |
Another way to add frames to an animation (from a set of images with the same prefix and incrementing postfix numbers in the same folder).
See addAnimation(std::string, const SpriteSheet&, const Node&, const Node&) for more info.
|
overridevirtual |
Returns the bounding box of the EntitySprite in local coordinates.
Reimplemented from qge::EntitySprite.
|
overridevirtual |
Returns the currently displayed frame of the EntitySprite.
Implements qge::EntitySprite.
|
overridevirtual |
Returns true if the EntitySprite has the specified animation.
Implements qge::EntitySprite.
|
slot |
Executed when the underlying sprite emits the "animationFinishedCompletely" signal.
Will emit our own animationFinishedComplete signal in response.
|
slot |
Executed when the underlying sprite emits the "animationFinished" signal.
Will emit our own animationFinished signal in response.
|
slot |
|
overridevirtual |
Plays the specified animation.
Throws (assertion error) if the specified animation does not exist. If the specified animation is already playing (at current angle), does nothing (so if you want to restart, call stop() then play() again). If any other animation is currently playing, it will be stop()ed first.
Implements qge::EntitySprite.
|
overridevirtual |
Returns some information about the currently playing animation.
Call PlayingAnimationInfo::isNone() on the returned object to find out if no animation was playing.
Implements qge::EntitySprite.
|
overridevirtual |
Stops playing the currently playing animation. The frame that it was stopped on will still show.
Implements qge::EntitySprite.


Stunning Stallions
Teriffic trio
Icy Arctic Fox
Experiencing zen
Remarkable Rhododendron
Pretty in pink
Magnificent Mountains
Glisteniing in the sunset
Majestic Owl
Staring into your soul


- ImageFileLoader - Class in ModelLayer.FileLoaders
-
Loads in files as Images.
- ImageFileLoader() - Constructor for class ModelLayer.FileLoaders.ImageFileLoader
-
- ImgFileRead(String) - Static method in class ModelLayer.FileLoaders.ImageFileLoader
-
Reads a file as an image using the provided file path in the parameter.
- InGameObjectType - Enum in ModelLayer.Enumerations
-
- InGameObjectType() - Constructor for enum ModelLayer.Enumerations.InGameObjectType
-
- InGameScreen - Class in ViewLayer.Screens.InGameScr
-
- InGameScreen() - Constructor for class ViewLayer.Screens.InGameScr.InGameScreen
-
- InstantiateMenuBar() - Method in class ViewLayer.SwingUICore
-
Creates menubar on the top of the screen
- InstantiateMenuButtons() - Method in class ViewLayer.Screens.MainMenuScr.MainMenuScreen
-
Instantiates the buttons used in the menu.
- InstantiateSelectedMap() - Method in class ControlLayer.GameEngine
-
Instantiates the appropriate map objects based on the selected map name retrieved from CurrentGameSession
- IsCollidingWithGrass(Rectangle, int) - Method in class ModelLayer.CollisionManagement.CollisionManager
-
Check collisions between a car and grass area.
- IsCollidingWithImpassable(Rectangle, int) - Method in class ModelLayer.CollisionManagement.CollisionManager
-
Checks collision between a car and impassable map objects, such as map edges or trees.
- isCollidingWithOtherCars(Car, Rectangle, int) - Method in class ModelLayer.CollisionManagement.CollisionManager
-
Check collisions between two cars.
- isIntersecting(Rectangle, int, Rectangle, int) - Method in class ModelLayer.CollisionManagement.CollisionManager
-
Checks if the two input cars are colliding with each other.
- isIntersecting(Rectangle, int, Rectangle) - Method in class ModelLayer.CollisionManagement.CollisionManager
-
Checks if a car with a given angle intersects with a rectangle.
- isIntersecting(Rectangle, int, Line2D) - Method in class ModelLayer.CollisionManagement.CollisionManager
-
Checks if a car with a given angle intersects with a line.
- isIntersecting(Rectangle, int, Object, Boolean, Boolean) - Method in class ModelLayer.CollisionManagement.CollisionManager
-
Checks if a car would collide with a rectangle or line object.


Customer 360 Degree View
- Understand customer activity across channels and processes
- Model customer behaviour in real-time to determine evolving needs across all touch points
We bring a clever combination of analytic services and technology to deliver business impact. We can do fixed scope advanced analytics projects as proof of concept. And, we can run some of your ongoing analytics processes. These persistent engagements enable us to demonstrate serious progress in your Analytics Quotient.
Our engagements have varying proportions of technology in line with your existing technology stack and needs. All of our work is oriented towards key functions in your organization.


Namespace: OtlContainers
Unit globals OtlContainers
public unit globals OtlContainers
CAlmostFullLoadFactor
internal const CAlmostFullLoadFactor: System.Extended = 0.9
Initial- 0.9
Const- True
CPartlyEmptyLoadFactor
internal const CPartlyEmptyLoadFactor: System.Extended = 0.8
Initial- 0.8
Const- True
CreateOmniValueQueue
public function CreateOmniValueQueue(UseBusLocking: boolean; ThresholdForFull: integer): IOmniValueQueue
param- Set to true to use a spinlock. Otherwise synchronisation is achieved by a critical section.
The count of OmniValues to which if the queue reaches or exceeds, it is considered full.
Use a a value of -1 to indicate there is no threshold (and hence events like coiNotifyOnAlmostFull will never fire).
Returns- IOmniValueQueue
InitializeTimingInfo
public procedure InitializeTimingInfo()
RoundUpTo
public function RoundUpTo(value: pointer; granularity: integer): pointer
Returns- pointer


Renamo's appeal to have election result annulled dismissed: Mozambique's top court
MAPUTO (Reuters) - Mozambique’s top court has dismissed opposition party Renamo’s application to have the results of its recent general election dismissed - a scenario Renamo has said could result in violence in the country just months after an historic peace deal.
A written judgment posted on the Constitutional Council’s website and dated Nov. 11 said the council had dismissed the appeal to have the victory of President Filipe Nyusi and his party Frelimo in the Oct. 15 election annulled.
“The applicant has not provided sufficient evidence to support its claim,” the judgment said.
It was hoped the presidential, legislative and provincial poll would set the seal on a peace pact signed between Nyusi and Renamo leader Ossufo Momade in August that put an end to four decades of hostility between the two parties.
Instead it has stoked tensions as opposition parties said the vote was hit by major fraud. Momade has said the country risked sliding back into violence if the election results were validated.
“If one wants to save Mozambique, the election must be annulled,” he said, according to broadcaster STV on Wednesday, adding that Renamo had respected the peace accord so far.
“We will not accept that a small group of people alter the will of the Mozambican people.”
The run-up to the election was marred by violence including from a breakaway group of former Renamo fighters, which staged attacks in the country’s central regions.
A number of attacks have also taken place since the poll, with analysts fearing the outcome could worsen violence.


Annotations provide a way to integrate event data into your graphs. They are visualized as vertical lines and icons on all graph panels. When you hover over an annotation icon you can get title, tags, and text information for the event. In the Queries tab you can add queries that return annotation events.
You can add annotations directly from grafana by holding CTRL or CMD + click on graph (or drag region). These will be stored in Grafana's annotation database.
Checkout the Annotations documentation for more information.| {{annotation.name}} | {{annotation.name}} (Built-in) | Edit |


--- layout: "category" title: "SDK" class: "home-docs" permalink: /docs/sdk/index.html ---
{{ item.title }}
{{ item.subtitle }}


Eggs are one of my favorite foods. Here is a recipe for deliciously rich scrambled eggs.
Niti Shah There’s beauty in simplicity ✨ Representing @_dscollections_ @samsungnepalofficial @newlook.np @dharahealthyoil Acid Attack Survivors 🌸 link below youtu.be/GYpeEy8I6c0
Ginkaku-ji Temple ("The Silver Pavilion") is on everyone’s checklist of sights to see while in Kyoto, both foreigners and Japanese alike. We understand why: it’s about as beautiful as any temple in the city. But, if you visit between 10am and 4pm, especially on a weekend or holiday, it is almost impossible to enjoy the place.


{% extends 'layout.html' %} {% block title %}Tables{% endblock %} {% block content %}
Be careful! You are about to delete whole collection.
Type the collection name to proceed.


What is the Tech Radar?
The Comsysto Tech Radar is a list of technologies, complemented by an assessment result, called ring assignment. We use four rings with the following semantics:
- ADOPT — Technologies we have high confidence in to serve our purpose, also in large scale. Technologies with a usage culture in our Zalando production environment, low risk and recommended to be widely used.
- TRIAL — Technologies that we have seen work with success in project work to solve a real problem; first serious usage experience that confirm benefits and can uncover limitations. TRIAL technologies are slightly more risky; some engineers in our organization walked this path and will share knowledge and experiences.
- ASSESS — Technologies that are promising and have clear potential value-add for us; technologies worth to invest some research and prototyping efforts in to see if it has impact. ASSESS technologies have higher risks; they are often brand new and highly unproven in our organisation. You will find some engineers that have knowledge in the technology and promote it, you may even find teams that have started a prototyping effort.
- HOLD — Technologies not recommended to be used for new projects. Technologies that we think are not (yet) worth to (further) invest in. HOLD technologies should not be used for new projects, but usually can be continued for existing projects.
|
What is the purpose?
This tech radar represents a view of Comsysto Reply and other Reply companies dedicated to
Open-Source tools and frameworks. It does not represent the view of the entire Reply group.
Comsysto Reply is active in the open-source community, host of several meetup groups and strongly dedicated to knowledge sharing.
Therefore we provide our own specially developed training programs in following core technologies and methodologies:
- Spring/Spring Boot
- Apache Spark
- Git
- Apache Wicket
- Agile/Scrum
- Professional Scrum Master (incl. scrum.org certfication)
- Professional Scrum Product Owner (incl. scrum.org certfication)
- Agile Basics
- Advanced Agile
- Agile in Action
- Scaling Agile
- Agile Coaching
We are also partnering with leading technology providers like Amazon Web Services, Pivotal, RedHat, Google, Hazelcast, MapR and some more in order to provide the necessary knowledge flowing.
Please refer to https://comsystoreply.de/veranstaltungen/trainings or drop us an email at<EMAIL_ADDRESS>for more information.
|


BERT Classifier
Analytics Zoo provides a built-in BERTClassifier in TFPark for Natural Language Processing (NLP) classification tasks based on TFEstimator and BERT.
Bidirectional Encoder Representations from Transformers (BERT) is Google's state-of-the-art pre-trained NLP model. You may refer to here for more details.
BERTClassifier is a pre-built TFEstimator that takes the hidden state of the first token to do classification.
Remarks:
- You need to install tensorflow==1.15.0 on your driver node.
- Your operating system (OS) is required to be one of the following 64-bit systems: Ubuntu 16.04 or later and macOS 10.12.6 or later.
- To run on other systems, you need to manually compile the TensorFlow source code. Instructions can be found here.
After constructing a BERTClassifier, you can directly call train, evaluate or predict in a distributed fashion. See here for more instructions.
from zoo.tfpark.text.estimator import BERTClassifier
estimator = BERTClassifier(num_classes, bert_config_file, init_checkpoint=None, use_one_hot_embeddings=False, optimizer=None, model_dir=None)
num_classes
: Positive int. The number of classes to be classified.bert_config_file
: The path to the json file for BERT configurations.init_checkpoint
: The path to the initial checkpoint of the pre-trained BERT model if any. Default is None.use_one_hot_embeddings
: Boolean. Whether to use one-hot for word embeddings. Default is False.optimizer
: The optimizer used to train the estimator. It can either be an instance of tf.train.Optimizer or the corresponding string representation. Default is None if no training is involved.model_dir
: The output directory for model checkpoints to be written if any. Default is None.


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.lang.time.DateUtils
A suite of utilities surrounding the use of the
Calendar
and Date
object.
| Field Summary | |
static int |
MILLIS_IN_DAY
Deprecated. Use MILLIS_PER_DAY. This will be removed in Commons Lang 3.0. |
static int |
MILLIS_IN_HOUR
Deprecated. Use MILLIS_PER_HOUR. This will be removed in Commons Lang 3.0. |
static int |
MILLIS_IN_MINUTE
Deprecated. Use MILLIS_PER_MINUTE. This will be removed in Commons Lang 3.0. |
static int |
MILLIS_IN_SECOND
Deprecated. Use MILLIS_PER_SECOND. This will be removed in Commons Lang 3.0. |
static long |
MILLIS_PER_DAY
Number of milliseconds in a standard day. |
static long |
MILLIS_PER_HOUR
Number of milliseconds in a standard hour. |
static long |
MILLIS_PER_MINUTE
Number of milliseconds in a standard minute. |
static long |
MILLIS_PER_SECOND
Number of milliseconds in a standard second. |
static int |
RANGE_MONTH_MONDAY
A month range, the week starting on Monday. |
static int |
RANGE_MONTH_SUNDAY
A month range, the week starting on Sunday. |
static int |
RANGE_WEEK_CENTER
A week range, centered around the day focused. |
static int |
RANGE_WEEK_MONDAY
A week range, starting on Monday. |
static int |
RANGE_WEEK_RELATIVE
A week range, starting on the day focused. |
static int |
RANGE_WEEK_SUNDAY
A week range, starting on Sunday. |
static int |
SEMI_MONTH
This is half a month, so this represents whether a date is in the top or bottom half of the month. |
static TimeZone |
UTC_TIME_ZONE
The UTC time zone (often referred to as GMT). |
| Constructor Summary | |
DateUtils()
DateUtils instances should NOT be constructed in
standard programming. |
| Method Summary | |
static boolean |
isSameDay(Calendar cal1,
Calendar cal2)
Checks if two calendar objects are on the same day ignoring time. |
static boolean |
isSameDay(Date date1,
Date date2)
Checks if two date objects are on the same day ignoring time. |
static boolean |
isSameInstant(Calendar cal1,
Calendar cal2)
Checks if two calendar objects represent the same instant in time. |
static boolean |
isSameInstant(Date date1,
Date date2)
Checks if two date objects represent the same instant in time. |
static boolean |
isSameLocalTime(Calendar cal1,
Calendar cal2)
Checks if two calendar objects represent the same local time. |
static Iterator |
iterator(Calendar focus,
int rangeStyle)
This constructs an Iterator that will
start and stop over a date range based on the focused
date and the range style. |
static Iterator |
iterator(Date focus,
int rangeStyle)
This constructs an Iterator that will
start and stop over a date range based on the focused
date and the range style. |
static Iterator |
iterator(Object focus,
int rangeStyle)
This constructs an Iterator that will
start and stop over a date range based on the focused
date and the range style. |
static Date |
parseDate(String str,
String[] parsePatterns)
Parses a string representing a date by trying a variety of different parsers. |
static Calendar |
round(Calendar date,
int field)
Round this date, leaving the field specified as the most significant field. |
static Date |
round(Date date,
int field)
Round this date, leaving the field specified as the most significant field. |
static Date |
round(Object date,
int field)
Round this date, leaving the field specified as the most significant field. |
static Calendar |
truncate(Calendar date,
int field)
Truncate this date, leaving the field specified as the most significant field. |
static Date |
truncate(Date date,
int field)
Truncate this date, leaving the field specified as the most significant field. |
static Date |
truncate(Object date,
int field)
Truncate this date, leaving the field specified as the most significant field. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final TimeZone UTC_TIME_ZONE
public static final long MILLIS_PER_SECOND
public static final long MILLIS_PER_MINUTE
public static final long MILLIS_PER_HOUR
public static final long MILLIS_PER_DAY
public static final int SEMI_MONTH
public static final int RANGE_WEEK_SUNDAY
public static final int RANGE_WEEK_MONDAY
public static final int RANGE_WEEK_RELATIVE
public static final int RANGE_WEEK_CENTER
public static final int RANGE_MONTH_SUNDAY
public static final int RANGE_MONTH_MONDAY
public static final int MILLIS_IN_SECOND
public static final int MILLIS_IN_MINUTE
public static final int MILLIS_IN_HOUR
public static final int MILLIS_IN_DAY
| Constructor Detail |
public DateUtils()
DateUtils
instances should NOT be constructed in
standard programming. Instead, the class should be used as
DateUtils.parse(str);
.
This constructor is public to permit tools that require a JavaBean instance to operate.
| Method Detail |
public static boolean isSameDay(Date date1, Date date2)
Checks if two date objects are on the same day ignoring time.
28 Mar 2002 13:45 and 28 Mar 2002 06:01 would return true. 28 Mar 2002 13:45 and 12 Mar 2002 13:45 would return false.
date1
- the first date, not altered, not nulldate2
- the second date, not altered, not nullnull
public static boolean isSameDay(Calendar cal1, Calendar cal2)
Checks if two calendar objects are on the same day ignoring time.
28 Mar 2002 13:45 and 28 Mar 2002 06:01 would return true. 28 Mar 2002 13:45 and 12 Mar 2002 13:45 would return false.
cal1
- the first calendar, not altered, not nullcal2
- the second calendar, not altered, not nullnull
public static boolean isSameInstant(Date date1, Date date2)
Checks if two date objects represent the same instant in time.
This method compares the long millisecond time of the two objects.
date1
- the first date, not altered, not nulldate2
- the second date, not altered, not nullnull
public static boolean isSameInstant(Calendar cal1, Calendar cal2)
Checks if two calendar objects represent the same instant in time.
This method compares the long millisecond time of the two objects.
cal1
- the first calendar, not altered, not nullcal2
- the second calendar, not altered, not nullnull
public static boolean isSameLocalTime(Calendar cal1, Calendar cal2)
Checks if two calendar objects represent the same local time.
This method compares the values of the fields of the two objects. In addition, both calendars must be the same of the same type.
cal1
- the first calendar, not altered, not nullcal2
- the second calendar, not altered, not nullnull
public static Date parseDate(String str, String[] parsePatterns) throws ParseException
Parses a string representing a date by trying a variety of different parsers.
The parse will try each parse pattern in turn. A parse is only deemed sucessful if it parses the whole of the input string. If no parse patterns match, a ParseException is thrown.
str
- the date to parse, not nullparsePatterns
- the date format patterns to use, see SimpleDateFormat, not nullpublic static Date round(Date date, int field)
Round this date, leaving the field specified as the most significant field.
For example, if you had the datetime of 28 Mar 2002 13:45:01.231, if this was passed with HOUR, it would return 28 Mar 2002 14:00:00.000. If this was passed with MONTH, it would return 1 April 2002 0:00:00.000.
For a date in a timezone that handles the change to daylight saving time, rounding to Calendar.HOUR_OF_DAY will behave as follows. Suppose daylight saving time begins at 02:00 on March 30. Rounding a date that crosses this time would produce the following values:
date
- the date to work withfield
- the field from Calendar
or SEMI_MONTH
null
public static Calendar round(Calendar date, int field)
Round this date, leaving the field specified as the most significant field.
For example, if you had the datetime of 28 Mar 2002 13:45:01.231, if this was passed with HOUR, it would return 28 Mar 2002 14:00:00.000. If this was passed with MONTH, it would return 1 April 2002 0:00:00.000.
For a date in a timezone that handles the change to daylight saving time, rounding to Calendar.HOUR_OF_DAY will behave as follows. Suppose daylight saving time begins at 02:00 on March 30. Rounding a date that crosses this time would produce the following values:
date
- the date to work withfield
- the field from Calendar
or SEMI_MONTH
null
public static Date round(Object date, int field)
Round this date, leaving the field specified as the most significant field.
For example, if you had the datetime of 28 Mar 2002 13:45:01.231, if this was passed with HOUR, it would return 28 Mar 2002 14:00:00.000. If this was passed with MONTH, it would return 1 April 2002 0:00:00.000.
For a date in a timezone that handles the change to daylight saving time, rounding to Calendar.HOUR_OF_DAY will behave as follows. Suppose daylight saving time begins at 02:00 on March 30. Rounding a date that crosses this time would produce the following values:
date
- the date to work with, either Date or Calendarfield
- the field from Calendar
or SEMI_MONTH
null
Date
or Calendar
public static Date truncate(Date date, int field)
Truncate this date, leaving the field specified as the most significant field.
For example, if you had the datetime of 28 Mar 2002 13:45:01.231, if you passed with HOUR, it would return 28 Mar 2002 13:00:00.000. If this was passed with MONTH, it would return 1 Mar 2002 0:00:00.000.
date
- the date to work withfield
- the field from Calendar
or SEMI_MONTH
null
public static Calendar truncate(Calendar date, int field)
Truncate this date, leaving the field specified as the most significant field.
For example, if you had the datetime of 28 Mar 2002 13:45:01.231, if you passed with HOUR, it would return 28 Mar 2002 13:00:00.000. If this was passed with MONTH, it would return 1 Mar 2002 0:00:00.000.
date
- the date to work withfield
- the field from Calendar
or SEMI_MONTH
null
public static Date truncate(Object date, int field)
Truncate this date, leaving the field specified as the most significant field.
For example, if you had the datetime of 28 Mar 2002 13:45:01.231, if you passed with HOUR, it would return 28 Mar 2002 13:00:00.000. If this was passed with MONTH, it would return 1 Mar 2002 0:00:00.000.
date
- the date to work with, either Date
or Calendar
field
- the field from Calendar
or SEMI_MONTH
null
Date
or Calendar
public static Iterator iterator(Date focus, int rangeStyle)
This constructs an Iterator
that will
start and stop over a date range based on the focused
date and the range style.
For instance, passing Thursday, July 4, 2002 and a
RANGE_MONTH_SUNDAY
will return an
Iterator
that starts with Sunday, June 30,
2002 and ends with Saturday, August 3, 2002.
focus
- the date to work withrangeStyle
- the style constant to use. Must be one of the range
styles listed for the iterator(Calendar, int)
method.null
or if
the rangeStyle is notpublic static Iterator iterator(Calendar focus, int rangeStyle)
This constructs an Iterator
that will
start and stop over a date range based on the focused
date and the range style.
For instance, passing Thursday, July 4, 2002 and a
RANGE_MONTH_SUNDAY
will return an
Iterator
that starts with Sunday, June 30,
2002 and ends with Saturday, August 3, 2002.
focus
- the date to work withrangeStyle
- the style constant to use. Must be one of
RANGE_MONTH_SUNDAY
,
RANGE_MONTH_MONDAY
,
RANGE_WEEK_SUNDAY
,
RANGE_WEEK_MONDAY
,
RANGE_WEEK_RELATIVE
,
RANGE_WEEK_CENTER
null
public static Iterator iterator(Object focus, int rangeStyle)
This constructs an Iterator
that will
start and stop over a date range based on the focused
date and the range style.
For instance, passing Thursday, July 4, 2002 and a
RANGE_MONTH_SUNDAY
will return an
Iterator
that starts with Sunday, June 30,
2002 and ends with Saturday, August 3, 2002.
focus
- the date to work with, either
Date
or Calendar
rangeStyle
- the style constant to use. Must be one of the range
styles listed for the iterator(Calendar, int)
method.null
Date
or Calendar
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Manuel Entenmann, Lucas Groß-Hardt, André Ho, Jan Kipka, Adrian Kochsiek and Sebastian Röhling
WWI14SEB
The team developed a web application that, in case of an accident, receives data from several sensors installed in cars. Upon transmission success, the application analyzes and classifies the given data. The aim of this is to find dependencies between different pieces of information such as the amount of accidents and the year of construction. The results of this analysis are then displayed in the form of bar charts and a heat map.
The application provides the possibility to draw immediate conclusions concerning the nature and the severity of accidents. Using the Traffic Accident Analyzer, it is possible to determine what circumstances and places are most susceptible to accidents in order to help prevent these types of situations in the future. Furthermore, paramedics can be given access to collected data to inform themselves about the situation before even arriving at the scene.
|
Plugin |
Purpose |
Leafleat |
Provides the ability to display a heat map of the regions and places most susceptible to accidents. |
d3.js |
Enables the application to display different types of charts that show the results of the previously performed analysis. |
|---|
The following slides show the result of the development process:
The first thing the application does upon receiving new data is to classify the accident by analyzing the movement speed and damaged vehicle parts. Possible classifications are a damaged tire, window damage due to colliding objects (e.g. stone chips) and three different types of collisions depending on the amount of damaged parts.
When run, the application opens a browser tab that contains the heat map and the previously mentioned bar charts that show the dependencies between different pieces of information and the amount of accidents.


Jaqy Documentation¶
Jaqy is a universal database client for connecting any databases with JDBC drivers. It is designed with the following features in mind.
- Zero installation and requiring no administrative privileges. In contrast, ODBC drivers require administrative privileges to install and setup.
- Late JDBC binding. JDBC drivers are loaded dynamically only when needed. As the result, Jaqy starts up quickly without needing to load unnecessary drivers.
- Interactive and scripting support.
- Various data display format. Currently, the following display formats are
supported.
- table
- csv
- json
- Various data format supports for loading into and exporting from databases. Currently, the following formats are supported.
- JavaScript integration to allow conditional statements and expression expansion.
- Extensible. Plugins can be loaded at runtime to add new commands, new display, import and export formats, etc.
Jaqy is mainly tested against SQLite, Apache Derby, MySQL, Microsoft SQL Server and PostgreSQL, since they can be easily made available as part of CI process. Brief testings on Teradata, HIVE, Presto, Teradata Aster etc were done, and it worked pretty well.
This software is NOT SUPPORTED by Teradata. This is an approved personal project of @coconut2015.


Brobotics Forever
Senior Capstone Project
For our Senior Design Project at the University of Kansas we have chosen to design an Unmanned Aerial Vehicle, or UAV, that is capable of utilizing computer vision algorithms to take accurate measurements of physical objects around it.
Team members and their fields of study:
Justin Anguiano - Engineering Physics: Digital Electronic Systems
Bryan Burkett - Computer Science
Matt Perry - Mechanical Engineering
Ian Tait - Engineering Physics: Digital Electronic Systems
Please register with us to receive updates on our progress or login to comment on articles!


@(params: Map[String, Any]) @uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "You've got a new message from HMRC") { @uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.salutation(params)
You have a new message from HMRC to let you know the deadline for completing a paper tax return has now passed so you will need to do your self assessment online by 31 January.
To view it, sign in to your HMRC online account.
From HMRC Self Assessment
}


website monitoring homepage with video tutorials!
To login use these credentials: username = admin, password = admin
Just download latest ZIP file.
Extract and run: startup.bat
(Linux and Mac are also supported)
Note for developers: to build the application run: mvn clean package
Set database properties in src/main/resources/db.properties
, add to classpath JDBC driver and finally run: mvn clean package
. Out of the box will be used HSQL embedded database (to validate functionality). Supported databases are MySQL, PostgreSQL and Oracle. See video tutorial how to use it.
Run app in maven command line: mvn tomcat:run
To run in development mode run this class: net.sf.sitemonitoring.Main
with these VM arguments: -Djava.io.tmpdir=sitemonitoring-temp -Dspring.profiles.active=dev -Ddbport=9001 -Dserver.port=8081


{{define "cp_custom_commands"}}
{{template "cp_head" .}}
Custom commands
Create a new group to put whitelist/blacklist roles/channels on multiple commands at the same time, as well as keeping things organized.
{{else}} {{end}}You have created {{.CCCount}}
custom commands against the total limit of {{.CCLimit}}
{{.AdditionalMessage}}
{{else}}{{.}}
No responses
{{end}}


nlp_architect.solutions.set_expansion package¶
Subpackages¶
Submodules¶
nlp_architect.solutions.set_expansion.expand_server module¶
nlp_architect.solutions.set_expansion.prepare_data module¶
Script that prepares the input corpus for np2vec training: it runs NP extractor on the corpus and marks extracted NP’s.
-
nlp_architect.solutions.set_expansion.prepare_data.
extract_noun_phrases
(docs, nlp_parser, chunker)[source]¶
-
nlp_architect.solutions.set_expansion.prepare_data.
get_group_norm
(spacy_span)[source]¶ Give a span, determine the its group and return the normalized text representing the group
Parameters: spacy_span (spacy.tokens.Span) –
nlp_architect.solutions.set_expansion.set_expand module¶
-
class
nlp_architect.solutions.set_expansion.set_expand.
SetExpand
(np2vec_model_file, binary=False, word_ngrams=False, grouping=False, light_grouping=False, grouping_map_dir=None)[source]¶ Bases:
object
Set expansion module, given a trained np2vec model.
-
expand
(seed, topn=500)[source]¶ Given a seed of terms, return the expanded set of terms.
Parameters: - seed – seed terms
- topn – maximal number of expanded terms to return
Returns: up to topn expanded terms and their probabilities
-
seed2term_similarity
(seed_id, term_id)[source]¶ Compute cosine similarity between a seed terms and a term. :param seed_id: seed term id’s :param term_id: the term id
Returns: Similarity between the seed terms and the term
-


final
.
All final
fields have a value and this value does not change, which can make the code easier to reason about.
To avoid too expensive analysis, this inspection only reports if the field has a private
modifier
or it is defined in a local or anonymous class.
A field can be final
if:
static
and initialized once in its declaration or in one static
initializer.static
and initialized once in its declaration, in one instance initializer or in every constructorExample:
public class Person {
private String name; // can be final
Person(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
After the quick-fix is applied:
public class Person {
private final String name;
Person(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
Use the "Annotations" button to modify the list of annotations that assume implicit field write.


cloned
event is raised

class VeryExample {
constructor(private dragulaService: DragulaService) {
dragulaService.setOptions('fifth-bag', {
copy: true
});
}
}


Man arrested in fatal Highway 12 crash released on signature bond
MADISON, Wis. - The man suspected of hitting and killing a pedestrian Monday night on Highway 12 is out of jail on a $500 signature bond.
On Wednesday, a judge ordered Shuan Jones not to drive, or use drugs or alcohol.
He faces a tentative charge of operating on a revoked license causing death.
The state has not filed a criminal complaint in the case yet and is still determining the charges.
State Patrol investigators are performing a crash reconstruction, and blood samples are at the state crime lab.
Jones has a bail hearing scheduled for Dec. 5.


Our grab lorries can deliver aggregates to your site and take away the waste while there, saving you time and money. Our 6 wheel lorries can hold up to 14 tonnes, yet are compact enough to access some of the tightest spaces with their long-reach cranes.
No room for a skip? Don't want the hassle of obtaining a permit?  All you need to do is pile it up and phone us up.
You can be assured that your waste is being tipped responsibly. We are committed to reducing the amount of waste that ends up in landfill and always thrive to process as much waste for recycling as possible.
Work can be done on an hourly rate, day rate or load rate. Our hard-working, experienced workforce can get the job done quickly and efficiently with their own tools and safety equipment. We can also provide plant machinery at competitive rates.
With a substantial amount of sub-contracting experience on various utility and roadwork projects, our team can provide your company with whatever the project needs. Just give one of our friendly staff a call to see what we can do for you.
We are pleased to have gained a SMAS Worksafe certificate (www.smasltd.com). This means that we have met the SSIP core criteria recognised by the HSE and other SSIP accreditation schemes. Meeting the SSIP Core Criteria demonstrates that we are serious about H&S and have (and use) an effective H&S Management System to ensure that any work they are engaged in is, so far as reasonably practical, carried out without risk to health and safety.


Langugage
Česky
Deutsch
English
Espagnol
Français
Polski
You can help
Add translation
Support project
Families from all over the world have their homes open for your family
WELCOME
Hop on!


PLANET SICK-BOY: http://www.sick-boy.com "We Put the SIN in Cinema"
Every film with Bette Midler should start with her driving off of a cliff. It could be a recurring cinematic gag – like when Kenny buys the farm on each episode of South Park. Somebody actually suggested that Midler's new film Drowning Mona would be entertaining because she was playing a character that was really despicable and obnoxious. I explained that Midler has already done despicable and obnoxious five weeks ago in the atrocious Isn't She Great, and hinted that the horse-faced diva probably wasn't even acting in either film.
 When Mona's Yugo takes a swan dive into the Hudson River and the resulting investigation reveals that her brakes were tampered with, everyone in the tiny burg becomes a suspect. Husband Phil (William Fichtner, Go) is having an affair with a slutty waitress named Rona (Jamie Lee Curtis, Virus), so they both have a motive. As does son Jeff (Marcus Thomas, Palmetto), although I won't say why (even though Mona's trailer shows it, the film saves it for the big final reel surprise).
 As Rash investigates the crime, the film flashes back to show everybody's individual beef with the late Mona. The result is a sloppy whodunit that tries too hard to be quirky and, instead, is a pretty darn dull knock-off of Fargo. Most of the funny parts are shown in the trailer and, of course, the ending is pretty predictable. The only surprise in the film is that Affleck (Ben's brother) has the biggest role in the film, despite four other names reading above Mona's title.
Mona is another weak big-screen directorial effort from Nick Gomez, who has done some much better work on television (Homicide, The Sopranos and OZ), and the paper-thin script was written by first-timer Peter Steinfeld. Mona was financed by DeVito's Jersey Films, a production company the diminutive actor runs with Hollywood cohorts Michael Shamberg and Stacy Sher. While Jersey has pumped out some of the best cinema in recent years (Gattaca, Pulp Fiction and Out of Sight), they're also creating a disturbing trend by casting their littlest partner in their projects that are, at best, mediocre (Get Shorty, Man on the Moon and Living Out Loud). DeVito isn't in Jersey's upcoming Erin Brockovich, so you may just want to save your money for that film.
1:30 - PG-13 for some thematic elements, language and brief sexuality
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


--- date: "2010-12-20T00:00:00Z" meta: _wp_old_slug: "" published: true status: publish categories: - Personal tags: - Android title: WIND Mobile and my Nexus One type: post ---
Just recently I switch my mobile carrier from Rogers to WIND Mobile. Their Holiday Miracle plan was just to good to pass up - even paying the penalty to break my Rogers contract I will still save money in the long run. Anyway, once the number got transferred over, I didn't have a 3G connection, even after selecting the WIND Home APN. After a bit of google, it seems that what I had to do is to setup an APN. In case I can't find it later, here are the APN settings:
| APN | mms.WINDmobile.ca |
| Proxy | <Not Set> |
| Port | <Not Set> |
| Username | <Not Set> |
| Password | <Not Set> |
| Server | <Not Set> |
| MMSC | http://mms.WINDmobile.ca |
| MMS proxy | <IP_ADDRESS> |
| MMS port | 8080 |
| MMC | 302 |
| MNC | 490 |
| Authentication type | <Not set> |
| APN type | mms |
After setting this up, bingo, got my 3G connection going.


This component adds some minor things to the Foundation typography stuff.
Also there is a new rule that prevent paragraphs to have a bottom margin if they are the last child of their parent.
$include-sv-typography: false;
sveetoy/components/_type.scss
Title styles are not anymore sticked to hX
elements, now you can use them by the way of .title-X
classes on any other element to preserve semantic. You may even use a .title-X
class on hX
element.
.title-{{ count }}
{% endfor %}Text colors are available for every color defined in map $sv-color-text-palette
. Properties are defined using !important
flag so take care of their usage.
.text-{{ k }}
{% endfor %}Two more font thickness are available if their corresponding variable is defined:
$global-weight-thin
for thinest thickness;$global-weight-strong
for strongest thickness.{% if k == 'bold' %}<b>, {% elif k == 'strong' %}<strong>, {% endif %}.text-{{ k }}
{% endfor %}Add some size possibilities to <small>
element. .medium
is equivalent to the default <small>
behavior. Available sizes are built from $sv-smalls
.
.{{ name }}
{{ lipsum(n=1, html=False, min=15, max=16) }}
{{ lipsum(n=1, html=False, min=15, max=16) }}
.text-upper
enables you to correctly write your texts in lowercase but render them as uppercase. .text-important
just define the underline value for text-decoration
property.
.text-upper
.text-important
Various underline positions, thickness and widths. All of them are implemented with border properties on a pseudo-element :after
.
Built from list $sv-underline-widths
.
.underline{% if name %}.{{ name }}{% endif %}
Built from map $sv-underline-thickness
.
.underline{% if name %}.{{ name }}{% endif %}
Built from list $sv-underline-distances
.
.underline{% if name %}.{{ name }}{% endif %}
No variable is used to build this single feature.
.underline{% if name %}.{{ name }}{% endif %}
Built from list $sv-underline-colors
.
.underline
.underline.{{ k }}
Various horizontal rule positions, thickness and widths. Following the same scheme formats than .underline
features.
Built from map $sv-hr-thickness
.
hr{% if name %}.{{ name }}{% endif %}
Built from list $sv-hr-distances
.
Built from list $sv-hr-colors
.
hr
hr.{{ k }}


Salary Calculator
Week 7 Weekend Project
Add Employee
Current Employees
First Name
Last Name
ID
Title
Annual Salary
Delete
Total Monthly Cost:
$0


|
Elma
An event loop manager for embedded systems
|
A finite state machine class. More...
#include <state_machine.h>
Public Member Functions | |
| StateMachine (std::string name) | |
| Construct a new StateMachine with the given name. | |
| StateMachine () | |
| Construct an unnamed StateMachine. | |
| StateMachine & | set_initial (State &s) |
| StateMachine & | add_transition (std::string event_name, State &from, State &to) |
| StateMachine & | set_propagate (bool val) |
| State & | current () |
| void | init () final |
| Do not override init() for a state machine. | |
| void | start () final |
| Do not override init() for a state machine. | |
| void | update () final |
| Do not override init() for a state machine. | |
| void | stop () |
| Do not override init() for a state machine. | |
| Public Member Functions inherited from elma::Process | |
| Process (int n=0) | |
| Default constructor. Names process "no name". | |
| Process (std::string name, int n=0) | |
| Constructor that takes a name for the process. More... | |
| string | name () |
| status_type | status () |
| high_resolution_clock::duration | period () |
| int | num_updates () |
| time_point< high_resolution_clock > | start_time () |
| high_resolution_clock::duration | last_update () |
| high_resolution_clock::duration | previous_update () |
| Channel & | channel (string name) |
| Access a channel with the given name. More... | |
| double | milli_time () |
| The time since the last update in millisconds, as a double. More... | |
| double | delta () |
| The most recent amount of time between updates. More... | |
| void | watch (string event_name, std::function< void(Event &)> handler) |
| void | emit (const Event &event) |
| void | http_get (std::string url, std::function< void(json &)> handler) |
| void | halt () |
Additional Inherited Members | |
| Public Types inherited from elma::Process | |
| enum | status_type { UNINITIALIZED, STOPPED, RUNNING } |
A finite state machine class.
Together with the State and Transition classes, this class is used to make a finite state machine process. For example, here is a toggle switch machine
Definition at line 13 of file state_machine.h.
| StateMachine & elma::StateMachine::add_transition | ( | std::string | event_name, |
| State & | from, | ||
| State & | to | ||
| ) |
Add a transition to the state machine
| event_name | Events with this name will trigger the transition |
| from | The state the machine must be in to take the transition |
| to | The state the machine will go to upon taking the transition |
Definition at line 12 of file state_machine.cc.
|
inline |
Definition at line 41 of file state_machine.h.
| StateMachine & elma::StateMachine::set_initial | ( | State & | s | ) |
Set the initial state of the state machine
| s | An instantiation of a class derived from State |
Definition at line 7 of file state_machine.cc.
|
inline |
Set whether the state machine should propagate transitions (default = false)
| val | True or false |
Definition at line 38 of file state_machine.h.


Language: MATLAB
RepositoryRecreation of Chess in MATLAB with both single-player gameplay against an AI and two-player classic Chess. The three algorithms my team designed were easy, offensive, and defensive. Easy randomly selects a valid move. Offensive selects a valid move that will result in gaining the most points. Defensive selects a valid move that will result in losing the least amount of points. The defensive algorithm is required to look two moves ahead in order to determine its move, making it the most computationally complex but also the most successful algorithm. In addition to player v. player and player v. algorithm gameplay, this program also allows for algorithm v. algorithm gameplay. An algorithm v. algorithm game can be simulated move-by-move on the chess board, or a user-specified number of games can be simulated with the resulting statistics displayed to the screen.


“A JavaScript library for building user interfaces”
The V in MVC
Original plan: HTML with piecemeal JS
Problems with original plan:
How React solves those problems:
The building blocks of your React UI.
An abstraction of HTML and JS into reusable, composable units.
Bundles together necessarily dependent behavior and display logic.
class ErrorableTextInput extends React.Component {
/* other code */
handleChange(domEvent) {
this.props.onValueChange(domEvent.target.value);
}
render() {
return (

{this.props.label}
<input id="text-input-1"
placeholder={this.props.placeholder}
type="text"
value={this.props.value}
onChange={this.handleChange}/>

);
}
}
A component can be rendered by calling it from within another component.
class SocialSecurityNumber extends React.Component {
render() {
return (
<ErrorableTextInput value={this.props.ssn}/>
);
}
}
Helps identify which components you'll need and how they'll be used.
HCA's component hierarchy:
- HealthCareApp
- Nav
- Section
- Questions (e.g., SocialSecurityNumber)
- Form elements (e.g., ErrorableTextInput)
- Form elements
- ProgressButton
This naturally corresponds with the structure of our application.
JS syntax for rendering content in the DOM.
Similar to HTML.
Reserved words (class
and for
) are replaced (className
and htmlFor
).
Components look like HTML tags
render() {
return (

);
}
Example from HCA: a store of our model data in a JSON object.
nameAndGeneralInformation: {
fullName: {
first: 'William',
middle: null,
last: 'Shakespeare',
suffix: null,
},
mothersMaidenName: 'Arden',
socialSecurityNumber: '555-55-5555',
gender: 'M',
dateOfBirth: {
month: 4,
day: 23,
year: 1564,
}
}
Data from state is passed down through props from parent components to nested components.
class NameAndGeneralInfo extends React.Component {
render() {
return (
<SocialSecurityNumber ssn={this.props.data.socialSecurityNumber}/>
);
}
}
class SocialSecurityNumber extends React.Component {
render() {
return (
<ErrorableTextInput value={this.props.ssn}/>
);
}
}
React convention is one-way data flow:
Keep as many components as possible stateless.
Keep the minimal amount of data needed to represent your UI in state.
State should contain data that, once changed, will trigger a UI update.
Do not store computed data in state.
Do not store duplicated data from props in state.
Helps us manage state
Only way to update state is to dispatch an action
render() {
return (
<SocialSecurityNumber ssn={this.props.data.socialSecurityNumber}
onValueChange={(update) => {this.props.onStateChange('ssn', update);}}/>
);
}
function mapDispatchToProps(dispatch) {
return {
onStateChange: (field, update) => {
dispatch(
veteranUpdateField(['nameAndGeneralInformation', field], update)
);
}
};
}


--- permalink: /demo/codewar-2.html title: "codewar-2" ---
灵感来源：https://www.codewars.com/kata/simple-fun-number-124-lamps/train/javascript


[
stack
]
Leetcode 0946. Validate Stack Sequences
https://leetcode.com/problems/validate-stack-sequences
Let us use iterate through pushed
and popped
and on each step we decide what we need to do. Consider example
pushed = [1, 2, 3, 4, 5], popped = [4, 5, 3, 2, 1]
. Let ind1
and ind2
be indexes in these lists.
ind1 = 0
andind2 = 0
. Stack is empty so far, so all we can do is to push elements, sostack = [1]
now, incrementind1
.ind1 = 1
andind2 = 0
. We check if we can pop element from stack right now. The reason that we want to pop as soon as possible, that all elements inpopped
(andpushed
) are different, so if we miss the moment of time when we need to pop, we never do it after. So we check conditionstack and stack[-1] == popped[ind2]
and if it is false, we pop element. It is not the case here, so we push element to stack and incrementind1
,stack = [1, 2]
.ind1 = 2
andind2 = 0
, similar logic, incrementind1
andstack = [1, 2, 3]
.ind1 = 3
andind2 = 0
, similar logic, incrementind1
andstack = [1, 2, 3, 4]
.ind1 = 4
andind2 = 0
. Now, we havepopped[ind2] = 4
, which is equal to the top of our stack, so we pop it from stack and incrementind2
,stack = [1, 2, 3]
.ind1 = 4
andind2 = 1
. We incrementind1
andstack = [1, 2, 3, 5]
.ind1 = 5
andind2 = 1
. Top of stack equal topopped[ind2]
, so we pop element and incrementind2
,stack = [1, 2, 3]
ind1 = 5
andind2 = 2
. Same logic, we incrementind2
andstack = [1, 2]
ind1 = 5
andind2 = 3
. Same logic, we incrementind2
andstack = [1]
10.ind1 = 5
andind2 = 4
. Same logic, we incrementind2
andstack = []
11.ind1 = 5
andind2 = 5
, so we do not go insidewhile
statement.
Note also, that we need to ckeck condition ind1 < n
, that is we can push element to stack. If not, then we can immedietly return False
. In the end, if we reached it we return True
.
Complexity: time complexity is O(n)
: we traverse each of given list at most once. In the process stack
and grow up to O(n)
as well, so space complexity is also O(n)
.
class Solution:
def validateStackSequences(self, pushed, popped):
ind1, ind2, n = 0, 0, len(pushed)
stack = []
while ind1 < n or ind2 < n:
if stack and stack[-1] == popped[ind2]:
stack.pop()
ind2 += 1
elif ind1 < n:
stack.append(pushed[ind1])
ind1 += 1
else:
return False
return True
If you like the solution, you can upvote it on leetcode discussion section: Problem 0946


[t]Sorry[/t]
[t]We are sorry, but the form isn't filled accordingly to instructions.[/t]
[t]You can move back, modify your answers and resend them again.[/t]


| | |
Methods defined here:
- __init__(self, username)
- This is the constructor of the class that will take in the
access keys.
:param username: The Twitter handle for the user
- get_profile_pic(self)
- Will return the URL to the profile picture of the username.
:return The URL to the profile picture.
- get_tweets(self)
- This will pull the first 100 tweets.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|


| Module | ActiveRecord::GroupableAttributes::ClassMethods |
| In: |
lib/active_record/groupable_attributes.rb
|
Useful for grouping together some of your model‘s attributes.
class Comment < ActiveRecord::Base attribute_collection :restricted, [:name, :email] end comment = Comment.new(:name => "Paul", :email =><EMAIL_ADDRESS>:content => "blub") comment.restricted #=> { :name => "Paul", :email =><EMAIL_ADDRESS>}
You can also select only a given collection using the find option :select_collection. This is a wrapper for :select.
Comment.create(:name => "Paul", :email =><EMAIL_ADDRESS>:content => "blub") comment = Comment.first(:select_collection => :restricted) comment.attributes #=> { "name" => "Paul", "email" =><EMAIL_ADDRESS>}
This will raise an exception if the collection doesn‘t exist.
Use this method to group together some of your model‘s attributes.
# File lib/active_record/groupable_attributes.rb, line 38 38: def attribute_collection(name, attribute_names) 39: name = name.to_sym 40: 41: if respond_to?(name, true) 42: logger.warn "Creating attribute collection :#{name}. " \ 43: "Overwriting existing method #{self.name}.#{name}." 44: end 45: 46: attribute_collections[name] = attribute_names 47: 48: define_method name do 49: collection = {} 50: attribute_names.each do |attribute_name| 51: attribute_name = attribute_name.to_sym 52: collection[attribute_name] = self[attribute_name] 53: end 54: collection 55: end 56: end


An AngularJS Directive by @andyshora
Let's get started → Crop Image
Wanna start over? → Reset
* Note that the last 2 parameters shown must exist as variables in the scope of the controller.
And this is the actual data uri which represents the cropped image, which you'll then upload to your server:
Not cropped yet


For most people, the holiday season consists of a lot of traveling to visit family. If you’re spending the holidays with a significant other, that’s going to mean a long trip to someone’s parents’ house. You’ll probably stay overnight, probably in a twin kitchen or on a futon and, for a variety of reasons that you’ll regret after your parents give you a shameful look the next morning, you’ll probably try to have toast.  Instead, here’s how to do it right:
You might as well accept that you have to act like this is high school all over again.  You’d be surprised how fun that can be.
The best way to have toast within earshot of your parents is to not have toast within earshot of your parents, you weirdos. Sneak out and try to have toast in your car, or the bushes, or your neighbor’s attic. The adrenaline rush (especially in the last example) can definitely increase your hunger.
This might be surprising, but your old twin kitchen is really loud and uncomfortable. Throw a few blankets and pillows on the ground. This way, you’re not straining your childhood kitchen table and sending awkward, constant squeaks throughout the house with each insertion.
This one should be the most obvious.  Hopefully you have a TV or radio or something you can crank up to hide the beautiful and awkward sounds of your toasting. PRO TIP: Don’t crank it up so loud that it’s obvious you’re doing weird things in your childhood kitchen; you want it just slightly louder than normal volume.
Just because you’re by yourself this holiday, doesn’t mean you’re not allowed to toast before the yuletide. All of these tips still apply, plus you get the added bonus of one more discrete method: running the shower. It’s inconspicuous if you’re in there alone, but it’s pretty tough to justify two people doing anything together in a shower that doesn’t involve some kind of insertion. So celebrate the fact that you get one extra way to come at your parents’ house! Nothing about that sentence is depressing at all!
Also, can someone show me how to block my parents from using the internet? I need to make sure they never see this.
Written on December 12th, 2013 by Cosmo Frank


Web Developer’s Technical Glossary
Web Developer’s Technical Appendix
This will be a running list as I make updates!
Adaptive Web Design (AWD) — encourages the creation of several versions of a
web
page for a specified number of device dimensions. Which template
to display
is determined in the HTTP GET request which
recognises the screen size of the
device. Adaptive Web
Design was introduced to deal with mobile browsing when
most
sites were optimised for desktop only. As devices now exist in
many sizes
and dimensions from different mobile brands
through tablets to desktops,
Responsive Web Design
has become a popular and more flexible alternative.
Authentication — the process of verifying that you are who you say you are
E.g.
when you login to your email you use a password to authenticate
your
identity. Other methods for authentication include
using an ID card or
fingerprint/biometric method.
Authorization — check that you are authorised (have permission) to perform
a
certain action or to see a given page. E.g. admin users
are authorised to create
new users on the website.
Declarations — in JavaScript declarations are
var
,
const
and
let
for
the creation of variables, constants and lexically
scoped variables.
Closure — the scope where a variable can be accessed. A function used within another function can access the parent function’s variables since its scope extends to its parent.
In this example, the variable
color
is
accessible to the function
displayColor()
.
function color() {
var color = 'red';
function displayColor() {
alert(color);
}
displayColor();
}
CSS Box Model — the concept that in HTML all elements are contained
within
rectangles or boxes. Each box consists of: margins,
borders, padding, and the
actual content.
Customer relationship management (CRM) — a CRM system allows businesses to
manage business
relationships and the data and information associated with
them.
E.g. using CRM to track holiday bookings for a
holiday bookings site. The CRM
would have information on
the customer and the trip they’re planning/ have
booked and
any staff members or actions that may need taking to progress
or
confirm their booking.
Create, Read, Update, and Delete (CRUD) — CRUD refers to the 4 basic
operations you can perform
on data in a relational database application. Create
a new
data entry, read or retrieve existing data from the database,
update the
value of an existing piece of data or delete an
existing piece of data.
Cross-Origin Resource Sharing (CORS) — is a specification that allows
specified resources on a
web page to be requested from another domain outside
the
domain from which the first resource was served. E.g. uploading
images using
different domains using Amazon S3. For more
about origin policies see
‘Same-origin Policy’.
Destructuring Assignment
-
the ability to unpack and assign variables when there are
multiple parameters.
A way to simply assign the variables and then swap their values.
let x, y;
[x, y] = [5, 6];
// x = 5, y = 6
[y, x] = [x, y];
// x = 6, y = 5
To assign values from an object.
let obj = { 'a': 1, 'b': {'b1': '1.1'}}
let {a, b, b:{b1}} = obj
// a = 1, b = {'b1': '1.1'}, b1 = 1.1
There is an extensive list found here for more examples.
Domain Name — the characters/words used to identify a website after
http://
orwww.
.
The domain name consists of two parts. Take this example:https://dwyl.com
, dwyl
makes
up the
second level domain (SLD)
which is
then followed by .com
which what is known as the
top level domain (TLD)
or
parent domain. Other examples of top level domains are: .org
, .co.uk
.io
.
Domain names are the more memorable and user-friendly
representation of a
website's
IP address. Domain names are registered under the
Domain Name
System (DNS).
Domain Name System (DNS) — a distributed global directory of website domain
names
(and other internet resources). The directory stores already
registered
domain names along with their corresponding IP
addresses.
Hexadecimal — Uses 16 different symbols. “0”-”9" to represent the
values 0 to 9 and “A”-”F” (“a”-”f” is acceptable too) to
represent the values 10 to 15. It’s common to use
hexadecimals
when working in CSS to assign colors to your elements.
The hexadecimal for dwyl’s logo color is #4bc0a9 (teal).
To
convert the hexadecimal into RGB values, do the following:
R = 4b
G = c0
B = a9
Convert the letters to their numerical value.
b = 11
c = 12
a = 10
Red: 4 * (16^1) + 11 * (16^0) = 75
Green: 12 * (16^1) + 0 * (16^0) = 192
Blue: 10 * (16^1) + 9 * (16^0) = 169
Hex: #4bc0a9 is RGB: 75, 192, 169.
Hoisting — Hoisting is JavaScript’s default behaviour of moving
var
declarations to the top of the current
scope
when your code is run. What
this means is that whatever
line your write a
var
declaration
on e.g.
var x;
,
when your code is run it will automatically be lifted
and read as if it were
written on the top lines of your
current
scope
(to the top of the current
script or the current function).
This means that you can use
var
's
higher up in the code before the line you've
declared
them on. So this example:
x = "hello";
console.log(x) // logs 'hello'
var x; // declaring `x` which is hoisted as if it were written at the top on compilation
Is read by the computer like this:
var x; // declaring `x` which has been hoisted to the top line on compilation
x = "hello";
console.log(x) // logs 'hello'
Higher-order Function — Functions that take other functions as parameters and/or
return a function. Some examples of these types of functions are
the
map
and
reduce
method used for arrays. They both accept a function to use on
the elements in the given array.
// perform an action twice
function twice (func, value) {
return func(func(value));
}
// func can be any simple (preferably pure) function:
function func (value) {
return value + 3;
}
console.log(twice(func, 1)); // 7
console.log(twice(func, 7)); // 13
Not to be confused with pure functions, this comment explains the difference between the variations.
Hypertext Transfer Protocol (HTTP) — the set of rules for transferring files
(text, graphic
images, sound, video, and other multimedia files) on the
World
Wide Web. When you enter http:// in your address bar
in front of the domain, it
tells the browser to connect
over HTTP.
Initialisation — defining a variable and providing it with an initial
value:
e.g.
var x = 1;
.
Internet Protocol (IP) Address — a unique series of numbers or hexadecimal
digits used
to identify a website.
Microservices — the practice of running multiple web/application servers
simultaneously.
It is a widely accepted/used application architecture used in
most
companies. Lambda Functions are an example of a micro Node.js
Server.
Polymorphism — the ability for an object to take on many forms or types
e.g.
when a parent class is used to refer to a child class
object.
Operator
overloading
is one form of polymorphism. It is not used in Javascript but is
a
feature of C++, Scala, Ruby, Haskell and Rust.
Progressive Web App (PWA) — PWAs are traditional websites that are enhanced
with
modern web technologies, allowing them to provide a more
app-like
experience. They offer functionality such as being
saved as a tile on your
mobile home screen, working offline
and push notifications. The “progressive”
part means
they’re “progressively enhanced” with newer features, which
means
they’ll also work in older browsers that don’t
support the new features. Unlike
native apps, they don’t
have to be updated/listed in the app store although it
is
possible to list them in the app store when this is desired.
Regression Testing
-
the re-running of existing tests to ensure that new
changes/fixes have not
broken any existing functionality.
We should perform regression testing any time
we modify an
application, automated testing is a convenient way to achieve
this.
REPL (READ, EVAL, PRINT, LOOP) — a REPL is an interactive toplevel or
language shell. A
simple, interactive computer programming environment that
takes
single user inputs (i.e. single expressions), evaluates them,
and returns
the result to the user. They are a handy tool
for experimenting with
functionality outside of the context
of a project.
Responsive Web Design (RWD) — is designing one version of a web page which
reorders
and resizes content in response to the size of a browser
at any given
point, not just predetermined device sizes. This means the design of
the site
is optimised for all screen sizes. See Adaptive
Design for another approach to
designing.
Same-origin Policy — Under this security policy implemented by web browsers,
a
document (i.e. like a web page) hosted on server A can only
interact with
other documents that are also on server A. In
short, the same-origin policy
enforces that documents that
interact with each other have the same origin.
Search Engine Optimisation (SEO) — is the process of improving the visibility
of a website
or web page in unpaid/organic search engine results. There are
many
aspects to SEO and search engines change how it’s
calculated over time. It may
include the use of key words
on a page, how often you add/edit content on your
site, to
the way other sites link to you on the web.
Semantic HTML — semantic HTML is the use of HTML elements that accurately
describe
what they contain/are being used for E.g. a
<p>
tag
indicates that the
text within it is a paragraph whereas a
<nav>
tag
should contain navigation
content and a
<footer>
should appear at the end of the page.
Syntactic Sugar — syntactic sugar refers to syntax in a language that is
designed
to make things easier to read. The syntax makes the language
“sweeter”
to use as things can be expressed more clearly or
concisely. Something can be
considered “syntactic sugar” if
it could be removed from the language without
removing any
functionality on what the language can do. For example
ternary
operators in Javascript:
x ? a : b
doesn't require the ternary operator syntax
it could
also be expressed with an
if/else
statement:
if(x)
{ a }
else
{ b }
Technical Debt — Technical
debt is the time/cost of “re-working” a
feature (or entire app) because corners
were cut the first
time it was built. Think of Technical Debt like a “loan
shark”
for your project, if you take “shortcuts” to
implement a feature quickly (e.g:
by skipping tests) you
will pay for it later and usually with “interest”. For
more
detail see:
https://github.com/dwyl/product-owner-guide#what-is-technical-debt
Transmission Control Protocol (TCP)
-
TCP is a protocol which exists to enable the
establishment of a connection and
the exchange of streams
of data (multiple
data packets) between
one or more computers. TCP guarantees the
delivery of data and that packets will
be delivered in the
same order in which they were sent.
Transmission Control Protocol (TCP) handshake
-
A TCP handshake or three-way handshake is the first part
in a three part process
for TCP data transfer between a
local host/client and a server. The handshake is
a
three-step method that requires both the client and server to
exchange SYN and
ACK (acknowledgment) packets to establish
a connection before actual data
communication begins.
Sources:


Football intro info here, instructions and how to play FFDFSFSGGDGHDGSA.
Click on Hint to reveal a clue!
Hint: {{question.hintText}}


Visit cuahsi.org
Visit cuahsi.org
© 2016 CUAHSI. This material is based upon work supported by the National Science Foundation (NSF) under awards 1148453, 1148090, 1664018, 1664061, 1338606, 1664119, and 1849458. Any opinions, findings, conclusions, or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the NSF. | Terms Of Use | Statement of Privacy | Site Map


Reset
Let's Play A Game!
Time:
Click "Start" When You're Ready To Play!
Start
A New High Score?!
Great Job!


Installation logs
« Back
{{ current_day }}
Next »
Completed installations: Loading...
Timestamp
Mobile
Install id
User
Description


Signed in as: Saurabh(Read Only User)
Main Menu
View Rate Plans By Family
Bolt On Search
BoltOn Family :
International Pack
'yes' Biz Data
Bolt On Name :
Status :
Active
InActive
Match :
All
Any
BoltOn Search Results (10)
Id
Bolt On Name
Bolt On Family
Status
2
$10 IVP
International Pack
ACTIVE