{%extends 'occurrence-book/base.html'%} {%load bootstrap3%} {%load static%} {% block content %}
| Time | Arresting Officer | Arresting Officer Badge No | Criminal Name | Criminal ID | Crime | Nature Of Occurrence | Remarks | Signature |
|---|---|---|---|---|---|---|---|---|
| {{ bookings.time }} | {{ bookings.a_o_name }} | {{ bookings.a_o_badge_no }} | {{ bookings.criminal.name }} | {{ bookings.criminal.id_no }} | {{ bookings.crime.name }} | I {{ bookings.a_o_name }} of badge number {{ bookings.a_o_badge_no }}, now booking {{ bookings.criminal.name }} to be charged for the offense of {{ bookings.crime_description }} |
| Time | Name | ID NO | Reference Number | Case File Number | Crime | Description |
|---|---|---|---|---|---|---|
| {{ reportings.time }} | {{ reportings.name }} | {{ reportings.id_no }} | {{ reportings.ref_no }} | {{ reportings.case_file_no }} | {{ reportings.crime }} | {{ reportings.crime_description }} |


Here you can use rows and columns to organize your footer content. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
{{employee.faceBook}}
{{employee.instagram}}
{{employee.email}}
{{employee.phoneNumber}}
Home
About
Contact
Login


title=Code date=2015-10-29 type=page status=published ~~~~~~ This section covers details about skysails codebase.
If you're a user of skysail application, you most propably will not find this very interesting; as a future developer of such applications, you should have a look ;)
The Application Model describes the core domain of the skysail server.
An application is a collection of entities, (aggregate) repositories and references between them. Entities themselves consist of fields, which have types. The purpose of this structure is to provide a common model for setting up executable APIs.
An application has a (unique) name, a collection of entities and a collection of repositories.
An Entity describes a "Thing" of the real world or any concept.


Class DateRangeBuilder
- java.lang.Object
-
- net.sf.jasperreports.types.date.DateRangeBuilder
-
public class DateRangeBuilder extends java.lang.Object
Builder which allows to build proper instance of
DateRange
Usage example:
DateRange range = new DateRangeBuilder("DAY").set(TimeZone.getTimeZone("GMT")).setValueClass(Timestamp.class).toDateRange()
- Author:
- Sergey Prilukin
-
-
Constructor Summary
Constructors Constructor Description DateRangeBuilder(java.lang.String expression)
Constructor which allows to create DateRange instance from passed string expression.DateRangeBuilder(java.util.Date dateValue)
Constructor which allows to create DateRange instance from passed date instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Integer
getWeekStartDay()
Returns the week start day used forWEEK
expressions.DateRangeBuilder
set(java.lang.Class<? extends java.util.Date> valueClass)
Configuration method which sets value class, to indicate desired class of DateRange.getStart and DateRange.getEnd methods.DateRangeBuilder
set(java.lang.Integer weekStartDay)
Configuration method which set start of a week which will be used during DateRange.getStart and DateRange.getEnd calculations.DateRangeBuilder
set(java.lang.String datePattern)
Configuration method which sets date pattern which will be used to parse expressionDateRangeBuilder
set(java.util.Locale locale)
Configuration method which set start of a week which will be used during DateRange.getStart and DateRange.getEnd calculations from passed locale instanceDateRangeBuilder
set(java.util.TimeZone timeZone)
Configuration method which sets desired time zone which will be used to calculate DateRange.getStart and DateRange.getEnd.DateRange
toDateRange()
Returns instance of
DateRange
based on which configuration methods was called
-
-
-
Constructor Detail
-
DateRangeBuilder
public DateRangeBuilder(java.util.Date dateValue)
Constructor which allows to create DateRange instance from passed date instance.
No additional configuration via
set
methods is necessary- Parameters:
dateValue
- date instance to create DateRange instance
-
DateRangeBuilder
public DateRangeBuilder(java.lang.String expression)
Constructor which allows to create DateRange instance from passed string expression.
It is usually necessary to pass additional configuration through
set
methods- Parameters:
expression
- string expression which will be parsed in order to construct instance of DateRange
-
-
Method Detail
-
set
public DateRangeBuilder set(java.lang.String datePattern)
Configuration method which sets date pattern which will be used to parse expression
NOTE: this method only will take effect if expression is in fact formatted date like "1970-01-01".
- Parameters:
datePattern
- date pattern which will be used to parse date- Returns:
- this instance of DateRangeBuilder
- See Also:
SimpleDateFormat
-
set
public DateRangeBuilder set(java.lang.Class<? extends java.util.Date> valueClass)
Configuration method which sets value class, to indicate desired class of DateRange.getStart and DateRange.getEnd methods.
NOTE: this method will not take effect if
DateRangeBuilder(java.util.Date)
constructor was used.- Parameters:
valueClass
- class instance of which will be returned by DateRange.getStart and DateRange.getEnd methods- Returns:
- this instance of DateRangeBuilder
-
set
public DateRangeBuilder set(java.util.TimeZone timeZone)
Configuration method which sets desired time zone which will be used to calculate DateRange.getStart and DateRange.getEnd.
NOTE: this method will not take effect if
DateRangeBuilder(java.util.Date)
constructor was used.- Parameters:
timeZone
- time zone which will be used to calculate DateRange.getStart and DateRange.getStart.- Returns:
- this instance of DateRangeBuilder
-
set
public DateRangeBuilder set(java.lang.Integer weekStartDay)
Configuration method which set start of a week which will be used during DateRange.getStart and DateRange.getEnd calculations.
Should be one of:
Calendar.SUNDAY
,Calendar.MONDAY
NOTE: this method only will take effect if expression is in fact date range expression like "WEEK".
- Parameters:
weekStartDay
- week start day to calculate DateRange.getStart and DateRange.getEnd for expressions like "WEEK"- Returns:
- this instance of DateRangeBuilder
-
getWeekStartDay
public java.lang.Integer getWeekStartDay()
Returns the week start day used forWEEK
expressions.- Returns:
- the week start day
- See Also:
set(Integer)
-
set
public DateRangeBuilder set(java.util.Locale locale)
Configuration method which set start of a week which will be used during DateRange.getStart and DateRange.getEnd calculations from passed locale instance
NOTE: This method and
set(Integer)
will overwrite each other so configuration which was set later will be used.NOTE: this method only will take effect if expression is in fact date range expression like "WEEK".
- Parameters:
locale
- locale to calculate DateRange.getStart and DateRange.getEnd for expressions like "WEEK"- Returns:
- this instance of DateRangeBuilder
-
toDateRange
public DateRange toDateRange() throws InvalidDateRangeExpressionException
Returns instance of
DateRange
based on which configuration methods was called- Returns:
- instance of
DateRange
- Throws:
InvalidDateRangeExpressionException
- if could not instantiateDateRange
using passed expression
-
-


Ping Pong
Let's play!
Rules:
Ping Pong will count up to your number from 1 with the following exceptions:
Numbers divisible by 3 become "ping"
Numbers divisible by 5 become "pong"
Numbers divisible by 15 become "ping-pong"
Enter your number here:
Ping Pong !


Write an if statement that takes two double variables a and b and exchanges their values if the first one is greater than the second. As a result print the values a and b, separated by a space.
Write a script that shows the sign (+, - or 0) of the product of three real numbers, without calculating it. Use a sequence of if operators.
Write a script that finds the biggest of three numbers. Use nested if statements.
Sort 3 real values in descending order. Use nested if statements. Note: Don’t use arrays and the built-in sorting functionality
Write a script that asks for a digit (0-9), and depending on the input, shows the digit as a word (in English). Print “not a digit” in case of invalid input. Use a switch statement.
Write a script that reads the coefficients a, b and c of a quadratic equation ax2 + bx + c = 0 and solves it (prints its real roots). Calculates and prints its real roots. Note: Quadratic equations may have 0, 1 or 2 real roots.
Write a script that finds the greatest of given 5 variables. Use nested if statements.
Write a script that converts a number in the range [0…999] to words, corresponding to its English pronunciation.


1.2. The tuple Class Templatetemplate<class T1, class T2, ..., class TN> class tuple { public: // CONSTRUCTORS tuple (); explicit tuple(P1, P2, ..., PN); // when N> 0 tuple(const tuple &); template<class U1, class U2, ..., class UN> tuple(const tuple<U1, U2, ..., UN>&); template<class U1, class U2> tuple(const pair <U1, U2>&); // when N == 2 // ASSIGNMENT OPERATORS tuple & operator=(const tuple &); template<class U1, class U2, ..., class UN> tuple & operator = (const tuple<U1, U2, ..., UN>&); template< class U1, class U2> tuple & operator = (const pair <U1, U2>&); // when N == 2 }; 1.2.1. Creating a tuple ObjectYou can create a tuple object in several ways. If all the element types have default constructors, a tuple holding those element types also has a default constructor; it constructs a tuple object with all its elements constructed with their respective default constructors. In addition, each tuple type that holds one or more elements has a constructor that takes as many arguments as the type has elements; it constructs each stored element from the corresponding argument. Obviously, each argument type must be convertible to the appropriate element type. Finally, a tuple object can be constructed by copying another tuple object with the same number of elements and, when the tuple object that's being constructed holds two elements, by copying a pair object. Example 1.2. Tuple Constructors (tuples/ctors.cpp)
Sometimes, it's inconvenient to have to list the type arguments for tuple. When you know the values that you want a tuple object to hold, you can use the function make_tuple to create a tuple object that holds copies of its arguments. Example 1.3. Function Template maketuple (tuples/maketuple.cpp)
If you ran this example and managed to wade through the lengthy names of the tuple types that your compiler generated, you probably noticed that the last call to make_tuple returns an object of type tuple<int, int>, even though the second argument to make_tuple is a reference to int. The function template make_tuple doesn't distinguish between objects and references to objects. Both result in an element with the type of the object. To create a tuple object that holds references, use the TR1 library function templates ref and cref, defined in the header <functional>. These functions have other uses that we discuss in detail later (see Section 8.1). For now, ref is a wrapper that tells make_tuple that the corresponding element type is a reference to the type of the argument to ref. Similarly, cref tells make_tuple to create an element that's a reference to a const value type. Example 1.4. Use of ref and cref (tuples/refcref.cpp)
Sometimes you'll want to create a tuple object that holds only references to objects. As we just saw, you can use ref to do this, but that can turn into a lot of typing. The function template tie is a convenient way of creating a tuple object that holds references to its arguments. Passing the value ignore as an argument tells tie that the tuple object it returns should ignore assignments to the element that corresponds to that argument. Example 1.5. Function Template tie (tuples/tie.cpp)
1.2.2. AccessYou can change the values in a tuple object by assigning the value of another tuple object to it. The two objects must hold the same number of elements, and the type of each of the elements in the source object must be convertible to the type of the corresponding element in the target object. You can also change the values of a tuple object that holds two elements by assigning from a pair object. Example 1.6. Assigning tuple Objects (tuples/assign.cpp)
The function template get takes a tuple object and returns a reference to the value of one of its elements or, when the element is itself a reference, a copy of that reference. The syntax for this function call looks a little odd. To get the nth element, you pass the value of n as a template argument.[2]
Example 1.7. Function Template get (tuples/get.cpp)
Since it returns a reference to an element of a tuple, you can use get to change the value of that element or, when the element is itself a reference, to change the value of the object that it refers to. Example 1.8. Modifying with get (tuples/getmod.cpp)
1.2.3. Type QueriesIf you need to know how many elements a tuple type holds, you can use the class template tuple_size. template<class Tuple> struct tuple_size
{
static const unsigned value = ...;
};
Example 1.9. Class Template tuple_size (tuples/tuplesize.cpp)
To determine the type of an element, use the class template tuple_-element. template<int Idx, class Tuple> struct tuple_element
{
typedef ... type;
};
Example 1.10. Class Template tuple_element (tuples/tupleelt.cpp)
1.2.4. ComparisonTwo tuple objects can be compared if they have the same number of elements and the corresponding individual elements can be compared. The usual six comparison operators ==, !=, <, <=, >, >= are provided. All the comparisons are short circuited: That is, comparisons are made element by element until the result is known, and no further comparisons are made. For example, when comparing two objects of type tuple<int, int> for equality, when the first object holds the values 0 and 2 and the second object holds the values 1 and 3, only the values of the first elements are compared; the equality test fails, and there is no need to compare the values of the second elements. Comparisons for equality (t0 == t1) apply the operator == to the corresponding elements. Comparisons for inequality (t0 != t1) apply operator == to the tuples and negate the result. The operator < is more complicated. The rule is that the comparison is a lexicographical comparison; that is, the leftmost pair of corresponding elements that are not equal determines the result.[3] However, to determine the order of two tuples, the elements are compared using only operator < on the individual elements. Two elements are equal if neither one is less than the other. To see this better, let's compare these two objects by hand:
tuple<int, double, int> first (0, 2.0, 1); tuple<long, float, int> second (0, 1.0, 2); To decide whether first < second, we begin by comparing the first element of first and the first element of second: get<0>(first) < get<0>(second) // false: both elements are 0
Since the result of the comparison was false, we look at the opposite comparison: get<0>(second) < get<0>(first) // also false: both elements are 0
Now we know that the first elements of the two tuples are equal. We don't yet know whether first is less than second, so we move to the next element: get<1>(first) < get<1>(second) // false: 2.0 is not less than 1.0f
Since the result of the comparison was false, we again look at the opposite comparison: get<1>(second) < get<1>(first) // true: 1.0f < 2.0
We end the comparison here because we found the leftmost pair of elements that are not equal, and that pair determines the order of the two tuples. Since get<1>(second) is less than get<1>(first), the tuple second is less than the tuple first, and the result of the comparison first < second is false. The other three comparison operators are defined in terms of operator <. The expression first > second is equivalent to second < first; first <= second is equivalent to !(second < first); and first >= second is equivalent to !(first < second). To see this in action, compile and run the following example. Example 1.11. Comparing tuple Objects (tuples/compare.cpp)
|


| Symbol | Ask | Bid | Last Traded | Low | High | 52-Week Low | 52-Week High | Volume | Open | Close |
|---|---|---|---|---|---|---|---|---|---|---|
| {{stock.symbol}} | {{stock.ask}} | {{stock.bid}} | {{stock.last_trade_date}} | {{stock.low}} | {{stock.high}} | {{stock.low_52_weeks}} | {{stock.high_52_weeks}} | {{stock.volume}} | {{stock.open}} | {{stock.close}} |


<lcIntro>
The <lcIntro>
provides a detailed introduction and description of the
content to be delivered, in cases where the <shortdesc>
is not
adequate to fully describe the content. It may also include instructor notes.
Category: Learning and training: common content elements


My Links
A web page of links to other cool pages!
TFL Tube Status
- Tabular visualisation of the tube data
Shaded World Map
- A shaded interactive map of the world
Treemap
- A treemap from CSV file


Home
Quick Facts
EXIT X
INTRODUCTION TO MONEY LAUNDERING
Retake Quiz
You have now completed your quiz
Sorry, you have failed the quiz for Introduction to money laundering.
Click Retake Quiz if you would like to attempt the quiz again.
100
%
Your score is:


Project Paxico LibC
A toy C-library that I'm writing from scratch to learn how C-libraries work. Currently targeting x86-64 Linux.
Coding Styles
A reference (for myself) of the styling I use in personal projects.
Linter-CNew
I forked and then nearly-completely rewrote github.com/hebaishi/linter-gcc.


How do you know your code gives the right answers?
... what about after you make changes?
Legacy code: "code without tests" (Michael Feathers, Working Effectively with Legacy Code)
when to test: always.
where to test: external test suite.
Example: tests
subdirectory inside package.
Perfect is the enemy of good; a basic level of tests is better than nothing. But a rigorous test suite will save you time and potential problems in the long run.
Testing is a core principle of scientific software; it ensures results are trustworthy.
Scientific and engineering software is used for planes, power plants, satellites, and decisionmaking. Thus, correctness of this software is pretty important.
And we all know how easy it is to have mistakes in code without realizing it...
def kepler_loc(p1, p2, dt, t):
'''Use Kepler's Laws to predict location of celestial body'''
...
return p3
def test_kepler_loc():
p1 = jupiter(two_days_ago)
p2 = jupiter(yesterday)
exp = jupiter(today)
obs = kepler_loc(p1, p2, 1, 1)
if exp != obs:
raise ValueError("Jupiter is not where it should be!")
Tests compare expected outputs versus observed outputs for known inputs. They do not inspect the body of the function directly. In fact, the body of a function does not even have to exist for a valid test to be written.
def test_func():
exp = get_expected()
obs = func(*args, **kwargs)
assert exp == obs
For exactness:
def test_kepler_loc():
p1 = jupiter(two_days_ago)
p2 = jupiter(yesterday)
exp = jupiter(today)
obs = kepler_loc(p1, p2, 1, 1)
assert exp == obs
For approximate exactness:
import numpy as np
def test_kepler_loc():
p1 = jupiter(two_days_ago)
p2 = jupiter(yesterday)
exp = jupiter(today)
obs = kepler_loc(p1, p2, 1, 1)
assert np.allclose(exp, obs)
pytest
# content of test_sample.py
def inc(x):
return x + 1
def test_answer():
assert inc(3) == 5
$ pytest
pytest
finds all testing modules and functions, and runs them.
interior test: precise points/values do not matter
edge test: test examines beginning or end of a range
Best practice: test all edges and at least one interior point.
Also corner cases: two or more edge cases combined.
import numpy as np
def sinc2d(x, y):
'''(Describe the function here)'''
if x == 0.0 and y == 0.0:
return 1.0
elif x == 0.0:
return np.sin(y) / y
elif y == 0.0:
return np.sin(x) / x
else:
return (np.sin(x) / x) * (np.sin(y) / y)
import numpy as np
from mod import sinc2d
def def test_internal():
exp = (2.0 / np.pi) * (-2.0 / (3.0 * np.pi))
obs = sinc2d(np.pi / 2.0, 3.0 * np.pi / 2.0)
assert np.allclose(exp, obs)
def test_edge_x():
exp = (-2.0 / (3.0 * np.pi))
obs = sinc2d(0.0, 3.0 * np.pi / 2.0)
assert np.allclose(exp, obs)
def test_edge_y():
exp = (2.0 / np.pi)
obs = sinc2d(np.pi / 2.0, 0.0)
assert np.allclose(exp, obs)
def test_corner():
exp = 1.0
obs = sinc2d(0.0, 0.0)
assert np.allclose(exp, obs)
import numpy as np
import pytest
# contents of add.py
def add2(x, y):
return x + y
class Test(object):
@pytest.mark.parametrize('exp, x, y', [
(4, 2, 2),
(5, -5, 10),
(42, 40, 2),
(16, 3, 13),
(-128, 0, -128),
])
def test_add2(self, x, y, exp):
obs = add2(x, y)
assert np.allclose(exp, obs)
$ pytest
Write the tests first.
Before you write any lines of a function, first write the test for that function.
from numpy import allclose
from mod import std
def test_std1():
obs = std([0.0, 2.0])
exp = 1.0
assert np.allclose(exp, obs)
def std(vals):
# this must be cheating.
return 1.0
def test_std1():
obs = std([0.0, 2.0])
exp = 1.0
assert np.allclose(exp, obs)
def test_std2():
obs = std()
exp = 0.0
assert np.allclose(exp, obs)
def test_std3():
obs = std([0.0, 4.0])
exp = 2.0
assert np.allclose(exp, obs)
def std(vals):
# a bit better, but still not quite generic
if len(vals) == 0:
return 0.0
return vals[-1] / 2.0
def test_std1():
obs = std([0.0, 2.0])
exp = 1.0
assert np.allclose(exp, obs)
def test_std2():
obs = std()
exp = 0.0
assert np.allclose(exp, obs)
def test_std3():
obs = std([0.0, 4.0])
exp = 2.0
assert np.allclose(exp, obs)
def test_std4():
obs = std([1.0, 3.0])
exp = 1.0
assert np.allclose(exp, obs)
def test_std4():
obs = std([1.0, 1.0, 1.0])
exp = 0.0
assert np.allclose(exp, obs)
def std(vals):
# finally some math
n = len(vals)
if n == 0:
reutnr 0.0
mu = sum(vals) / n
var = 0.0
for val in vals:
var = var + (val - mu)**2
return (var / n)**0.5
Meaning: percentage of code for which a test exists, determined by number of line executed during tests
pytest-cov
Instructions:
pytest-cov
using pip
/conda
pytest -vv --cov=./
pytest -vv --cov=./ --cov-report html
# content of test_sample.py
def inc(x):
if x < 0:
return x - 1
return x + 1
def test_answer():
assert inc(3) == 4
$ pytest -vv test_sample.py --cov=./
main.py::test_answer PASSED
---------- coverage: platform darwin, python 3.5.4-final-0 -----------
Name Stmts Miss Cover
-----------------------------
main.py 6 1 83%
# content of test_sample.py
def inc(x):
if x < 0:
return x - 1
return x + 1
def test_answer():
assert inc(3) == 4
def test_answer_negative():
assert inc(-2) == -3
$ pytest -vv test_sample.py --cov=./
main.py::test_answer PASSED
main.py::test_answer_negative PASSED
---------- coverage: platform darwin, python 3.5.4-final-0 -----------
Name Stmts Miss Cover
-----------------------------
main.py 8 0 100%


We want to make sure you're not Charles Manson. We hear he's a bit difficult to work with.
What, you expect us to reach you via telepathy?


Utility functions for planning and execution routines to control the ShadowHand.
More...
|
| geometry_msgs::Pose | getRandomPose (moveit::planning_interface::MoveGroupInterface &move_group_interface, std::string &frame_name) |
| | Construct random target pose for a given planning group. More...
|
| |
| bool | planToNamedTarget (shadow_planning::PlanningOptions &options, moveit::planning_interface::MoveGroupInterface &move_group_interface, std::string &target_name, moveit::planning_interface::MoveGroupInterface::Plan &plan) |
| | Construct plan to a given "named" target, these are obtained from predefined RViz names. More...
|
| |
| bool | planToNamedTarget (shadow_finger::Finger &finger, std::string &target_name) |
| |
| bool | planToPoseTarget (shadow_planning::PlanningOptions &options, moveit::planning_interface::MoveGroupInterface &move_group_interface, geometry_msgs::Pose &target_pose, std::string &reference_frame, moveit::planning_interface::MoveGroupInterface::Plan &plan, std::string &end_effector_name) |
| | Construct plan to a given Pose target. More...
|
| |
| bool | planToJointTargets (shadow_planning::PlanningOptions &options, moveit::planning_interface::MoveGroupInterface &move_group_interface, std::string &reference_frame, moveit::planning_interface::MoveGroupInterface::Plan &plan, std::map< std::string, double > &joint_targets) |
| | Construct plan to given Joint target. More...
|
| |
| void | moveFingerJoints (shadow_finger::Finger &finger, std::vector< double > &targetJointAngles) |
| | Move all joints in fingers by given angle (in degrees). Directly use joint publishers to set target commands. More...
|
| |
| bool | executePlan (std::vector< ros::Publisher > &controller_pubs, moveit::planning_interface::MoveGroupInterface::Plan &plan) |
| | Execute plan for a given plan given its list of controllers. More...
|
| |
| bool | executePlan (shadow_finger::Finger &finger) |
| |
| void | executePlanAsync (shadow_finger::Finger &finger) |
| | Execute plan for a given Finger asynchronously, where multiple Fingers can be executed simultaneously. More...
|
| |
| void | executePlanAsync (shadow_hand::Hand &hand) |
| |
Utility functions for planning and execution routines to control the ShadowHand.
Contains PlanningOptions to set necessary parameters for planning.
shadow_planning.hpp "include/shadowlibs/shadow_planning.hpp"
shadow_planning_options.hpp "include/shadowlibs/shadow_planning_options.hpp"
| bool shadow_planning::executePlan |
( |
std::vector< ros::Publisher > & |
controller_pubs, |
|
|
moveit::planning_interface::MoveGroupInterface::Plan & |
plan |
|
) |
| |
Execute plan for a given plan given its list of controllers.
- Parameters
-
| controller_pubs | The list of controller publishers for execution |
| plan | The plan to be executed |
- Returns
- Execution success or failure
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Execute plan for a given Finger asynchronously, where multiple Fingers can be executed simultaneously.
- Parameters
-
| finger | The Finger whose plan is to be executed |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| geometry_msgs::Pose shadow_planning::getRandomPose |
( |
moveit::planning_interface::MoveGroupInterface & |
move_group_interface, |
|
|
std::string & |
frame_name |
|
) |
| |
Construct random target pose for a given planning group.
- Parameters
-
| move_group_interface | The MoveGroup to generate pose for |
| frame_name | The name of the reference frame |
- Returns
- The generated random pose
| void shadow_planning::moveFingerJoints |
( |
shadow_finger::Finger & |
finger, |
|
|
std::vector< double > & |
targetJointAngles |
|
) |
| |
Move all joints in fingers by given angle (in degrees). Directly use joint publishers to set target commands.
- Parameters
-
| finger | The Finger object whose joints are to be controlled |
| targetJointAngles | The target joints angles for each joint in finger |
| bool shadow_planning::planToJointTargets |
( |
shadow_planning::PlanningOptions & |
options, |
|
|
moveit::planning_interface::MoveGroupInterface & |
move_group_interface, |
|
|
std::string & |
reference_frame, |
|
|
moveit::planning_interface::MoveGroupInterface::Plan & |
plan, |
|
|
std::map< std::string, double > & |
joint_targets |
|
) |
| |
Construct plan to given Joint target.
- Parameters
-
| options | shadow_planning::PlanningOptions object for computing the plan |
| move_group_interface | The MoveGroup for which to plan |
| reference_frame | The frame of reference for planning |
| plan | The reference to the plan, which will be populated |
| joint_targets | Map from joint name to the target value |
- Returns
- Planning success or failure boolean
| bool shadow_planning::planToNamedTarget |
( |
shadow_planning::PlanningOptions & |
options, |
|
|
moveit::planning_interface::MoveGroupInterface & |
move_group_interface, |
|
|
std::string & |
target_name, |
|
|
moveit::planning_interface::MoveGroupInterface::Plan & |
plan |
|
) |
| |
Construct plan to a given "named" target, these are obtained from predefined RViz names.
- Parameters
-
| options | The shadow_planning::PlanningOptions object for computing the plan |
| move_group_interface | The MoveGroup for which to plan |
| target_name | The named target |
| plan | The reference to the plan, which will be populated |
- Returns
- Planning success or failure boolean
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| bool shadow_planning::planToPoseTarget |
( |
shadow_planning::PlanningOptions & |
options, |
|
|
moveit::planning_interface::MoveGroupInterface & |
move_group_interface, |
|
|
geometry_msgs::Pose & |
target_pose, |
|
|
std::string & |
reference_frame, |
|
|
moveit::planning_interface::MoveGroupInterface::Plan & |
plan, |
|
|
std::string & |
end_effector_name |
|
) |
| |
Construct plan to a given Pose target.
- Parameters
-
| options | The shadow_planning::PlanningOptions object for computing the plan |
| move_group_interface | The MoveGroup for which to plan |
| target_pose | The target pose |
| reference_frame | The frame of reference for planning |
| plan | The reference to the plan, which will be populated |
| end_effector_name | The name of the end-effector for which plan is computed |
- Returns
- Planning success or failure boolean


Survey Form
Short description...
* Name:
* Email:
* Age:
Student
Full time job
Full time learner
Prefer not to say
Other
Definitely
Maybe
Not Sure
Front-end Projects
Back-end Projects
Data Visualization
Challenges
Open Source Community
Gitter help rooms
Videos
City Meetups
Wiki
Forum
Additional Courses
Any Comments or Suggestions?


Beginnings
The Purest Cacophony is the solo project of Jasper Boyd. After playing bass in a number of bands through high school, he was ready to make the transition from accompanist to writer.
I Will Not Fall
In the fall of 2012 Jasper finished writing the collection of songs that became the I Will Not Fall EP and recorded the release both at his apartment in Worcester, MA. & his parent's house in Brunswick, ME.
While in Maine, Jasper enlisted the help of Theo Van Dyck on trumpet. Fast-forward a month and Jonathan Dana was overdubbing the drums at Estabrook Hall, Clark University.
After mixing the tracks himself, Jasper sent them to Mike Tierney to be mastered. The final step was Paul Puiia supplying the album artwork, a beautiful 40-minute exposure of the Maine coast.
Future
During the recording process of I Will Not Fall Jasper grew tired of laborious process of multi-tracking. In an effort to create more natural sounding music Jasper is recording the full-length album completely live.
Look for it here in the Fall.


Oops!
Something went wrongPossible reasons:
A page you are looking for doesn't exist
You tried to get the recommendation, but rated movies, which we don't have in our database
You tried to get the recommendation, but rated less than tree movies
Try again


USWNT ZDOG
See the Pen Zdog USWNT by Travis John (@travis_john) on CodePen.
Zdog is a new Javascript library that renders pseudo-3D elements onto a canvas. I experimented with it's semantic class structure to combine shapes and paths to recreate a 3D rendering of the United States Women's National Football Team crest to honor them as they compete in the 2019 FIFA World Cup.
This pen was featured on Codepen's homepage on June 17th, 2019
See More Featured Pens
All of these pens were featured on Codepen's Homepage


Title
Start countdown
Start timing now
Start launch sequence
Stop
Setup
Safety briefing (speak)
Second display
Race 1 title
X
Starting mode
Countdown + autostart with beeps
Countdown + autostart
Manual start
Manual launch aid
Automated launch sequence
Race display mode
Timer up
Timer down
Scheduled starting time
HH:MM
Duration
hours,
minutes
Start sequence delay
seconds
OK
Title
Start countdown
Start timing now
Stop
Setup
Race 1 title
X
Starting mode
Countdown + autostart with beeps
Countdown + autostart
Manual start
Manual launch aid
Automated launch sequence
Race display mode
Timer up
Timer down
Scheduled starting time
HH:MM
Duration
hours,
minutes
OK


FKA twigs opens up on her mental health: “It’s okay not to feel amazing all the time”
"I know that I'm still perfect the way that I am"
FKA twigs has opened up about her ongoing mental health struggles, saying that “it’s okay not to feel amazing all the time”.
The artist, whose real name is Tahlia Barnet, spoke to BBC Radio 1’s Annie Mac following the release of her new single ‘Sad Day‘. During the chat, twigs explained that she’s become more at ease with herself in recent years.
“It’s becoming apparent as I get older and as I get to know myself, it’s okay not to feel amazing all the time,” she told Mac.
 And that has nothing to do with my completeness in the moment.”
Referring to the lyrics “I’ve never seen a hero like me in a sci-fi” from her track ‘Home With You‘, the singer revealed the meaning behind the line.
“I think that’s what I mean by ‘I’ve never seen a hero like me in a sci-fi.’ I haven’t,” she said, “and now in this age where we’re obsessed with superheroes and all these huge franchises making these amazing big films, I’m yet to see a female character who is beautifully strong and perfect and flawed and is a full range.”
Twigs went on to say that “even our idea of what a pop star is or idea of what a female icon is is often very complete.”
FKA twigs’ second album ‘MAGDALENE’, meanwhile, is set to arrive this Friday. The project marks her first full-length record in five years and follows on from 2014’s ‘LP1’.
For help and advice on mental health:
- ‘Am I depressed?‘ – Help and advice on mental health and what to do next
- Help Musicians UK – Around the clock mental health support and advice for musicians
- Music Support Org – Help and support for musicians struggling with alcoholism, addiction, or mental health issues
- YOUNG MINDS – The voice for young people’s health and wellbeing
- CALM – The Campaign Against Living Miserably for young men
- Time To Change – Let’s end mental health discrimination
- The Samaritans – Confidential support 24 hours a day


- Timestamp:
- 11/20/12 12:42:04 (3 years ago)
- Location:
- branches/UQ/math/legacy/envelope
- Files:
-
- 5 edited
-
Looper_BoLiSurr_Cy.py (modified) (1 diff)
-
memoize.py (modified) (5 diffs)
-
otm_hvi.py (modified) (1 diff)
-
otm_hvi_new.py (modified) (1 diff)
-
sausage.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/UQ/math/legacy/envelope/Looper_BoLiSurr_Cy.py
r592 r596 119 119 120 120 # generate primary constraints function 121 # @memoized(tol=3 )121 # @memoized(tol=3, deep=True) 122 122 def constraints(rv): 123 123 rrv = range(len(rv)) -
branches/UQ/math/legacy/envelope/memoize.py
r592 r596 50 50 51 51 52 def simple_round_factory(tol): 53 def simple_round(*args, **kwds): 54 argstype = type(args) 55 _args = list(args) 56 _kwds = kwds.copy() 57 for i,j in enumerate(args): 58 if isinstance(j, float): _args[i] = round(j, tol) # don't round int 59 for i,j in kwds.items(): 60 if isinstance(j, float): _kwds[i] = round(j, tol) 61 return argstype(_args), _kwds 62 return simple_round 63 64 def simple_round(tol=0): #NOTE: only rounds floats, nothing else 65 def dec(f): 66 def func(*args, **kwds): 67 _simple_round = simple_round_factory(tol) 68 _args,_kwds = _simple_round(*args, **kwds) 69 return f(*_args, **_kwds) 70 return func 71 return dec 72 73 52 74 def get_archive(archive): 53 75 import dill as pickle … … 101 123 #FIXME: resolve signature difference... @memoized versus @memoized() 102 124 103 def memoized0_nopickle_round(tol=0 ):125 def memoized0_nopickle_round(tol=0, deep=False): 104 126 """Decorator that memoizes a function's return value each time it is called. 105 127 If called later with the same arguments, the memoized value is returned, and … … 111 133 memo = {} 112 134 113 @deep_round(tol) 135 if deep: rounded = deep_round 136 else: rounded = simple_round 137 138 @rounded(tol) 114 139 def rounded_args(*args, **kwds): 115 140 return (args, kwds) … … 130 155 131 156 132 def memoized0_round(tol=0 ):157 def memoized0_round(tol=0, deep=False): 133 158 """Decorator that memoizes a function's return value each time it is called. 134 159 If called later with the same arguments, the memoized value is returned, and … … 139 164 memo = {} 140 165 141 @deep_round(tol) 166 if deep: rounded = deep_round 167 else: rounded = simple_round 168 169 @rounded(tol) 142 170 def rounded_args(*args, **kwds): 143 171 return (args, kwds) -
branches/UQ/math/legacy/envelope/otm_hvi.py
r592 r596 33 33 from memoize import memoized0_nopickle_round as memoized 34 34 35 @memoized(tol=3 )35 @memoized(tol=3, deep=True) 36 36 def eureka(x, root_path="."): 37 37 """ Notes for now, will be fixed in the future!!! -
branches/UQ/math/legacy/envelope/otm_hvi_new.py
r592 r596 33 33 from memoize import memoized0_nopickle_round as memoized 34 34 35 @memoized(tol=3 )35 @memoized(tol=3, deep=True) 36 36 def eureka(x, root_path="."): 37 37 """ Notes for now, will be fixed in the future!!! -
branches/UQ/math/legacy/envelope/sausage.py
r592 r596 103 103 from memoize import memoized0_nopickle_round as memoized 104 104 # vectorize 'sausage_bounds' to find min/max for every evaluation point 105 @memoized(tol=3 )105 @memoized(tol=3, deep=True) 106 106 def model_sausage(x): 107 107 "find the boundary of the sausage in Y for the given x"
Note: See TracChangeset
for help on using the changeset viewer.


The EAN-13 Bar Code is used to encode a GTIN-13, and can be scanned in both a retail Point-of-Sale (POS) and a General Distribution Scanning Environment.


 I had a discussion with someone at a startup about which one to use.
Needless to say, there is plenty of options in the market place – everything from home brew custom solution to managed services to low-code platforms. Stuff like this obviously requires some research before any commitment. Since the company needing this is a very early stage startup. I proposed a drag-and-drop low-code editor with a plethora of pre-built components to build internal CRUD (create, read, update, delete) app. It is a market leader in the space and is quite scalable.
Unfortunately, the person I proposed to did not agree. His main reason was that a custom solution would be able to provide more control.
Rewind 8 years, I would probably give a similar response. I used to enjoy being able to build everything from scratch. The ability to control every bit of your tech stack was essential or so I thought. The company was with started to grow but at some point we hit a wall. We had a Django monolith and overtime the codebase grew very quickly. Then, support for Python 2 ceased and we had a hell of a time switching Python 3. Compliance and security control to meet SOC 2 were not trivial either. I was wrong and learned it the hard way.
Now, I carefully evaluate decisions before committing, typically with an eye towards the next fundraising goal. If I build, it would be towards a real intellectual property that the company can and should own. If I buy, I do it to save time, so that we can grow quickly without the baggage.
It is a bit like dating and marriage. Most people wouldn’t marry before dating. And even when you marry, neither spouse should be a control freak. It would make life very miserable for some people.
Lesson learned: pick your tech and tools carefully.


CARNE TREMULA (1997, Spanish) by Pedro Almodovar
"Those who do not drink believe they can solve any problem by not drinking".
If you like Pedro Almodovar, look forward to "Carne Tremula", his latest movie that just opened in Italy (and, I guess, in Spain).  TIE ME DOWN!), "Tacones Lejanos" and "Kika" looked sometimes as if the director felt the need to somehow top his previous efforts in shocking and outgrossing the audience. His latest so far, "El flor del mi secreto", was the opposite: deep, moving and almost completely free from Almodovar's trademark "scandal" flavor. "Carne Tremula" (a rough translation could be "Shivering Flesh") marks the director's return to what he does best: off-the-wall melodrama, with witty dialogue and a feeling of innocence that covers no matter what perversion or scandal. The story is nowhere as erratic or poorly built as in some of his previous efforts; the plot is loosely based on a Ruth Rendell novel which provides the basic structure, but the whole film feels totally Almodovar's: romantic, excessive -but not excessively so, if you understand what I mean- and also extremely funny and moving. The movie starts with the birth of the protagonist -Victor- on a bus in Madrid on the night that general Franco's regime declares curfew. We then cut forward twenty years and meet him as a young man trying to trace down a girl with whom he's had casual sex in a night club toilet the night before. The girl -played by italian actress Francesca Neri- lets him in her house by mistake, assuming he is the local pusher who should provide her some pot. From that moment on, the plot starts spinning so fast and unpredictable that it would really be a shame to recount it. "Carne Tremula" offers that kind of radical romanticism that was the backbone of "Tie Me Up! Tie Me Down!" but it doesn't share with that movie the lack of spontaneity: it does not feel as something *designed* to be radical and it is therefore much more effective. It also features an interestingly Kieslowskian attention to the power of chance and coincidence. This helps a lot in keeping the plot going effortlessly through a notable richness of events and twists. Great performances from everyone, although I particularly liked Angela Molina as a middle-aged woman who is afraid of her violent yet loving husband and therefore goes for younger boys: she reminded me of the great Anne Bancroft performance as Mrs. Robinson in THE GRADUATE. The best from Pedro since "La ley del deseo" (The Law of Desire) and "Matador".
****
<EMAIL_ADDRESS>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


---
layout: post
title: Kings of Convenience - Me in You
date: '2012-02-12T20:21:00.001+01:00'
comments: true
tags:
- Music
- Travel
modified_time: '2012-02-12T21:31:35.207+01:00'
blogger_id: tag:blogger.com,1999:blog-5442825777886761537.post-2817333687290616948
blogger_orig_url: http://stickmanscorral.blogspot.com/2012/02/kings-of-convenience-me-in-you.html
---
If for no other reason than my apartment gets some camera time.[*]
Some very mellow Sunday night listening with suitably serene Scandinavian scenes.
[*] I'm basically famous now.


The Circus
The Circus is a movie starring Charles Chaplin, Merna Kennedy, and Al Ernest Garcia. The Tramp finds work and the girl of his dreams at a circus.


Latest Activity
Dyanne Aceron
Cigarette Butt CollectorOur team is expanding again. We are looking for a Product Manager and Software Engineer to drive our new aspects of our capital projects. If you're interested, please drop a comment here or simply message me. #softwareengineer #engineering
We're hiring of Product Manager
Full-time, $60,000 - $80,000 annual
Bay Area, San Francisco, CAWork Experience
Area Sales Manager
ThemePixels, Inc., Bay Area, San Francisco, CA
December 2016 - Present- Reaching the targets and goals set for my area.
- Servicing the needs of my existing customers.
- Maintaining the relationships with existing customers for repeat business.
- Reporting to top managers.
- Keeping up to date with the products.
Education
BS in Computer Science
Holy Name University, Tagbilaran City, Bohol
2002-2006Interests
Github, Inc.
Web-based hosting service for version control using Git... Learn more
6,182,220 FollowersDHL Express
Logistics company providing international courier service... Learn more
3,005,192 FollowersFacebook, Inc.
Online social media and social networking service company... Learn more
12,182,220 FollowersPhoto and video-sharing social networking service by Facebook... Learn more
3,005,192 Followers


|
QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.30
|
#include <ql/models/marketmodels/browniangenerator.hpp>
Public Member Functions | |
| virtual | ~BrownianGenerator ()=default |
| virtual Real | nextStep (std::vector< Real > &)=0 |
| virtual Real | nextPath ()=0 |
| virtual Size | numberOfFactors () const =0 |
| virtual Size | numberOfSteps () const =0 |
Definition at line 30 of file browniangenerator.hpp.
|
virtualdefault |
Implemented in MTBrownianGenerator, and SobolBrownianGenerator.
|
pure virtual |
Implemented in MTBrownianGenerator, and SobolBrownianGenerator.
|
pure virtual |
Implemented in MTBrownianGenerator, and SobolBrownianGenerator.
|
pure virtual |
Implemented in MTBrownianGenerator, and SobolBrownianGenerator.


This is interesting. I have never needed to implement Ray Picking before since, I never made a Game in OpenGL or DirectX where you would point and click. I wasn't familiar with the concepts and loic behind it.
I dove in, read some online material on it, of which this stood out the most to me. This is nicely summarized in a video althought the video doesn't use C++
I had a lot of trouble with Ray Picking. I was quite confused as to why it did not work even though I did everything right. And after a couple of days of being stuck, I decided to write Unit Tests for this Engine to help me Debug where the issue was.
Unit Tests
Once I decided to include Unit Tests in my Project, I wanted to make sure that I would only write the tests as needed due to time constraints. So, this project would not be guided by the Test Driven Development Principles. But, the Unit Tests included would help me debug the Program. This might come back to impact me in the future, but for now, this seems to work just fine.
Another issue I faced back then is to get the exact values of each Ray, Model, View Matrices to help write Unit Tests. I got it after some manual calculation and whiteboarding. You can see most of it the program, under the CameraTests.cpp file.
I also had the issue of determining the boundaries of a given mesh, and to use those boundaries for Ray Picking. I just a cube for now, But Bounding Boxes and determining their collisions with a Ray were introduced here.


Filtering Product Reviews
Catalog Managers can filter product reviews using the Store Admin module.
- On the Store Admin module, click the Reviews link and then apply one or more of these filters.
- At Status, select from these options:
- --- ALL ---: Select to view both approved and unapproved reviews.
- Not Approved: Select to only view unapproved reviews. These reviews are not visible to customers.
- Approved Only: Select to view only reviews that are approved. These reviews are visible to customers.
- At Category, select --- ALL --- to view reviews for products in all categories - OR - Select a category to only view reviews for products within that category.
- At Product, select --- ALL --- to view reviews for all products - OR - Select a product to only view reviews for that product.


Continous Integration
Here you will find snippets to use Meson with various CI such as Travis and Appveyor.
Please file an issue if these instructions don't work for you.
Travis for OS X and Linux (with Docker)
Travis for Linux provides ancient versions of Ubuntu which will likely cause problems building your projects regardless of which build system you're using. We recommend using Docker to get a more-recent version of Ubuntu and installing Ninja, Python3, and Meson inside it.
This yml
file is derived from the configuration used by Meson for running its own tests.
sudo: false
os:
- linux
- osx
language:
- cpp
services:
- docker
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja python3; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip3 install meson; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull YOUR/REPO:yakkety; fi
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM YOUR/REPO:yakkety > Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit .; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true CC=$CC CXX=$CXX meson build && ninja -C build test"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then SDKROOT=$(xcodebuild -version -sdk macosx Path) meson build && ninja -C build test; fi
AppVeyor for Windows
For CI on Windows, AppVeyor is probably your best bet. Here's a sample yml
file for use with that.
os: Visual Studio 2015
matrix:
- arch: x86
compiler: msvc2010
- arch: x86
compiler: msvc2015
- arch: x64
compiler: msvc2015
platform:
- x64
install:
# Use the x86 python only when building for x86 for the cpython tests.
# For all other archs (including, say, arm), use the x64 python.
- ps: (new-object net.webclient).DownloadFile('https://dl.dropboxusercontent.com/u/37517477/ninja.exe', 'C:\projects\meson\ninja.exe')
- cmd: if %arch%==x86 (set MESON_PYTHON_PATH=C:\python34) else (set MESON_PYTHON_PATH=C:\python34-x64)
- cmd: echo Using Python at %MESON_PYTHON_PATH%
- cmd: %MESON_PYTHON_PATH%\pip install meson
- cmd: if %compiler%==msvc2010 ( call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %arch% )
- cmd: if %compiler%==msvc2015 ( call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %arch% )
build_script:
- cmd: echo Building on %arch% with %compiler%
- cmd: PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%; && python meson.py --backend=ninja build
- cmd: PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%; && ninja -C build
test_script:
- cmd: PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%; && ninja -C build test
Travis without Docker
This setup is not recommended but included here for completeness
sudo: false
language: cpp
group: beta
matrix:
include:
- os: linux
dist: trusty
- os: osx
install:
- export PATH="`pwd`/build:${PATH}"
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install python3 ninja; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip && unzip -q ninja-linux.zip -d build; fi
- pip3 install meson
script:
- meson build
- ninja -C build
- ninja -C build test
The results of the search are


java.io.Serializable
, java.lang.Comparable<YearQuarter>
, java.time.temporal.Temporal
, java.time.temporal.TemporalAccessor
, java.time.temporal.TemporalAdjuster
public final class YearQuarter extends java.lang.Object implements java.time.temporal.Temporal, java.time.temporal.TemporalAdjuster, java.lang.Comparable<YearQuarter>, java.io.Serializable
2007-Q2
.
YearQuarter
is an immutable date-time object that represents the combination
of a year and quarter. Any field that can be derived from a year and quarter can be obtained.
A quarter is defined by Quarter
and Month.firstMonthOfQuarter()
- Q1, Q2, Q3 and Q4.
Q1 is January to March, Q2 is April to June, Q3 is July to September and Q4 is October to December.
This class does not store or represent a day, time or time-zone.
For example, the value "2nd quarter 2007" can be stored in a YearQuarter
.
The ISO-8601 calendar system is the modern civil calendar system used today in most of the world. It is equivalent to the proleptic Gregorian calendar system, in which today's rules for leap years are applied for all time. For most applications written today, the ISO-8601 rules are entirely suitable. However, any application that makes use of historical dates, and requires them to be accurate will find the ISO-8601 approach unsuitable. Note that the ISO-8601 standard does not define or refer to quarters.
This class must be treated as a value type. Do not synchronize, rely on the identity hash code or use the distinction between equals() and ==.
| Modifier and Type | Method | Description |
|---|---|---|
java.time.temporal.Temporal |
adjustInto(java.time.temporal.Temporal temporal) |
Adjusts the specified temporal object to have this year-quarter.
|
java.time.LocalDate |
atDay(int dayOfQuarter) |
Combines this year-quarter with a day-of-quarter to create a
LocalDate . |
java.time.LocalDate |
atEndOfQuarter() |
Returns a
LocalDate at the end of the quarter. |
int |
compareTo(YearQuarter other) |
Compares this year-quarter to another
|
boolean |
equals(java.lang.Object obj) |
Checks if this year-quarter is equal to another year-quarter.
|
java.lang.String |
format(java.time.format.DateTimeFormatter formatter) |
Formats this year-quarter using the specified formatter.
|
static YearQuarter |
from(java.time.temporal.TemporalAccessor temporal) |
Obtains an instance of
YearQuarter from a temporal object. |
int |
get(java.time.temporal.TemporalField field) |
Gets the value of the specified field from this year-quarter as an
int . |
long |
getLong(java.time.temporal.TemporalField field) |
Gets the value of the specified field from this year-quarter as a
long . |
Quarter |
getQuarter() |
Gets the quarter-of-year field using the
Quarter enum. |
int |
getQuarterValue() |
Gets the quarter-of-year field from 1 to 4.
|
int |
getYear() |
Gets the year field.
|
int |
hashCode() |
A hash code for this year-quarter.
|
boolean |
isAfter(YearQuarter other) |
Is this year-quarter after the specified year-quarter.
|
boolean |
isBefore(YearQuarter other) |
Is this year-quarter before the specified year-quarter.
|
boolean |
isLeapYear() |
Checks if the year is a leap year, according to the ISO proleptic
calendar system rules.
|
boolean |
isSupported(java.time.temporal.TemporalField field) |
Checks if the specified field is supported.
|
boolean |
isSupported(java.time.temporal.TemporalUnit unit) |
Checks if the specified unit is supported.
|
boolean |
isValidDay(int dayOfQuarter) |
Checks if the day-of-quarter is valid for this year-quarter.
|
int |
lengthOfQuarter() |
Returns the length of the quarter, taking account of the year.
|
int |
lengthOfYear() |
Returns the length of the year.
|
YearQuarter |
minus(long amountToSubtract,
java.time.temporal.TemporalUnit unit) |
Returns a copy of this year-quarter with the specified amount subtracted.
|
YearQuarter |
minus(java.time.temporal.TemporalAmount amountToSubtract) |
Returns a copy of this year-quarter with the specified amount subtracted.
|
YearQuarter |
minusQuarters(long quartersToSubtract) |
Returns a copy of this year-quarter with the specified period in quarters subtracted.
|
YearQuarter |
minusYears(long yearsToSubtract) |
Returns a copy of this year-quarter with the specified period in years subtracted.
|
static YearQuarter |
now() |
Obtains the current year-quarter from the system clock in the default time-zone.
|
static YearQuarter |
now(java.time.Clock clock) |
Obtains the current year-quarter from the specified clock.
|
static YearQuarter |
now(java.time.ZoneId zone) |
Obtains the current year-quarter from the system clock in the specified time-zone.
|
static YearQuarter |
of(int year,
int quarter) |
Obtains an instance of
YearQuarter from a year and quarter. |
static YearQuarter |
of(int year,
Quarter quarter) |
Obtains an instance of
YearQuarter from a year and quarter. |
static YearQuarter |
parse(java.lang.CharSequence text) |
Obtains an instance of
YearQuarter from a text string such as 2007-Q2 . |
static YearQuarter |
parse(java.lang.CharSequence text,
java.time.format.DateTimeFormatter formatter) |
Obtains an instance of
YearQuarter from a text string using a specific formatter. |
YearQuarter |
plus(long amountToAdd,
java.time.temporal.TemporalUnit unit) |
Returns a copy of this year-quarter with the specified amount added.
|
YearQuarter |
plus(java.time.temporal.TemporalAmount amountToAdd) |
Returns a copy of this year-quarter with the specified amount added.
|
YearQuarter |
plusQuarters(long quartersToAdd) |
Returns a copy of this year-quarter with the specified period in quarters added.
|
YearQuarter |
plusYears(long yearsToAdd) |
Returns a copy of this year-quarter with the specified period in years added.
|
<R> R |
query(java.time.temporal.TemporalQuery<R> query) |
Queries this year-quarter using the specified query.
|
java.time.temporal.ValueRange |
range(java.time.temporal.TemporalField field) |
Gets the range of valid values for the specified field.
|
java.lang.String |
toString() |
Outputs this year-quarter as a
String , such as 2007-Q2 . |
long |
until(java.time.temporal.Temporal endExclusive,
java.time.temporal.TemporalUnit unit) |
Calculates the amount of time until another year-quarter in terms of the specified unit.
|
YearQuarter |
with(java.time.temporal.TemporalAdjuster adjuster) |
Returns an adjusted copy of this year-quarter.
|
YearQuarter |
with(java.time.temporal.TemporalField field,
long newValue) |
Returns a copy of this year-quarter with the specified field set to a new value.
|
YearQuarter |
withQuarter(int quarter) |
Returns a copy of this
YearQuarter with the quarter-of-year altered. |
YearQuarter |
withYear(int year) |
Returns a copy of this
YearQuarter with the year altered. |
public static YearQuarter now()
This will query the system clock
in the default
time-zone to obtain the current year-quarter.
The zone and offset will be set based on the time-zone in the clock.
Using this method will prevent the ability to use an alternate clock for testing because the clock is hard-coded.
public static YearQuarter now(java.time.ZoneId zone)
This will query the system clock
to obtain the current year-quarter.
Specifying the time-zone avoids dependence on the default time-zone.
Using this method will prevent the ability to use an alternate clock for testing because the clock is hard-coded.
zone
- the zone ID to use, not nullpublic static YearQuarter now(java.time.Clock clock)
This will query the specified clock to obtain the current year-quarter.
Using this method allows the use of an alternate clock for testing.
The alternate clock may be introduced using dependency injection
.
clock
- the clock to use, not nullpublic static YearQuarter of(int year, Quarter quarter)
YearQuarter
from a year and quarter.year
- the year to represent, from MIN_YEAR to MAX_YEARquarter
- the quarter-of-year to represent, not nulljava.time.DateTimeException
- if the year value is invalidpublic static YearQuarter of(int year, int quarter)
YearQuarter
from a year and quarter.year
- the year to represent, from MIN_YEAR to MAX_YEARquarter
- the quarter-of-year to represent, from 1 to 4java.time.DateTimeException
- if either field value is invalidpublic static YearQuarter from(java.time.temporal.TemporalAccessor temporal)
YearQuarter
from a temporal object.
This obtains a year-quarter based on the specified temporal.
A TemporalAccessor
represents an arbitrary set of date and time information,
which this factory converts to an instance of YearQuarter
.
The conversion extracts the YEAR
and
QUARTER_OF_YEAR
fields.
The extraction is only permitted if the temporal object has an ISO
chronology, or can be converted to a LocalDate
.
This method matches the signature of the functional interface TemporalQuery
allowing it to be used in queries via method reference, YearQuarter::from
.
temporal
- the temporal object to convert, not nulljava.time.DateTimeException
- if unable to convert to a YearQuarter
public static YearQuarter parse(java.lang.CharSequence text)
YearQuarter
from a text string such as 2007-Q2
.
The string must represent a valid year-quarter.
The format must be uuuu-'Q'Q
where the 'Q' is case insensitive.
Years outside the range 0000 to 9999 must be prefixed by the plus or minus symbol.
text
- the text to parse such as "2007-Q2", not nulljava.time.format.DateTimeParseException
- if the text cannot be parsedpublic static YearQuarter parse(java.lang.CharSequence text, java.time.format.DateTimeFormatter formatter)
YearQuarter
from a text string using a specific formatter.
The text is parsed using the formatter, returning a year-quarter.
text
- the text to parse, not nullformatter
- the formatter to use, not nulljava.time.format.DateTimeParseException
- if the text cannot be parsedpublic boolean isSupported(java.time.temporal.TemporalField field)
This checks if this year-quarter can be queried for the specified field.
If false, then calling the range
,
get
and with(TemporalField, long)
methods will throw an exception.
If the field is a ChronoField
then the query is implemented here.
The supported fields are:
QUARTER_OF_YEAR
YEAR_OF_ERA
YEAR
ERA
ChronoField
instances will return false.
If the field is not a ChronoField
, then the result of this method
is obtained by invoking TemporalField.isSupportedBy(TemporalAccessor)
passing this
as the argument.
Whether the field is supported is determined by the field.
isSupported
in interface java.time.temporal.TemporalAccessor
field
- the field to check, null returns falsepublic boolean isSupported(java.time.temporal.TemporalUnit unit)
This checks if the specified unit can be added to, or subtracted from, this date-time.
If false, then calling the plus(long, TemporalUnit)
and
minus
methods will throw an exception.
If the unit is a ChronoUnit
then the query is implemented here.
The supported units are:
QUARTER_YEARS
YEARS
DECADES
CENTURIES
MILLENNIA
ERAS
ChronoUnit
instances will return false.
If the unit is not a ChronoUnit
, then the result of this method
is obtained by invoking TemporalUnit.isSupportedBy(Temporal)
passing this
as the argument.
Whether the unit is supported is determined by the unit.
isSupported
in interface java.time.temporal.Temporal
unit
- the unit to check, null returns falsepublic java.time.temporal.ValueRange range(java.time.temporal.TemporalField field)
The range object expresses the minimum and maximum valid values for a field. This year-quarter is used to enhance the accuracy of the returned range. If it is not possible to return the range, because the field is not supported or for some other reason, an exception is thrown.
If the field is a ChronoField
then the query is implemented here.
The supported fields
will return
appropriate range instances.
All other ChronoField
instances will throw an UnsupportedTemporalTypeException
.
If the field is not a ChronoField
, then the result of this method
is obtained by invoking TemporalField.rangeRefinedBy(TemporalAccessor)
passing this
as the argument.
Whether the range can be obtained is determined by the field.
range
in interface java.time.temporal.TemporalAccessor
field
- the field to query the range for, not nulljava.time.DateTimeException
- if the range for the field cannot be obtainedjava.time.temporal.UnsupportedTemporalTypeException
- if the field is not supportedpublic int get(java.time.temporal.TemporalField field)
int
.
This queries this year-quarter for the value for the specified field. The returned value will always be within the valid range of values for the field. If it is not possible to return the value, because the field is not supported or for some other reason, an exception is thrown.
If the field is a ChronoField
then the query is implemented here.
The supported fields
will return valid
values based on this year-quarter,.
All other ChronoField
instances will throw an UnsupportedTemporalTypeException
.
If the field is not a ChronoField
, then the result of this method
is obtained by invoking TemporalField.getFrom(TemporalAccessor)
passing this
as the argument. Whether the value can be obtained,
and what the value represents, is determined by the field.
get
in interface java.time.temporal.TemporalAccessor
field
- the field to get, not nulljava.time.DateTimeException
- if a value for the field cannot be obtained or
the value is outside the range of valid values for the fieldjava.time.temporal.UnsupportedTemporalTypeException
- if the field is not supported or
the range of values exceeds an int
java.lang.ArithmeticException
- if numeric overflow occurspublic long getLong(java.time.temporal.TemporalField field)
long
.
This queries this year-quarter for the value for the specified field. If it is not possible to return the value, because the field is not supported or for some other reason, an exception is thrown.
If the field is a ChronoField
then the query is implemented here.
The supported fields
will return valid
values based on this year-quarter.
All other ChronoField
instances will throw an UnsupportedTemporalTypeException
.
If the field is not a ChronoField
, then the result of this method
is obtained by invoking TemporalField.getFrom(TemporalAccessor)
passing this
as the argument. Whether the value can be obtained,
and what the value represents, is determined by the field.
getLong
in interface java.time.temporal.TemporalAccessor
field
- the field to get, not nulljava.time.DateTimeException
- if a value for the field cannot be obtainedjava.time.temporal.UnsupportedTemporalTypeException
- if the field is not supportedjava.lang.ArithmeticException
- if numeric overflow occurspublic int getYear()
This method returns the primitive int
value for the year.
The year returned by this method is proleptic as per get(YEAR)
.
public int getQuarterValue()
This method returns the quarter as an int
from 1 to 4.
Application code is frequently clearer if the enum Quarter
is used by calling getQuarter()
.
getQuarter()
public Quarter getQuarter()
Quarter
enum.
This method returns the enum Quarter
for the quarter.
This avoids confusion as to what int
values mean.
If you need access to the primitive int
value then the enum
provides the int value
.
getQuarterValue()
public boolean isLeapYear()
This method applies the current rules for leap years across the whole time-line. In general, a year is a leap year if it is divisible by four without remainder. However, years divisible by 100, are not leap years, with the exception of years divisible by 400 which are.
For example, 1904 is a leap year it is divisible by 4. 1900 was not a leap year as it is divisible by 100, however 2000 was a leap year as it is divisible by 400.
The calculation is proleptic - applying the same rules into the far future and far past. This is historically inaccurate, but is correct for the ISO-8601 standard.
public boolean isValidDay(int dayOfQuarter)
This method checks whether this year and quarter and the input day form a valid date.
dayOfQuarter
- the day-of-quarter to validate, from 1 to 92, invalid value returns falsepublic int lengthOfQuarter()
This returns the length of the quarter in days.
public int lengthOfYear()
This returns the length of the year in days, either 365 or 366.
public YearQuarter with(java.time.temporal.TemporalAdjuster adjuster)
This returns a YearQuarter
, based on this one, with the year-quarter adjusted.
The adjustment takes place using the specified adjuster strategy object.
Read the documentation of the adjuster to understand what adjustment will be made.
A simple adjuster might simply set the one of the fields, such as the year field. A more complex adjuster might set the year-quarter to the next quarter that Halley's comet will pass the Earth.
The result of this method is obtained by invoking the
TemporalAdjuster.adjustInto(Temporal)
method on the
specified adjuster passing this
as the argument.
This instance is immutable and unaffected by this method call.
with
in interface java.time.temporal.Temporal
adjuster
- the adjuster to use, not nullYearQuarter
based on this
with the adjustment made, not nulljava.time.DateTimeException
- if the adjustment cannot be madejava.lang.ArithmeticException
- if numeric overflow occurspublic YearQuarter with(java.time.temporal.TemporalField field, long newValue)
This returns a YearQuarter
, based on this one, with the value
for the specified field changed.
This can be used to change any supported field, such as the year or quarter.
If it is not possible to set the value, because the field is not supported or for
some other reason, an exception is thrown.
If the field is a ChronoField
then the adjustment is implemented here.
The supported fields behave as follows:
QUARTER_OF_YEAR
-
Returns a YearQuarter
with the specified quarter-of-year.
The year will be unchanged.
YEAR_OF_ERA
-
Returns a YearQuarter
with the specified year-of-era
The quarter and era will be unchanged.
YEAR
-
Returns a YearQuarter
with the specified year.
The quarter will be unchanged.
ERA
-
Returns a YearQuarter
with the specified era.
The quarter and year-of-era will be unchanged.
In all cases, if the new value is outside the valid range of values for the field
then a DateTimeException
will be thrown.
All other ChronoField
instances will throw an UnsupportedTemporalTypeException
.
If the field is not a ChronoField
, then the result of this method
is obtained by invoking TemporalField.adjustInto(Temporal, long)
passing this
as the argument. In this case, the field determines
whether and how to adjust the instant.
This instance is immutable and unaffected by this method call.
with
in interface java.time.temporal.Temporal
field
- the field to set in the result, not nullnewValue
- the new value of the field in the resultYearQuarter
based on this
with the specified field set, not nulljava.time.DateTimeException
- if the field cannot be setjava.time.temporal.UnsupportedTemporalTypeException
- if the field is not supportedjava.lang.ArithmeticException
- if numeric overflow occurspublic YearQuarter withYear(int year)
YearQuarter
with the year altered.
This instance is immutable and unaffected by this method call.
year
- the year to set in the returned year-quarter, from MIN_YEAR to MAX_YEARYearQuarter
based on this year-quarter with the requested year, not nulljava.time.DateTimeException
- if the year value is invalidpublic YearQuarter withQuarter(int quarter)
YearQuarter
with the quarter-of-year altered.
This instance is immutable and unaffected by this method call.
quarter
- the quarter-of-year to set in the returned year-quarter, from 1 to 4YearQuarter
based on this year-quarter with the requested quarter, not nulljava.time.DateTimeException
- if the quarter-of-year value is invalidpublic YearQuarter plus(java.time.temporal.TemporalAmount amountToAdd)
This returns a YearQuarter
, based on this one, with the specified amount added.
The amount is typically Period
but may be any other type implementing
the TemporalAmount
interface.
The calculation is delegated to the amount object by calling
TemporalAmount.addTo(Temporal)
. The amount implementation is free
to implement the addition in any way it wishes, however it typically
calls back to plus(long, TemporalUnit)
. Consult the documentation
of the amount implementation to determine if it can be successfully added.
This instance is immutable and unaffected by this method call.
plus
in interface java.time.temporal.Temporal
amountToAdd
- the amount to add, not nullYearQuarter
based on this year-quarter with the addition made, not nulljava.time.DateTimeException
- if the addition cannot be madejava.lang.ArithmeticException
- if numeric overflow occurspublic YearQuarter plus(long amountToAdd, java.time.temporal.TemporalUnit unit)
This returns a YearQuarter
, based on this one, with the amount
in terms of the unit added. If it is not possible to add the amount, because the
unit is not supported or for some other reason, an exception is thrown.
If the field is a ChronoUnit
then the addition is implemented here.
The supported fields behave as follows:
QUARTER_YEARS
-
Returns a YearQuarter
with the specified number of quarters added.
This is equivalent to plusQuarters(long)
.
YEARS
-
Returns a YearQuarter
with the specified number of years added.
This is equivalent to plusYears(long)
.
DECADES
-
Returns a YearQuarter
with the specified number of decades added.
This is equivalent to calling plusYears(long)
with the amount
multiplied by 10.
CENTURIES
-
Returns a YearQuarter
with the specified number of centuries added.
This is equivalent to calling plusYears(long)
with the amount
multiplied by 100.
MILLENNIA
-
Returns a YearQuarter
with the specified number of millennia added.
This is equivalent to calling plusYears(long)
with the amount
multiplied by 1,000.
ERAS
-
Returns a YearQuarter
with the specified number of eras added.
Only two eras are supported so the amount must be one, zero or minus one.
If the amount is non-zero then the year is changed such that the year-of-era
is unchanged.
All other ChronoUnit
instances will throw an UnsupportedTemporalTypeException
.
If the field is not a ChronoUnit
, then the result of this method
is obtained by invoking TemporalUnit.addTo(Temporal, long)
passing this
as the argument. In this case, the unit determines
whether and how to perform the addition.
This instance is immutable and unaffected by this method call.
plus
in interface java.time.temporal.Temporal
amountToAdd
- the amount of the unit to add to the result, may be negativeunit
- the unit of the amount to add, not nullYearQuarter
based on this year-quarter with the specified amount added, not nulljava.time.DateTimeException
- if the addition cannot be madejava.time.temporal.UnsupportedTemporalTypeException
- if the unit is not supportedjava.lang.ArithmeticException
- if numeric overflow occurspublic YearQuarter plusYears(long yearsToAdd)
This instance is immutable and unaffected by this method call.
yearsToAdd
- the years to add, may be negativeYearQuarter
based on this year-quarter with the years added, not nulljava.time.DateTimeException
- if the result exceeds the supported rangepublic YearQuarter plusQuarters(long quartersToAdd)
This instance is immutable and unaffected by this method call.
quartersToAdd
- the quarters to add, may be negativeYearQuarter
based on this year-quarter with the quarters added, not nulljava.time.DateTimeException
- if the result exceeds the supported rangepublic YearQuarter minus(java.time.temporal.TemporalAmount amountToSubtract)
This returns a YearQuarter
, based on this one, with the specified amount subtracted.
The amount is typically Period
but may be any other type implementing
the TemporalAmount
interface.
The calculation is delegated to the amount object by calling
TemporalAmount.subtractFrom(Temporal)
. The amount implementation is free
to implement the subtraction in any way it wishes, however it typically
calls back to minus(long, TemporalUnit)
. Consult the documentation
of the amount implementation to determine if it can be successfully subtracted.
This instance is immutable and unaffected by this method call.
minus
in interface java.time.temporal.Temporal
amountToSubtract
- the amount to subtract, not nullYearQuarter
based on this year-quarter with the subtraction made, not nulljava.time.DateTimeException
- if the subtraction cannot be madejava.lang.ArithmeticException
- if numeric overflow occurspublic YearQuarter minus(long amountToSubtract, java.time.temporal.TemporalUnit unit)
This returns a YearQuarter
, based on this one, with the amount
in terms of the unit subtracted. If it is not possible to subtract the amount,
because the unit is not supported or for some other reason, an exception is thrown.
This method is equivalent to plus(long, TemporalUnit)
with the amount negated.
See that method for a full description of how addition, and thus subtraction, works.
This instance is immutable and unaffected by this method call.
minus
in interface java.time.temporal.Temporal
amountToSubtract
- the amount of the unit to subtract from the result, may be negativeunit
- the unit of the amount to subtract, not nullYearQuarter
based on this year-quarter with the specified amount subtracted, not nulljava.time.DateTimeException
- if the subtraction cannot be madejava.time.temporal.UnsupportedTemporalTypeException
- if the unit is not supportedjava.lang.ArithmeticException
- if numeric overflow occurspublic YearQuarter minusYears(long yearsToSubtract)
This instance is immutable and unaffected by this method call.
yearsToSubtract
- the years to subtract, may be negativeYearQuarter
based on this year-quarter with the years subtracted, not nulljava.time.DateTimeException
- if the result exceeds the supported rangepublic YearQuarter minusQuarters(long quartersToSubtract)
This instance is immutable and unaffected by this method call.
quartersToSubtract
- the quarters to subtract, may be negativeYearQuarter
based on this year-quarter with the quarters subtracted, not nulljava.time.DateTimeException
- if the result exceeds the supported rangepublic <R> R query(java.time.temporal.TemporalQuery<R> query)
This queries this year-quarter using the specified query strategy object.
The TemporalQuery
object defines the logic to be used to
obtain the result. Read the documentation of the query to understand
what the result of this method will be.
The result of this method is obtained by invoking the
TemporalQuery.queryFrom(TemporalAccessor)
method on the
specified query passing this
as the argument.
query
in interface java.time.temporal.TemporalAccessor
R
- the type of the resultquery
- the query to invoke, not nulljava.time.DateTimeException
- if unable to query (defined by the query)java.lang.ArithmeticException
- if numeric overflow occurs (defined by the query)public java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal temporal)
This returns a temporal object of the same observable type as the input with the year and quarter changed to be the same as this.
The adjustment is equivalent to using Temporal.plus(long, TemporalUnit)
passing the number of quarters to adjust by.
If the specified temporal object does not use the ISO calendar system then
a DateTimeException
is thrown.
In most cases, it is clearer to reverse the calling pattern by using
Temporal.with(TemporalAdjuster)
:
// these two lines are equivalent, but the second approach is recommended temporal = thisYearQuarter.adjustInto(temporal); temporal = temporal.with(thisYearQuarter);
This instance is immutable and unaffected by this method call.
adjustInto
in interface java.time.temporal.TemporalAdjuster
temporal
- the target object to be adjusted, not nulljava.time.DateTimeException
- if unable to make the adjustmentjava.lang.ArithmeticException
- if numeric overflow occurspublic long until(java.time.temporal.Temporal endExclusive, java.time.temporal.TemporalUnit unit)
This calculates the amount of time between two YearQuarter
objects in terms of a single TemporalUnit
.
The start and end points are this
and the specified year-quarter.
The result will be negative if the end is before the start.
The Temporal
passed to this method is converted to a
YearQuarter
using from(TemporalAccessor)
.
For example, the period in years between two year-quarters can be calculated
using startYearQuarter.until(endYearQuarter, YEARS)
.
The calculation returns a whole number, representing the number of complete units between the two year-quarters. For example, the period in decades between 2012-Q3 and 2032-Q2 will only be one decade as it is one quarter short of two decades.
There are two equivalent ways of using this method.
The first is to invoke this method.
The second is to use TemporalUnit.between(Temporal, Temporal)
:
// these two lines are equivalent amount = start.until(end, QUARTER_YEARS); amount = QUARTER_YEARS.between(start, end);The choice should be made based on which makes the code more readable.
The calculation is implemented in this method for ChronoUnit
.
The units QUARTER_YEARS
, YEARS
, DECADES
,
CENTURIES
, MILLENNIA
and ERAS
are supported.
Other ChronoUnit
values will throw an exception.
If the unit is not a ChronoUnit
, then the result of this method
is obtained by invoking TemporalUnit.between(Temporal, Temporal)
passing this
as the first argument and the converted input temporal
as the second argument.
This instance is immutable and unaffected by this method call.
until
in interface java.time.temporal.Temporal
endExclusive
- the end date, exclusive, which is converted to a YearQuarter
, not nullunit
- the unit to measure the amount in, not nulljava.time.DateTimeException
- if the amount cannot be calculated, or the end
temporal cannot be converted to a YearQuarter
java.time.temporal.UnsupportedTemporalTypeException
- if the unit is not supportedjava.lang.ArithmeticException
- if numeric overflow occurspublic java.lang.String format(java.time.format.DateTimeFormatter formatter)
This year-quarter will be passed to the formatter to produce a string.
formatter
- the formatter to use, not nulljava.time.DateTimeException
- if an error occurs during printingpublic java.time.LocalDate atDay(int dayOfQuarter)
LocalDate
.
This returns a LocalDate
formed from this year-quarter and the specified day-of-quarter.
The day-of-quarter value must be valid for the year-quarter.
This method can be used as part of a chain to produce a date:
LocalDate date = yearQuarter.atDay(day);
dayOfQuarter
- the day-of-quarter to use, from 1 to 92java.time.DateTimeException
- if the day is invalid for the year-quarterisValidDay(int)
public java.time.LocalDate atEndOfQuarter()
LocalDate
at the end of the quarter.
This returns a LocalDate
based on this year-quarter.
The day-of-quarter is set to the last valid day of the quarter, taking
into account leap years.
This method can be used as part of a chain to produce a date:
LocalDate date = year.atQuarter(quarter).atEndOfQuarter();
public int compareTo(YearQuarter other)
The comparison is based first on the value of the year, then on the value of the quarter.
It is "consistent with equals", as defined by Comparable
.
compareTo
in interface java.lang.Comparable<YearQuarter>
other
- the other year-quarter to compare to, not nullpublic boolean isAfter(YearQuarter other)
other
- the other year-quarter to compare to, not nullpublic boolean isBefore(YearQuarter other)
other
- the other year-quarter to compare to, not nullpublic boolean equals(java.lang.Object obj)
The comparison is based on the time-line position of the year-quarters.
equals
in class java.lang.Object
obj
- the object to check, null returns falsepublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
String
, such as 2007-Q2
.
The output will be in the format uuuu-'Q'Q
:
toString
in class java.lang.Object
Copyright © 2010–2018 ThreeTen.org. All rights reserved.


30 October 2003
Disease Outbreak Reported
From 1 June to 28 October 2003, 1 723 laboratory confirmed cases of dengue fever have been reported in Delhi and surrounding areas. Four deaths among laboratory confirmed cases have been reported on 28 October. Additional information is being sought on possible cases of dengue haemorrhagic fever. Circulating dengue virus serotypes DEN-3 and 2 have been reported to be associated with this outbreak.
WHO is working with the Ministry of Health, India to strengthen prevention and control activities.


We are a conglomerate of two laboratories at the Robarts Reasearch Institute, Western University, Canada. We brought the technical strengths of both of our groups to allow for the creation of this database.
Below are listed the PIs, and members categorized by roles.
test |


Utils for Log4-serie
About
Some utilities for Log4-serie data-loggers by
Tektyte.
These have been created by a user of Log4-serie
and are not affiliated with Tektyte in any way.
Utilities
- Log Filter
- filter and format Log4-serie CSV logs
ALPHA VERSION
- can be buggy and features might change without notice
Requirements
I mainly test these with Firefox in Linux,
however these should work with any recent web browser.
(If not, bug reports are welcome.)
Using locally
To use these locally,
just download or clone the GitHub repository
and open the files in web browser.
I am creating everything manually for now,
instead of using any code-generators,
so everything will work directly.
Source
Contributing
Bug reports and feature requests can be added to
GitHub issue tracker
or sent to me via email.
Any other feedback is also welcome via email.
Contact
Email: "Markus Laire" <malaire@gmail.com>


Akonadi is an extensible cross-desktop storage service for PIM data and metadata providing concurrent read, write, and query access. It provides unique desktop-wide object identification and retrieval.
This package is known to build and work properly using an LFS-7.6 platform.
Download (HTTP): http://download.kde.org/stable/akonadi/src/akonadi-1.13.0.tar.bz2
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/akonadi/src/akonadi-1.13.0.tar.bz2
Download MD5 sum: 84eb2e471bd6bdfe54a2a2f1d858c07d
Download size: 287 KB
Estimated disk space required: 82 MB
Estimated build time: 1.9 SBU
shared-mime-info-1.3, Boost-1.56.0, and one of: SQLite-3.8.6, MariaDB-10.0.13, MySQL, or PostgreSQL-9.3.5
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/akonadi
Install Akonadi by running the following commands:
mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=$KDE_PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DINSTALL_QSQLITE_IN_QT_PREFIX=TRUE \ -Wno-dev .. && make
To test the results, issue make test.
Now, as the root
user:
make install
-DCMAKE_BUILD_TYPE=Release
: This switch
is used to apply a higher level of compiler optimizations.
-DINSTALL_QSQLITE_IN_QT_PREFIX=TRUE
:
This switch ensures that Akonadi
SQLite extension is installed into the Qt plugins directory.
Last updated on 2014-09-17 11:48:47 -0700


For those who are entering the country for an extended time, getting the right information can be a challenge. Wading through the long PDFs and forms on the United States' immigration website to understand what is needed as part of the entry process is difficult, because many lack the ability or confidence in their English skills to complete them. Once the person has arrived in the States things get no better, as they are greeted with a different culture and lack the tools to find information they ought to know. It is worse for families entering the country, as their needs are many, ranging from finding a new doctor to a new school for their children.
Our goal is to alleviate many of the difficulties in finding information for immigrants or those entering the country for an extended period of time. This will have benefits for a number of people, by directly helping those who seek to enter the United States for an extended period of time, their family and friends, and by indirectly helping businesses that hire immigrants.
Most people would rather not have to interact with these services at all. Almost every person we interviewed said they had a negative time getting an American ID at the Department of Motor Vehicles or struggled with the forms required to get a visa. In addition, the one person who didn't struggle with problems involving government information avoided it entirely by relying on his wife to deal with them.
And yet, there are some problems involving government information that cannot be avoided for an immigrant. Thus, our solution should try as much as possible to reduce the interactions or headaches involved with trying to interact with government resources and services. In addition, because many immigrants struggle with English, our solution needs to reduce friction as much as possible for non-English speakers using it.
With a successful solution, an individual should walk away with a renewed appreciation in the functions of government and its ability to get get things done. In the future, our solution should become the first stop to for information or completing tasks involving the government.
Story grounding approach with evidence
Emily is excited and nervous about graduating college and going to work at Ernst & Young. As an international student, she remembers that she needs to apply for a social security number. Upon initial searching online, she is confronted with a slew of information and forms she needs to fill out and submit. As with the visa process, the multiple forms and timeline are somewhat confusing to Emily. She brings her completed forms and necessary documents to a nearby Social Security office, but is unsure that she filled out everything correctly. No one that she knows well has gone through this process previously, as many of her friends are US citizens. After a week, Emily still has not heard back from the Social Security office, and she begins to stress about whether she had forgotten part of the process or incorrectly filled out one of the forms. The next day, she receives an email from the Social Security office, telling her that her information is done processing and she can pick up her social security card at the front desk. Feeling extremely relieved that nothing went wrong, Emily is glad she does not have to go through the process again.


---
layout: page
title:
subtitle:
avatar="/img/hh.jpg"
show-avator=true
#use-site-title: true
---
I will start a lab houlab.org in July 2022 as an Assistant Professor in Neuroscience at Cold Spring Harbor Laboratory. We are actively recuiting Research Technicians, Students, and Postdocs. If you are interested in working with us, please contact me directly via hou [at] cshl.edu with your CV/resume, cover letter, and contact information for three references.
I am currently a visiting research scientist in neuromotor interfaces at the CTRL team at Reality Labs. I was a postdoc research scientist and Helen Hay Whitney Fellow at the Zuckerman Mind Brain Behavior Institute at Columbia University, working with Nate Sawtell and Larry Abbott. Previously, I obtained my B.Sc. in Physics and Biology from MIT, was a grad student with Bernardo Sabatini at Harvard University, and a Grass Fellow at Marine Biological Laboratory.
Selected Publications and Presentations
-
Neural mechanism for predicting the auditory consequences of behavior.
Hou, X.H., Taskin, N., Yu, C., Genecin, M., Kymissis, I., Abbott, L.F., Sawtell N.B.
Computational and Systems Neuroscience (Cosyne) (2021).
-
Central Control Circuit for Context-dependent Micturition.
Hou, X.H., Hyun, M., Taranda, J., Huang, K.W., Todd, E., Feng, D., Atwater, E., Croney, D., Zeidel, M.L., Osten, P., Sabatini B.L.
Cell 167, 73-86 (2016).
-
Promiscuous binding of extracellular peptides to cell surface class I MHC protein.
Eisen, H.N., Hou, X.H., Shen, C., Wang, K., Tanguturi, V.K., Smith, C., Kozyrytska, K., Nambiar, L., McKinley, C.A., Chen, J., Cohen, R.J.
Proc Natl Acad Sci USA 109, 4580-4585 (2012)
-
Central Network Dynamics Regulating Visceral and Humoral Functions.
Valentino, R.J., Guyenet, P., Hou, X.H., Herman, M.
J Neurosci 37, 10848–10854 (2017)
Talks
- Gordon Research Conference Cerebellum, Les Diablerets, Switzerland, July 2019
- Neurolunch, Dept. of Biology, Columbia University, May 2019
- Biology Seminar Series, Dept. of Biology, Bowdoin College, April 2018
- Society for Neuroscience Meeting, Symposium on Visceral Functions, Washington DC, November 2017
- Society of Urodynamics Meeting, Scottsdale AZ, February 2017
- Harvard Medical School Dept. of Neurobiology 50th Anniversary Symposium, October 2016
- Champalimaud Neuroscience Symposium, Lisbon, Portugal May 2015
Teaching
- Computational Neuroscience, Summer 2020 (Neuromatch Academy)
- CS 181: Machine Learning, Spring 2015 (Harvard College)
- BIOS E-50: Introduction to Neurobiology, Fall 2014 (Harvard Extension School)
- NB 101hfg: Advanced Undergraduate Seminar Synapse: Molecules, Networks, and Behavior, Fall & Spring 2013-2014 (Harvard College)
- Computer science instructor, Middle East Education through Technology, Summer 2007 (MIT CSAIL and Hebrew University)
Technical workshops


A mobile App intend to help students to have a better academic life
Our intention is to help students to get a better understanding about their courses when it comes to course selection..
aaaaaaadsfhksdfhkahfhadfdjndjdhfyou are a silly BBBBBB
Feel free to visit us on our Facebook page and twitter


| GTK+ 3 Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Style Properties |
#include <gtk/gtk.h> struct GtkScrollbar; GtkWidget * gtk_scrollbar_new (GtkOrientation orientation
,GtkAdjustment *adjustment
);
GObject +----GInitiallyUnowned +----GtkWidget +----GtkRange +----GtkScrollbar +----GtkHScrollbar +----GtkVScrollbar
"fixed-slider-length" gboolean : Read "has-backward-stepper" gboolean : Read "has-forward-stepper" gboolean : Read "has-secondary-backward-stepper" gboolean : Read "has-secondary-forward-stepper" gboolean : Read "min-slider-length" gint : Read
The GtkScrollbar widget is a horizontal or vertical scrollbar, depending on the value of the "orientation" property.
The position of the thumb in a scrollbar is controlled by the scroll adjustments. See GtkAdjustment for the fields in an adjustment - for GtkScrollbar, the "value" field represents the position of the scrollbar, which must be between the "lower" field and "upper" - "page-size". The "page-size" field represents the size of the visible scrollable area. The "step-increment" and "page-increment" fields are properties when the user asks to step down (using the small stepper arrows) or page down (using for example the PageDown key).
GtkWidget * gtk_scrollbar_new (GtkOrientation orientation
,GtkAdjustment *adjustment
);
Creates a new scrollbar with the given orientation.
|
the scrollbar's orientation. |
|
the GtkAdjustment to use, or NULL to create a new adjustment. [allow-none]
|
Returns : |
the new GtkScrollbar. |
Since 3.0
"fixed-slider-length"
style property "fixed-slider-length" gboolean : Read
Don't change slider size, just lock it to the minimum length.
Default value: FALSE
"has-backward-stepper"
style property "has-backward-stepper" gboolean : Read
Display the standard backward arrow button.
Default value: TRUE
"has-forward-stepper"
style property "has-forward-stepper" gboolean : Read
Display the standard forward arrow button.
Default value: TRUE
"has-secondary-backward-stepper"
style property "has-secondary-backward-stepper" gboolean : Read
Display a second backward arrow button on the opposite end of the scrollbar.
Default value: FALSE
"has-secondary-forward-stepper"
style property "has-secondary-forward-stepper" gboolean : Read
Display a second forward arrow button on the opposite end of the scrollbar.
Default value: FALSE


--- layout: post title: IA considerations tags: [] status: draft type: post published: false meta: {} ---
Though I know that it's strictly got nothing to do with HTML and scripting I guess that the process that IA provides helps determine the site and the interface. Which is the usually implemented in HTML. IN the following is collection of resources and considerations that should form the premise of any project.


Thanks to PetaPixel for this blogging about this incredible footage of a manta ray swooping in and stealing a photographers camera gear, and returning it.
I know that if a manta ray stole my gear like this I'd be really upset. Its a lot of gear to lose. I know I'd be happy to get it back, and I reckon I'd be even happier that the video recording was running.