|
QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.30
|
Random seed generator. More...
#include <ql/math/randomnumbers/seedgenerator.hpp>
Public Member Functions | |
| unsigned long | get () |
| Public Member Functions inherited from Singleton< SeedGenerator > | |
| Singleton (const Singleton &)=delete | |
| Singleton (Singleton &&)=delete | |
| Singleton & | operator= (const Singleton &)=delete |
| Singleton & | operator= (Singleton &&)=delete |
| ~Singleton ()=default | |
Private Member Functions | |
| SeedGenerator () | |
| void | initialize () |
Private Attributes | |
| MersenneTwisterUniformRng | rng_ |
Friends | |
| class | Singleton< SeedGenerator > |
Additional Inherited Members | |
| Static Public Member Functions inherited from Singleton< SeedGenerator > | |
| static SeedGenerator & | instance () |
| access to the unique instance More... | |
| Protected Member Functions inherited from Singleton< SeedGenerator > | |
| Singleton ()=default | |
Random seed generator.
Random number generator used for automatic generation of initialization seeds.
Definition at line 38 of file seedgenerator.hpp.
|
private |
| unsigned long get | ( | ) |
Definition at line 59 of file seedgenerator.cpp.
|
private |
Definition at line 33 of file seedgenerator.cpp.
|
friend |
Definition at line 1 of file seedgenerator.hpp.
|
private |
Definition at line 45 of file seedgenerator.hpp.


{% extends "layout.html" %} {% block content %}
Welcome to your first Bramble MVC site. This one contains an example paginated blogging and a picture of the eponymous cat 'Bramble'.


--- layout: post title: Xamarin.Forms: StackLayout vs Grid date: 2019-09-16 15:00:00 keywords: dotnet xamarin teaser: An example from Xamarin.Forms of how choosing the path that is the most convenient for the developer can end up making things worse for the user. ---
When using Xamarin.Forms, it's pretty easy to get
addicted to StackLayout
. And why not? It's very convenient for the developer.
Just toss in some child views, and they will get positioned
nicely in a line.
<StackLayout Orientation="Vertical"> <Label Text="One"/> <Label Text="Two"/> <Label Text="Three"/> <Label Text="Four"/> <Label Text="Five"/> </StackLayout>
In contrast, the Grid
layout is relatively tedious, since we have to
specify row and column definitions and then set the Row
and Column
attributes on each child view.
<Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Label Grid.Row="0" Grid.Column="0" Text="One" /> <Label Grid.Row="1" Grid.Column="0" Text="Two" /> <Label Grid.Row="2" Grid.Column="0" Text="Three" /> <Label Grid.Row="3" Grid.Column="0" Text="Four" /> <Label Grid.Row="4" Grid.Column="0" Text="Five" /> </Grid>
However, the developer convenience of StackLayout
comes with a
tradeoff.
This is a case where knowing how Xamarin.Forms works
"under the hood" can help us write better apps.
A Xamarin.Forms Layout
is responsible for setting
the size and position of all its child views. The issue
in play for this blog entry is the question of whether
the child view is participating in the decision.
In every case, the decision ends with the Layout
telling the child,
"Here is the box you have to live in. Deal with it."
In some cases, that edict is all that happens.
But in other cases, the Layout
first asks the child,
"What size do you want to be?", and then it uses that information
to make a final decision.
In terms of performance, this "measurement" step can be expensive. It is worth avoiding when it is not needed.
So how do we do that? In other words, in the text above, when I said "in some cases" and "in other cases", exactly which cases are which?
Here's a mostly-correct answer:
With a Grid
, measurement only happens when GridLength
uses GridUnitType.Auto
.
With a StackLayout
, measurement always happens.
And this is why my fondness for StackLayout
is fading fast.
It's a convenient abstraction, but it always
measures its child views, whether that measurement is necessary or not.
On the other hand, if I do the extra (read: "tedious") work involved in using a Grid
, and
if I take the time to define the rows and
columns such that Auto
is not needed, I can eliminate the
measurement and get a better performing UI.
Suppose I want a horizontal
layout which has a label filling the space between two buttons.
With a StackLayout
, the corresponding XAML might look like this:
<StackLayout Orientation="Horizontal"> <Button Text="One" /> <Label Text="Hello" HorizontalOptions="FillAndExpand" HorizontalTextAlignment="Center" /> <Button Text="Two" /> </StackLayout>
The equivalent Grid
is:
<Grid> <Grid.RowDefinitions> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Button Grid.Row="0" Grid.Column="0" Text="One" /> <Label Grid.Row="0" Grid.Column="1" Text="Hello" HorizontalTextAlignment="Center" /> <Button Grid.Row="0" Grid.Column="2" Text="Two" /> </Grid>
The Grid
certainly does involve more clutter. However, now I can tweak the column definitions to get rid of Auto
. For example, if I give the buttons absolute widths, they don't need to be measured during layout anymore:
<Grid.ColumnDefinitions> <ColumnDefinition Width="80"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="80"/> </Grid.ColumnDefinitions>
As I said, StackLayout
is more convenient. There may be cases where it is a bit tricky to express a desired layout with row and column definitions. Don't give up too easily. The layout capabilities of Grid
are very powerful.
Remember earlier when I tagged an answer as "mostly-correct"? Well, it would have been a bit more correct if I had taken the time to explain the following exception to the rule:
Measurement can still happen without GridUnitType.Auto
if you use
HorizontalOptions
or VerticalOptions
with a LayoutOptions
that has alignment set to anything but Fill
.
(The previous paragraph was a mouthful, which is why I didn't want to inline that explanation into the section above.)
It remains true that as long as GridUnitType.Auto
is nowhere in sight, measurement is not
used to determine the row and column sizes for the grid.
The grid calculates the proper sizes for all its rows and
columns without asking for advice from the child views.
And then, as always, it tells each child view, "Here is the box you have to live in. Deal with it."
But then, when it comes time to "Deal with it", depending on the LayoutOptions
,
measurement may be needed to determine
how the child view is placed into that box:
If the alignment is Fill
, the child view
is given the same size as the grid cell into which it is being placed,
so we don't need measurement. (Yay!)
But if the alignment is Start
, Center
, or End
,
then that child view will instead be allowed to determine its own size and position within the box,
which means we are back to needing measurement.
For example, suppose a grid cell is determined to have a width of 100, and a label therein would say (if asked) that it wants to have a width of 80.
If that label has a horizontal alignment of Fill
, it
will not be measured, and it will get a width of 100.
But if the alignment is Start
, then measurement will happen,
and it will get its requested width of 80,
and it will be placed at the left (Start
)
edge of the grid cell, and there will be 20
units of unused space to its right.
Alignments of Center
and End
are handled similarly.
To be fair, in terms of performance, this particular measurement scenario is not as bad as the cases mentioned above.
When measurement happens because of GridUnitType.Auto
,
it can affect the height or width of
all the child views in that row or column, and the grid layout code has to sort all that out.
Even worse, if measurement happens in a child view and the Layout
itself is also being measured (because it is nested), then the effects can bubble all the way to to the top of the layout hierarchy.
But when measurement happens because of LayoutOptions
alignment for a child of a Grid
,
it only matters to that one child view, so its effects are more isolated.
A thorough discussion of Xamarin.Forms layout would be lengthy, and I'm trying to keep this blog post fairly focused. I have intentionally omitted some things.
There are places in my explanations above where I speak of a grid cell in the singular when in fact it could be a span.
Also, I didn't bother discussing the case where the measured size of a child view is larger than the size of grid cell provided by the grid.
And I didn't talk about how WidthRequest
and HeightRequest
are
used with measurement.
Finally, I completely ignored the issue of margins and how they affect the way the child view is placed during "Deal with it".
If you want to avoid measurement in your UI:
Use Grid
instead of StackLayout
Don't use GridUnitType
.Auto
Don't use HorizontalOptions
or VerticalOptions
When you ask a child view to measure itself, the work to be done depends on what kind of child view it is.
If it's a label, then something has to figure out the width and height of its text. That involves font metrics, which probably has to happen in platform-specific code.
If that child view is an image, then something has to figure out its width and height. That involves reading (at least part of) the image file and decoding it. And if the image file is actually coming from, say, an HTTP access, now we have a network delay. And as always, make sure that website is using TLS. So, now your simple need for a width involves file I/O, network latency, data compression, and cryptography.
And what if the child view is itself a Layout
? Well, that
Layout
probably can't measure itself without asking its child views
for measurements, after which it'll have some arithmetic to do.
Now we've got recursion.
So if you're trying to get the slowest possible UI with Xamarin.Forms, follow these guidelines:
Nest a StackLayout
inside another StackLayout
, at least three or four deep.
Throughout that layout hierarchy, put in some labels. And use text wrapping, to make the measurement harder.
And add some images. Even better if they have to be loaded from a website. On a different continent.
Set up some background timers to change the text on those labels every few seconds, so the layout cycle will need to be rerun regularly.
That should be fairly effective way to drain a mobile phone battery for no actual benefit.
It is worth mentioning that having a child view provide information about its desired size is a feature that has legitimate use cases.
First of all, I acknowledge that there could be situations where the "performance vs developer convenience" tradeoff is worth it.
A better example is the issue of localization. The length of text (on, say, a label) can change a great deal depending on which natural language is being used. It is very common to create a piece of UI sized for a string in English and then discover that the text no longer fits after translation to another language. Allowing the label to request a size is a natural way to deal with that problem.
I am not saying you should never use Xamarin.Forms in ways
that need child view measurement.
If you actually need StackLayout
or GridUnitType.Auto
, go ahead
and use them.
Rather, I am recommending awareness of the tradeoffs:
Consider the performance benefits of avoiding child view measurement wherever possible.
Be aware that using StackLayout
, although convenient, means you
are using child view measurement all the time.
For further reading on Xamarin.Forms performance, I suggest:
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/deploy-test/performance


Windows
Open project | properties in Microsoft Visual
Studio.
- C/C++ | Code Generation | Enable C++
Exceptions, should be Yes.
- C/C++ | Code Generation | Runtime
Library, should be set to Multithreaded DLL or
Debug Multithreaded DLL.
- C/C++ | General | Additional Include
Directories add the root quickfix directory.
- Linker | Input | Additional
Dependencies, must contain quickfix.lib and
ws2_32.lib.
- Linker | General | Additional Library
Directories, add the quickfix/lib directory.
Linux/Solaris
- Exceptions must be enabled with -fexceptions
- The -finline-functions optimization is
recommended.
- Quickfix library must be linked in with
-lquickfix
- Quickfix makes use of pthreads and libxml. These must be
linked in with -lpthread, -lxml2 and
-lz
- On Solaris you must link with -lnsl and
-lsocket
- GNU ld is a one-pass linker. Put more generally
useful libraries (libsocket) last on the command line.


Video made to fit!
There is no one-size-fit-all video solution. Every business video must be made carefully to deliver your message perfectly.
Be it explainer video, motion graphics spot, corporate presentation or even a TV commercial, we never compromise on quality as we don’t just aim to do one project, but to start long term relationships.
Everything produced in our animation company is bespoke and carefully crafted from scratch by an award-winning team of designers & animators.
Salt Lending
We got the great opportunity to work with the good folks at Salt Lending for the production of a motion graphics video to educate and entertain viewers on why they should choose their crypto-backed lending technology.
Pubquiz
Pubquiz is the gaming app for die-hard football fans to test their knowledge and win epic prices. Pubquiz is free to play. You just need to connect to the Internet and answer questions in real time.
Tickera
This 3D animation featuring cool characters with vibrant burst of colors was created for Tickera, an event ticketing system built specifically for WordPress websites. Tickera is an all-in-one solution, presented as a Swiss Army knife in the animation.
AirSwap
AirSwap team had very clear idea on what they wanted. A video style that suits the concept of blockchain and cryptocurrency to explain about their revolutionary token economy. “Everyone loves the video”, as quoted by Don Mosites, one of the founders of AirSwap.
Stanley
STANLEY Engineered Fastening is a STANLEY Black & Decker Inc. Company, with presence in a number of locations worldwide. For more than 40 years, Stanley Engineered Fastening has been revolutionizing fastening and assembly technologies. We helped them tell their story.
MegaGrass
In line with the revamp of its website, MegaGrass wanted to create a series of explainer videos to talk about how to measure lawns, why should people opt for artificial grass, the installation process and so on. We were thrilled to work closely with the MegaGrass team in developing fun 3D animations.
Global Industrial
Global Industrial helps businesses save on their equipment and industrial supplies. They make it extremely easy for businesses of any size to shop online using devices of their choice.
Ginad
This motion graphics based animation explains what Global International Network About Drugs (GINAD) is and how their scientific and research reference helps the world in the field of narcotic and hallucinogenic drugs and the methods of their control at various levels.
Workflow Story
The word “Workflow” sounds like routine, and routine spells boring. So we decided to spice things up a little. In this isometric 3D animation we explain how your video is made and what to expect from the process.
Any Time Zone
We work with companies from all over the world so we understand the importance of being handy whenever you need us.
We’re available around the clock to attend to your needs, any time of day.  No problem, videos can be produced in whatever language you require.
Our services also expand to script translation, voice-over recordings and subtitling. Some of the languages we’ve worked with include Spanish, Italian, German, Mandarin, Danish, French, Japanese, Malaysian, Thai, Arabic and many more.
Win The Game
In it to win it? Our aim is to work together with you to make sure that your business stands out from the competition.
It starts with a research about you and your competition. We consult with you to pick the best video style that grabs your audience attention & converts.
A quality video can go a long way in a short period of time.
Customer Rocks
Making you feel valued and looked after is a priority, hence customer service is the core of our business.
You’ll be involved at every stage of your project’s journey. Our commitment to customer care and investment in long-term relationships is what keeps clients coming back for more!
Clients
You might ask...
Why should I choose your team?
How long does it take to deliver an explanatory video?
What type of video style suits my business?
What are the usual payment terms?
Can you speed up the video production process?
What is your animated video production process like?
Why custom videos are expensive?


Database {{database.name}} disk was resized
{% if is_last_auto_resize_offering %}
This is the final disk auto resize. You must contact your DBA.
{% endif %}
The Database {{database.name}} in {{database.environment}} environment was almost full ({{usage_percentage}}% in use).
It was automatically resized from {{database.databaseinfra.disk_offering}} to {{new_disk_offering}}.
{% if database.team.email %}
You are receiving this email because in our records you are in team {{ database.team.name }}.
If this is not right, contact the DBaaS system administrators.
{% else %}
Team {{ database.team.name }} has no email set!
{% endif %}
Regards,
DBaaS notification robot
{{domain}}


JAL to move some international routes from Narita to Haneda, add China flights
by Jackie ChenJapan Airlines (JAL) has announced that it will transfer some international routes from Tokyo’s Narita Airport to Haneda Airport in 2020, and also add two new routes from Haneda Airport to China in response to the allocation of new daytime slots at the airport.
Starting March 29 next year, the Japanese national carrier will transfer routes to the US, Finland, Russia, Australia, India and China from Narita Airport to Haneda Airport.
As a result of the changes, the carrier will operate a total of 34 international routes at Haneda Airport next year.
Continental United States
JAL will move its Chicago, Dallas-Fort Worth and Los Angeles services from Narita Airport to Haneda Airport beginning March 29, 2020:
| Flight No. | From | To | Departs | Arrives | Aircraft |
| JL10 | Tokyo Haneda (HND) | Chicago (ORD) | 1145 | 0930 | Four-class Boeing 777-300ER |
|---|---|---|---|---|---|
| JL9 | Chicago (ORD) | Tokyo Haneda (HND) | 1225 | 1535 (+1) | |
| JL12 | Tokyo Haneda (HND) | Dallas-Fort Worth (DFW) | 1055 | 0825 | Three-class Boeing 787-9 |
| JL11 | Dallas-Fort Worth (DFW) | Tokyo Haneda (HND) | 1055 | 1420 (+1) | |
| JL16 | Tokyo Haneda (HND) | Los Angeles (LAX) | 1700 | 1050 | Four-class Boeing 777-300ER |
| JL15 | Los Angeles (LAX) | Tokyo Haneda (HND) | 1345 | 1720 (+1) |
It will also transfer its New York service to Haneda Airport from March 29, 2020:
| Flight No. | From | To | Departs | Arrives | Aircraft |
| JL4 | Tokyo Haneda (HND) | New York (JFK) | 1830 | 1825 | Three-class Boeing 787-9 |
|---|---|---|---|---|---|
| JL3 | New York (JFK) | Tokyo Haneda (HND) | 0130 | 0445 (+1) |
As a result, inbound flights departing on March 28 next year, including JL9 from Chicago, JL11 from Dallas-Fort Worth and JL3 from New York will arrive at Haneda Airport. Also, with the launch of the new services, the current Narita-Dallas Fort Worth and Narita-New York JFK services will be suspended.
The Japanese carrier said it will also launch a new evening flight from Narita Airport to Chicago “to strengthen its international network with Pacific Joint Business Partner American Airlines” from February 15, 2021:
| Flight No. | From | To | Departs | Arrives | Aircraft |
| JL56 | Tokyo Narita (NRT) | Chicago (ORD) | 1800 | 1450 | Four-class Boeing 777-300ER |
|---|---|---|---|---|---|
| JL55 | Chicago (ORD) | Tokyo Narita (NRT) | 1040 | 1500 (+1) |
At the same time, American Airlines will introduce a new route connecting Haneda Airport and Dallas-Fort Worth, and add a second daily service between Haneda Airport and Los Angeles on the same day.
With all these new services, both JAL and American Airlines will offer a total of 18 daily flights via Tokyo’s two airports by 2021.
Meanwhile, JAL says it will continue to operate its current Narita-Los Angeles services (JL62/JL61), though it will replace the Boeing 777-300ER aircraft currently used on the route by a two-class Boeing 787-8 Dreamliner with only business class and economy class. First class and premium economy class passengers who have already booked on those flights will be transferred to the new flights JL16 and JL15 (details shown above).
Reservations for all the new routes to the continental US will start from 2pm (Japan time) on November 26 this year.
Honolulu
Beginning March 29 next year, JAL will launch a new twice-daily service between Haneda Airport and Honolulu as well, while the two inbound flights from Honolulu will begin flying one day earlier on March 28, 2020:
| Flight No. | From | To | Departs | Arrives | Aircraft |
| JL74 | Tokyo Haneda (HND) | Honolulu (HNL) | 2100 | 0920 | Three-class Boeing 787-9 |
|---|---|---|---|---|---|
| JL73 | Honolulu (HNL) | Tokyo Haneda (HND) | 1205 | 1550 (+1) | |
| JL72 | Tokyo Haneda (HND) | Honolulu (HNL) | 2155 | 1015 | |
| JL71 | Honolulu (HNL) | Tokyo Haneda (HND) | 1545 | 1930 (+1) |
Reservations for this route will start from 2pm (Japan time) on November 20.
Currently, JAL flies four-times-daily flights between Narita Airport and Honolulu. However, two pairs of the service (JL780/JL781/JL782/JL789) will be suspended when the new Haneda-Honolulu service begins. Below is the schedule of the remaining Narita-Honolulu service from late March next year:
| Flight No. | From | To | Departs | Arrives | Aircraft |
| JL786 | Tokyo Narita (NRT) | Honolulu (HNL) | 1945 | 0805 | Boeing 767-300ER |
|---|---|---|---|---|---|
| JL785 | Honolulu (HNL) | Tokyo Narita (NRT) | 1235 | 1620 (+1) | |
| JL784 | Tokyo Narita (NRT) | Honolulu (HNL) | 2040 | 0900 | Boeing 777-200ER |
| JL783 | Honolulu (HNL) | Tokyo Narita (NRT) | 1325 | 1710 (+1) |
With its remaining twice-daily service between Narita Airport and Honolulu, JAL will then continue to offer four daily flights between Tokyo and Honolulu.
At the same time, the airline said it will continue to offer one daily flight between Narita Airport and Hawaii’s Kona International Airport.
Finland: Helsinki
JAL will also start flying to Helsinki from Haneda Airport on the same day, while the inbound flight from Helsinki will begin service a day earlier, on March 28, 2020:
| Flight No. | From | To | Departs | Arrives | Aircraft |
| JL47 | Tokyo Haneda (HND) | Helsinki (HEL) | 1050 | 1500 | Three-class Boeing 787-9 |
|---|---|---|---|---|---|
| JL48 | Helsinki (HEL) | Tokyo Haneda (HND) | 1725 | 0855 (+1) |
Reservations for this route will start from 2pm (Japan time) on December 3 this year.
With the introduction of the new Haneda-Helsinki route, the current Narita-Helsinki service (JL413/JL414) will be suspended.
At the same time, Finnair, its Joint Business Partner, will also begin to operate a new service between Haneda and Helsinki at a different schedule.
Russia: Moscow
In addition to its new Tokyo Narita-Vladivostok route scheduled to launch in late February next year, JAL will also introduce a new service connecting Haneda Airport and the Russian capital of Moscow on March 29, 2020:
| Flight No. | From | To | Departs | Arrives | Aircraft |
| JL49 | Tokyo Haneda (HND) | Moscow Sheremetyevo (SVO) | 1045 | 1455 | Two-class Boeing 787-8 |
|---|---|---|---|---|---|
| JL40 | Moscow Sheremetyevo (SVO) | Tokyo Haneda (HND) | 1635 | 0755 (+1) |
Reservations for this route will start from 2pm (Japan time), November 26.
Currently, JAL flies between Narita Airport and Moscow’s Domodedovo Airport (JL421/JL422), which, however, will be suspended after the new Haneda-Sheremetyevo service is launched.
JAL said they would also aim to strengthen the partnership with Russia’s national carrier Aeroflot.
Australia: Sydney
JAL will move its Sydney service from Narita Airport to Haneda Airport from March 29, 2020. As a result, the current Narita-Sydney (JL771/JL772) service will be suspended.
| Flight No. | From | To | Departs | Arrives | Aircraft |
| JL51 | Tokyo Haneda (HND) | Sydney (SYD) | 1920 | 0710 (+1) | Three-class Boeing 787-9 |
|---|---|---|---|---|---|
| JL52 | Sydney (SYD) | Tokyo Haneda (HND) | 0915 | 1705 |
Reservations for this route will start from 2pm (Japan time) on December 3 this year.
India: Delhi
JAL will also move its Delhi service to Haneda Airport on the same day. The airline will suspend its current Narita-Delhi (JL749/JL740) service.
| Flight No. | From | To | Departs | Arrives | Aircraft |
| JL39 | Tokyo Haneda (HND) | Delhi (DEL) | 1055 | 1700 | Three-class Boeing 787-9 |
|---|---|---|---|---|---|
| JL30 | Delhi (DEL) | Tokyo Haneda (HND) | 1930 | 0655 (+1) |
Beginning July 1 next year, the airline will use a Boeing 777-200ER aircraft on the new Haneda-Delhi route instead.
Reservations for this route will start from 2pm (Japan time), December 3 this year.
China: Shanghai and Dalian
JAL will also launch a new service between Haneda Airport and the eastern coastal Chinese city of Dalian, and add a daily flight between Haneda Airport and Shanghai Pudong.
Currently, JAL offers a daily flight between Narita Airport and Dalian. With the new Haneda-Dalian service, JAL will operate two daily flights between the two cities.
As for the Shanghai services, JAL now flies three times daily between Narita Airport and Shanghai Pudong, and already operates a daily flight between Haneda Airport and Shanghai Pudong. With the additional Haneda-Shanghai Pudong service, the Japanese carrier will fly five times between Tokyo and Shanghai next year.
The airline said the flight schedules for the new routes between Haneda Airport and Dalian, Shanghai will be announced at a later date.
JAL’s new subsidiary low-cost long-haul carrier, Zipair Tokyo, will also launch its first flights in 2020 with inaugural services from Narita Airport to Bangkok in May 2020, and to Seoul’s Incheon Airport in July 2020.
Earlier this month, JAL also announced new services from Tokyo’s Narita Airport to Bengaluru, Vladivostok, and an additional flight to San Francisco.
“The expansion of these new services at Tokyo’s metropolitan airports will provide convenient options to our business and leisure customers in Japan and throughout the world,” said Tetsuya Onuki, managing executive officer, international route marketing.
“With the upcoming 2020 Tokyo Olympics and Paralympics, we look forward to serving our valued customers through Tokyo’s Haneda and Narita airports, while providing a seamless travel experience.”


--- layout: post title: Contribution to OData.org is Available date: 2014-04-22 08:52:03.000000000 +08:00 categories: - Site announcement tags: [] status: publish type: post published: true author: Qian Li ---
In order to make OData.org a more collaborative site, we are excited to announce that you can now easily contribute to OData.org at the Contribution page. Currently there are two ways for you to contribute
Contribute to the OData Ecosystem
You can publish your OData consumers, OData providers, OData live services, OData libraries and OData vocalbularies by navigating to the Contribution page and filling in the request form. Your request will be reviewed before publish. We will notify you through email in the process.
Post Blogs on OData.org
To post blogs on OData.org, you first need to apply for a contributor account which can write and manage their own posts but cannot publish them. When you finish a blog post, please go to Contribution page to notify us for publishing it. We won’t set hard restrictions on blog posts. As long as the content is about OData and is good for the OData ecosytem, we will be very willing to publish them for you as soon as possible.
Call for action
If you have any suggestions or advice, please comment below to let us know. We are looking forward to your contribution to OData.org and thus to the OData ecosystem!


Imagine if trees gave off wifi signals. We'd be planting so many trees, and probably save the Earth too. Too bad they only produce the oxygen we breath.
Our Earth 2016
Environmental state of major countries
2016
Above is a map of the Earth as we know it. Clicking on various pins will display one of the most pressing environmental threats of that region. Many regions have similar issues, which we, as consumers, contribute to on a daily basis.
Above are images of the most common, and pressing environmental threats. Each listed nation's threat is severe and must be dealt with immediately.
Every little bit helps, every little bit hurts!
Be aware of what you're using, and how much; watch that carbon footprint!
Use less of stuff; the best way to reduce waste is to be conscious of how much you use!
Switch up your commute: try walking/biking/carpooling to work!
Use less fossil fuels; replace fossil fuel-run products with things that run on sustainable energy!
Buy local; this supports small businesses, and cut out tons of fuel used for shipments!
Remember the 3R's; Reduce, Reuse, and Recycle (in that order!)
Eat less meat; the high methane levels are attributed to cattle in farm factories!
Unplug your electronics; reduce phantom energy by shutting off at night!
Plant a garden; it doesn't get much more local than your backyard, and you're producing O2!
Spread the word; tell others about these tips, and encourage them to do their part!


System Architect Picture "Activity Under Consideration"
Parent Diagram:
Activity State
(OMT Object Model)


{{event?.name}}
{{event?.description}}
{{event?.phoneNumber}}
{{event?.address}}
{{event?.type?.type}}
{{getDate(event?.startTime)}}
{{getTime(event?.startTime, event?.endTime)}}
{{event?.participants?.length}}
Participant 1">s
Invite your friends to join!
Make more volunteers and clean up the world.


Office Space A film review by Marty Mapes Copyright 1998 Marty Mapes
**1/2 (out of 4) As uneven and unfocused as OFFICE SPACE is, it hits home with enough jokes to make it an enjoyable comedy.
You'd think a movie about life in a cubicle would necessarily resemble Dilbert. But OFFICE SPACE gives itself some distance from the outlandish comic strip by having more humanly interesting characters and being much more insightful. Instead of going for the broad, exaggerated gags (well, it goes for them too), it goes for the more mundane, subtle comedy and irony of being a Gen-X drone.
For example, Peter (Ron Livingston) begins every day with an unavoidable static electric shock as he opens the door to the Initech offices. All the professionals drive plain, silver Toyotas and live in apartments that look like they're furnished by Target. As na´ve and whitebread as they are, they still listen to gangsta rap. Their detached, monotonous, mockable boss decorates his office with "Cathy" cartoons.
Then again, some of the gags are just too obvious to be funny, like the elderly man outrunning the flow of the traffic jam, or the squeaky-pitched receptionist incessantly answering the phone across from Peter, or Michael's (David Herman) heated, personal feud with his printer.
The movie seems like a string of these skits, corralled together by their common office setting. (Jennifer Aniston is introduced as a love interest, which allows the movie to run a few gags at the "Bennigans"-style restaurant where she works.) But eventually, one idea starts to take shape as the movie's main plot: Peter stops caring about work after a hypnotherapist fails to take him out of a trance. Ironically, his new attitude boosts him up the corporate ladder, even as his hard-working friends are being laid off.
Peter has not forgotten his friends, though, and to show his solidarity with them, he helps them come up with a scheme to embezzle money from Initech.
If Mike Judge had more guts, or any respect for his "work sucks" message, his protagonists would have stuck it to the man and gotten away with it. They could have been downsized Davids putting one over on the corporate Goliath. Wouldn't that be a glorious, triumphant message in this age of corporations denigrating their employees and customers in order to worship their shareholders?
But it quickly becomes clear that our heroes are too clean and meek to make good criminals. They fit the sitcom-character mold that says they have to end the episode where they started. You can deduce, even without seeing it, that in order for our heroes to get out of the mess they made, the movie will necessarily have a contrived, DEUS EX MACHINA ending.
OFFICE SPACE has the look and feel of a low-budget student film, with cheap sets, lots of gags, and a few unknown actors. Combined with the moth-eaten, patchwork plot, a less funny movie could have been downright bad. But luckily for Judge -- and for us -- OFFICE SPACE actually is funny. Not always, but often enough.
Check out more current movie reviews at http://www.indra.com/~mmapes/
-- Marty Mapes<EMAIL_ADDRESS>Movie Habit http://www.moviehabit.com
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


Movies
Demonstrates loading a list, adding and removing items from the list, and error handling.
Title
Year
Add
{{movie.title}} ({{ movie.year }})
-


CAROL HE
NYU comp sci + bay area native
Experience
SWE Intern (Summer + Spring)
@ Justworks
Web Dev Intern
@ TEDxGramercy
Grader
for Applied Internet Tech (JavaScript) & Intro to Programming (Python)
Webmaster
for NYU Women in Computing
Infra Team
for Tech@NYU
Projects
Tabbie
, a Chrome extension to help organize tabs
ReversiChat
, a chatroom where you can play reversi
Parallel Linear Equations
, parallelizes code to solve N linear equations in a faster time.
Solitude
, an interactive web art project with interpretations of songs
Latest Hobbies
•
taking photos
with my parents' old Canon Rebel
• trying to write music with a mini keyboard and a ton of youtube tutorials
• lifting weights and eating healthy
• petting my cat until he's annoyed at me
For more about my experience, check out my
resume
!


The SSApp service worker simulates a HTTP server environment with a set of endpoints which allow a developer to interact with the PrivateSky services using the HTTP protocol. These endpoints are implemented with the help of Middleware
functions similar to the ones used by the Express Node.js framework.
The upload middleware provides an endpoint for uploading files to a brick archive. Both multipart/form-data and request body uploads are supported and multiple files can be uploaded in a single request.
POST /upload?path=/upload/directory&input=files[]&filename=my-file.name&maxSize=100M&allowedTypes=image/jpeg
<input type="file" name="images[]" />
filename | true| When uploading a file using the request body method this parameter is required. The contents of the file will be saved in the location provided by the path and filename parameters
preventOverwrite | | Set this to any non falsy value in order to prevent overwriting files with the same name. Defaults to false
maxSize | | Maximum allowed size for a single file. If this parameter is not provided, file size validation is skipped. This parameter can take a number value specifying the allowed number of bytes or a number suffixed with the size unit. Accepted unit sizes: b k m. Ex: 65536 128K 32M. The unit size is case insensitive.
allowedTypes | | A list of mime types separated by a comma. Ex: allowedTypes=application/json,image/jpeg. If this paramater is not provided, file type validation is skipped.
The response format is of type JSON and the status code will vary depending on the result of the upload process.
If the upload was successful the response will consist of an array of objects, each object containing upload information for each file in the request.
The error response payload format differs depending on the type of error. In case of runtime errors (HTTP 500) the payload will consist of a single string describing the error. For validation errors (HTTP 400) the response payload can be either an error object or an array of objects:
List of validation error codes:
Check the HTTP status code, if it's 400, expect to have an object or an array of objects detailing the error(s) that occured. Responses with status code 500 will contain only a string. See the examples below for one approach in error handling
The following examples assume that the service worker has been registered and activated in the application.
The endpoint provided by this middleware allows file downloading from a brick archive.
GET /download/path/to/file/in/brick/archive
The upload & download middlewares make use of the
The following middleware provide endpoints for communicating with different processes inside PrivateSky using VirtualMQ:
The documentation for using those endpoints can be found by accessing the


I've just got a vinyl player a couple of months ago, so picked up this hobby pretty recently. But it was something that I was planning for a long time. This is to get your hopes down in case you were expecting any pro information xD.
The turntable I use is an Audio-Techncica ATLP60X, which is reputed as a good choice for beginners.
Naturally, I've been quickly expanding my vinyl collection. You can check it out here. To get vinyls I often use Discogs, a website where members can buy and sell vinyls between each other. It has a great selection of vinyls. Check for yourself by searching for something in the form below.


Why Mars?
After the Earth, Mars is the most habitable planet in our solar system due to several reasons: Its soil contains water to extract It isn’t too cold or too hot. It has an atmosphere (albeit a thin one) that offers protection from cosmic and the Sun's radiation.


I am married to the love of my life, Katie. We liove in Overland Park, KS but I am orginally from Louisiana. I am anid fan of the LSU Tigers & New England Patriots. I really enjoy programming, solving puzzles, and gaming! Currently, I am familiar HTML & CSS.
I enjoy writing front-end code with these technologies.


web-push-encryption is a module that helps encrypt and / or send push
messages over the web push protocol.
Methods
(static) encrypt(message, subscription, paddingLength) → {Object}
Encrypts a message such that it can be sent using the Web Push protocol.
You can find out more about the various pieces:
Parameters:
| Name | Type | Description |
|---|---|---|
message |
String | Buffer | The message to be sent |
subscription |
Object | A JavaScript Object representing a
PushSubscription.
The easiest way to get this from the browser to your backend is by running
JSON.stringify(subscription) in a web pages JavaScript. |
paddingLength |
number | Number of bytes of padding to use |
- Source:
Returns:
An Object containing the encrypted payload and
the other encryption information needed to
send the message.
- Type
- Object
(static) sendWebPush(message, subscription, paddingLength) → {Promise}
Sends a message using the Web Push protocol
Parameters:
| Name | Type | Description |
|---|---|---|
message |
String | The message to send |
subscription |
Object | The subscription details for the client we are sending to |
paddingLength |
Number | The number of bytes of padding to add to the message before encrypting it. |
Returns:
A promise that resolves if the push was sent successfully
with status and body.
- Type
- Promise


pl4kotlin is a library to compose and execute simple SQL statements via JDBC. Typical usage is to map a POJO object to a single row of a table. The library goal is to reduce verbose JDBC calls to a single-liner without getting in the way of more complex processing.
CRUD operations are supported as well as wide variety of JDBC types. Transaction control is achieved by supplying Connection object to run() methods.
The library recognizes multiple ways of specifying columns, the recommended one being passing reference to the object or class property. This allows compile-time checking and IDE refactorings. Most RDBMS encourage use of bind variables to avoid expensive re-parsing of SQL statements. Statements generated by the library use bind variables and allow specifying them in custom expressions.
A specially treated Optimistic Lock column may be used to ensure consistency without holding inefficient row locks (pessimistic locking). On request, the column is added to WHERE clause to ensure data hasn't been changed by another transaction while we were processing the record. This is a recognized and efficient practice to handle concurrency.
Using default expressions and auto-generated column values is a good way to offload complexity to the RDBMS, as well as improve consistency. For example, using database-side current_timestamp or systimestamp ensures protection from potentially un-synchronized client-side clocks. fetchback() method instructs the library methods to read specified column(s) back after inserting or updating data.
In theory, the library should support any RDBMS with JDBC driver. In practice though, we never know until try. Integration tests successfully run on:
It is unlikely the library will satisfy all application needs. There is no support for joins nor parent-child relations (needless to say, N:M isn't supported too). Perhaps the most visible limitation is SelectStatement inability to fetch more than a single record. This may be lifted in the future versions when support for iterators is added.
PostgreSQL offers variety of built-in types, but only primitive data ones
are supported by the library. For example, bytea
should be used
to store UUID
s. That is because Postgres expects explicit
conversion or special type Other when binding values.
Future version of the library may support it in a generic way.
SQLite can't update column value to default, and limits timestamps precision to seconds. BigDecimal precision is 14 digits. Its supported transaction isolation levels are SERIALIZABLE and READ_UNCOMMITTED.
run method make take a Connection object. In this case it does not attempt to control the transaction. This helps grouping multiple updates into a single transaction and control commit/rollback at application level.
Entity constructor also an optional factory function, which is called by the library to obtain a connection. Such connections and transactions are controlled by the library: transaction is committed or rolled back depending on the operation outcome, and the connection is closed after the call.
The library does not keep connection or transaction state thus allowing mixing its calls with JDBC or other libraries calls.
All classes must be derived from library-provided class Entity, and have @Table annotation. Persisted members are marked with with @Column annotation. The base class and the annotations are provided by the library.
As an example, consider EMP table from Oracle's SCOTT schema:
SCOTT> DESC emp Name Null? Type -------------------------------- -------- ---------------------- EMPNO NOT NULL NUMBER(4) ENAME VARCHAR2(10 CHAR) JOB VARCHAR2(9 CHAR) MGR NUMBER(4) HIREDATE DATE SAL NUMBER(7,2) COMM NUMBER(7,2) DEPTNO NUMBER(2) SCOTT> SELECT * FROM emp ORDER BY empno; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- ----------- ---------- ---------- ---------- 7369 SMITH CLERK 7902 17-DEC-1980 800 20 7499 ALLEN SALESMAN 7698 20-FEB-1981 1600 300 30 7521 WARD SALESMAN 7698 22-FEB-1981 1250 500 30 7566 JONES MANAGER 7839 02-APR-1981 2975 20 7654 MARTIN SALESMAN 7698 28-SEP-1981 1250 1400 30 7698 BLAKE MANAGER 7839 01-MAY-1981 2850 30 7782 CLARK MANAGER 7839 09-JUN-1981 2450 10 7788 SCOTT ANALYST 7566 19-APR-1987 3000 20 7839 KING PRESIDENT 17-NOV-1981 5000 10 7844 TURNER SALESMAN 7698 08-SEP-1981 1500 0 30 7876 ADAMS CLERK 7788 23-MAY-1987 1100 20 7900 JAMES CLERK 7698 03-DEC-1981 950 30 7902 FORD ANALYST 7566 03-DEC-1981 3000 20 7934 MILLER CLERK 7782 23-JAN-1982 1300 10 14 rows selected.
Its Kotlin POJO might look like this:
@Table("emp") class Emp: Entity() { @Column("empno", pkPos = 1) var empno: Int = 0 @Column("ename") var empName: String? @Column("job") var job: String? @Column("mgr") var manager: Short? @Column("hiredate") var hireDate: Date? @Column("sal") var salary: Float? @Column("com") var commission: Float? @Column("deptno") var deptno: Short? }
We define the table name and properties, mapped to the table columns. We could have also defined other properties and methods, there is no difference from a regular class here.
There is no need to define a property for every table column. Columns not defined are just not mentioned in the generated SQL statements. Audit columns, for example, are typically populated by DEFAULT clause or set by triggers.
The annotation takes a single parameter: the database table name. The table name is used when generating SL statements.
Defines property linkage to a table column. The table column is a mandatory argument. There are other annotation attributes: to mark a column as part of the primary key, to specify its value on insert, and so on.
When speaking about properties and columns, we often use these terms interchangeably because the library enforces 1:1 mapping between properties and columns.
Defined the database table column name. The name is used in the generated SQL statements.
One of the ways to use the library is to simplify mapping REST API to database table operations. The value specifies name of the GET/POST/PUT/... parameter. It is used when parsing form values.
When omitted, the value defaults to the column name.
Used to mark the column as part of the table's Primary Key. The value is the position withing the PK. E.g. for Primary Key on columns a,b,c, the corresponding properties must have their @Column defined with pkPos 1, 2, and 3. There is no known harm in defining different order than in the PK. There is no good reason to do that either. Zero, the default, indicates a non-PK column.
The values must be sequential, starting with 1. A table-mapped class must define at least one PK column.
Marks database-side columns containing JSON values (json
type in MySQL,
is_json
constraint in Oracle, etc) and represented on the client as
String
. When the property is true
, the object type must be
String
and all interactions with the database are the same as for the
String
property type.
The setting makes asJson*() methods (used to format API responses) emit the value without enclosing it in double quotes. This makes it a proper nested object instead of a literal resulting in more meaningful JSON structure.
Denotes that the column is used for Optimistic Concurrency Control - a CAS-like technique to ensure consistency when record may be modified by multiple parties. First, the record is read from the database and modified. When UPDATE is executed, the old column value is used in the WHERE clause, and also modified by the statement to the next unique value (by incrementing it or setting to current database timestamp).
In SQL, this translates to statements like any of these:
UPDATE tbl SET c1=?, ... optLockCol=optLockCol+1 WHERE optLockCol=? AND ... -- for numeric columns UPDATE tbl SET c1=?, ... optLockCol=systimestamp WHERE optLockCol=? AND ... -- for timestamp columns UPDATE tbl SET c1=?, ... optLockCol=default WHERE optLockCol=? AND ... -- generic ("default" being an expression like the first two)
If another transaction has changed the row, its optLockCol has changed too, and our UPDATE results in no updates rows. We can check the number of affected rows returned by the library function to see of that has happened. The row must be re-read from the database.
The technique is intended for READ_COMMITTED transaction isolation level.
On update, each updated column must be specified explicitly. But inserts are different: all columns must be assigned values. But sometimes we want the values to be set by the database as defined by the DEFAULT values of the column. And for some other columns we want to generate the value on the client, but don't want to bother coding that explicitly.
onInsert attribute tells the library how column value must be treated:
| Attribute value | Action | Comments |
|---|---|---|
| OnTheDbAlways | The column is not listed in the INSERT statement, letting the database assign it the default value | The value is fetched back after insert. The column can't be a PK because it is used to fetch the row back. |
| OnTheDbWhenNull | Property value is checked prior to execution of the INSERT. If it is not null, the value is used. Otherwise, the column is omitted from the INSERT columns list letting the database to use the default. | If the value was null, it is fetched back after insert. The column can't be part of the PK. Execution may produce different statements, depending whenever the property value is null or not. |
| OnTheClientAlways | The library computes the value and assigns it to the property. Then the value is bound to the appropriate bind variable as usual. | The clause only works for UUID and Timestamp columns, setting them to random uuid or current timestamp on the client machine, |
| OneTheClientWhenNull | Same as OnTheClientAlways, but new value is only computed if the current property value is null. | See OnTheClientAlways comments. |
| Never | Property value is used | This is the default behavior |
Every statement takes an Entity object to work on. The statements use and set the object's properties as directed. The second optional argument is the Connection generator function. If Connection was not provided to run method, the function is called to obtain one. In this case the library controls the transaction.
There are multiple ways exist to specify a column, choosing between them is a matter of preference. Examples below use an excerpt from our sample POJO:
@Table("emp") class Emp: Entity() { ... @Column("sal") var salary: Float? ... } ... val empInstance = Emp() val anotherEmpInstance = Emp()
Given an object of a class, we can use reference to the object's property to specify its column:
SelectStatement(empInstance).select(empInstance::salary) ...
There are few things to note here. Rather than calling a property, we pass reference to it
with Kotlin's '::' operator. Secondly, the instance doesn't matter,
anotherEmpInstance::salary
would do as well. That is because the library uses
the passed property's name
to find the column definition. In the extreme, the
passed property doesn't even need to be of Emp
type - as long as its name matches
the desired Emp
property. Doing that would be really confusing though.
Since all the library uses is property name, we can as well pass the class instead of its particular instance:
SelectStatement(empInstance).select(Emp::salary) ...
Choosing between the class or its instance is a matter of preference and refactoring abilities of hte editor you're using. The end result is the same.
Properties are associated with columns, and we can specifying the column name directly. The column must be defined in the Entity class.
SelectStatement(empInstance).select("sal") ...
While more flexible, string literals are harder to refactor. There is no type checking wither. The method would work best when column names are generated by the code or not known in advance.
Sometimes we need more than a simple column. Where it makes sense, the library allows specifying an expression which is emitted into the generated SQL statement. Since using bind variables is a good practice, the expressions support them.
val fmt = "yyyy-mm-dd" val d1 = "2010-04-01" val d2 = "2010-04-15" SelectStatement(...).by("hiredate between to_date(?, ?) and to_date(?, ?)", d1, fmt, d2, fmt) ...
Choosing between column name and expression may get ambiguous for the compiler: both take String as the argument. Help it chose the correct method by passing parameter name:
SelectStatement(...).by(colName = "sal") SelectStatement(...).by(expr = "comm is not null")
The library automatically arranges columns into a few groups and allows to specify instead of a single column where it makes sense. This makes code more expressive, generic, and shorter. Rather than being a special magic value, the groups are lists of actual columns and can be used outside of library calls. You can also define and use your lists.
Only columns defined in the POJO are used. The library has no idea what other columns are present in the database table.
| Group | Description | Comments |
|---|---|---|
| colDefs | All defined columns | May be hidden in the future, use allCols instead |
| pkCols | Primary Key columns | Useful in DML statements. The library requires at least one PK column to be defined |
| pkAndOptLockCols | Primary Key columns and, if defined, the Optimistic Lock column | Useful in by() method of UPDATE statements |
| allCols | All defined columns | Synonym to colDefs |
| allColsButPk | All columns except the ones being part of the primary key | Useful in select() method of the SELECT statements. If data is filtered by PK, there is no need to re-select it. |
| allColsButPkAndOptLock | All columns except PK and the the Optimistic Lock column, if defined | Useful in select() method of the SELECT statements when filtering data by PK and optimistic lock. There is no need to read these columns again. |
| optLockCol | The Optimistic Lock column if it was defined, otherwise null |
InsertStatement is the simplest of all, but with a couple of peculiarities. The generated SQL is:
INSERT INTO t(c1, c2, ...) VALUES(?, ?, ...)
The list of participating columns is built as directed by the onInsert attribute of the @Column annotation.
Database-side generated values are automatically read by after INSERT by a SELECT statement running in the same transaction. That is why none of the primary key columns can be database-side generated: they are used to read the inserted record and their value must be known by the client.
Sample code:
val scott = Emp(empno=7788, ename="Scott", /* other initializations */) val count = InsertStatement(scott).run()
When ran, it reads data into the provided Entity object and returns the number of fetched records. Current library limitation is single row read. The future plans include adding Iterator support to fetch multiple rows. That would require a parameter-less constructor defined by the derived class.
Use variations of select()
methods to specify columns to be read.
The statement only fetches requested column values, the other values do not change. Column Groups selector helps specifying the desired set of columns without listing each one individually.
Sometimes we want to transform the column value on read. The library supports that by
providing select(targetProp: KProperty<Any?>, expr: String, vararg binds: Any?)
method. Instead of SELECT columnName
the generated SQL becomes SELECT expr
and the result is stored in the column, defined by targetProp
. For example:
SelectStatement(empInstance).select(Emp::hireDate, "trunc(hiredate. 'DD')").byPk().build()
generates the following SQL:
SELECT trunc(hiredate. 'DD') FROM emp WHERE empno = ?
and the result is stored in property hireDate
of empInstance
object
The by()
methods contribute to the WHERE
clause of the resulting
SQL statement. The library provides shortcuts to filter by the primary key and, optionally,
by the optimistic lock column if one is defined.
Sample code:
val martin: Emp(empno=7654) val count = SelectStatement(martin).select(martin.allColsButPk!!).byPk().run()
More than one by()
may be used, resulting in multiple condition joined by AND
.
The method inspects entity object's properties for non-null and non-empty
(defined as obj.toString().isNotBlank()
) values. Such
property columns are added to the WHERE
clause of the SELECT
statement.
byPresentValues()
method is useful when the properties are set from
external source, such as a REST call, and we want to retrieve the matching rows.
These methods comes handy when multiple records are selected with iterate
method
When these methods are used, an ORDER BY
clause is added to the SQL statement.
Any variation of Column Selectors can be used to specify
ordering. The property/column name methods take an additional parameter asc
to specify ASC
or DESC
order as defined by the SQL standard.
Example:
SelectStatement(...) ... orderBy(Emp::hireDate, false).build()
generates this ORDER BY
clause:
SELECT ... FROM emp WHERE ... ORDER BY hiredate DESC
More than one orderBy()
may be used, they are added to the ORDER BY
clause in the order specified.
Code: SelectStatement(...) ... orderBy(Emp::hireDate, false).orderBy(colName = "ename").build() SQL: SELECT ... FROM emp WHERE ... ORDER BY hiredate DESC, ename
The methods returns a Kotlin
Iterator
which can be used to traverse the ResultSet
.
The iterator is somewhat backwards and counter-intuitive. Calling hasNext()
fetches the next row from the ResultSet, and calling next()
copies current
row's data to the object's properties. Therefore, calling next()
without
calling hasNext()
first returns the same data. Also, calling hasNext()
multiple times skips rows. This behavior will likely change in the future.
Only properties mentioned in select()
method(s) are populated. A common
mistake is to select(obj.allColsButPk)
, leaving PK properties unchanged.
In general cases it is recommended to use allCols
column selector.
Each time next()
is called, a new object is created and populated with
the row data. The method is useful when operating on lists of rows.
Example:
val emp = Emp(deptno=20) val selStmt = SelectStatement(emp).select(emp.allCols).by(emp::deptno).orderBy(emp::hireDate) for(deptEmp in selStmt.iterate(conn)) { // the row data is in 'deptEmp' }
Rather than creating a new object for every row, the library reuses the object passed to the
SelectStatement
constructor. This is more efficient on the GC when iterating over
large collections, because no new object is created and destroyed after processing.
Example:
val emp = Emp(deptno=20) val selStmt = SelectStatement(emp).select(emp.allCols).by(emp::deptno).orderBy(emp::hireDate) for(unused in selStmt.iterate(conn)) { // the row data is in 'emp' }
Note that the Boolean value returned by the iterator is pretty much useless: the row data is in emp's properties.
Like SelectStatement, UpdateStatement only modifies requested columns. When ran, it returns the number of affected rows.
The modified column may be specified by instance or class property, or by column name as described in Column Selectors section. The corresponding property value is written to the database column.
UpdateStatement(empInstance).update(Emp::salary)...
generates SQL:
UPDATE emp SET sal = ? ...
Additionally, update()
method can take a SQL text expression with binds, in that case
the property value is not used (but it can be referenced in the expression via a bind variable).
UpdateStatement(empInstance).update(Emp::salary, "? * 1.1", empInstance.salary)...
emits this SQL code:
UPDATE emp SET sal = ? * 1.1 ...
and value of property empInstance.salary
is used as the bind variable value
The methods contributes to the WHERE
clause and identical to
by() methods of SelectStatement.
Hint: use byPkAndOptLock()
to employ optimistic locking strategy. For it to work,
the object instance values must be first read from the database by
SelectStatement or other method.
Often, especially when expressions were used to compute the new values, it is desirable to get these values back. Of course we could run a separate SelectStatement, but the library provides a shortcut.
The fetchBack()
family of methods specify columns to read after the update. The read is
performed in the same transaction as the UPDATE
and only if the record has been actually
updated (affected row count was greater than zero). The values are written to the corresponding property.
The methods adds the Optimistic Lock column to the update list and ensures it
is fetched back after statement is executed. The value is updated to SQL default
literal.
It is stll needed to specify byPkAndOptLock()
or otherwise include the OptLock column
to the WHERE
clause.
When the DAO has OptLock column defined, the function has no effect, i.e. it is safe to use it with and without OptLock column.
Nothing prevents us from specifying a relaxed by() expression resulting in multi-row update. This may be useful when new values are computed from the old values of the same row.
The following code may be used to raise all clerks salary by 5%:
Code: val count = UpdateStatement(Emp()).update(Emp::sal, "sal * 1.05").by(expr = "job = 'CLERK'").run() SQL: UPDATE emp SET sal = sal * 1.05 WHERE job = 'CLERK'
We are passing a dummy Emp()
object to UpdateStatement
because none of its
properties are used by the statement.
Technically we can request a fetchback with fetchBack() method(s),
but nothing good would come out of it. The library runs a SELECT
statement and fetches the
first row corresponding to the PK. If the passed object was a dummy like in our example above, it is
unlikely that any row will be returned. In any case, the result is undefined. Worse yet, the returned
affected row count is messed up.
The statement deletes row(s) from the database table. Only by()
methods are provided
to specify the SQL WHERE
condition.
Code: val count = DeleteStatement(empInstance).byPk().run() SQL: DELETE FROM emp WHERE empno = ?
Hint: use byPkAndOptLock()
to employ optimistic locking strategy. For it to work,
the object instance values must be first read from the database by
SelectStatement or other method.
Just like in updating multiple rows, we can specify
a relaxed WHERE
condition. The returned affected rows count reflects the number
of deleted rows.
Code: val count = DeleteStatement(Emp()).by("job = 'SALESMAN'").by("com = 0"b).run() SQL: DELETE FROM emp WHERE job = 'SALESMAN' AND com = 0
Every higher-level code is a generalization. While it makes certain things simpler, it also restricts or complicates other paths. This library is no exception, but an attempt was made to make it to reduce the pain. The aim was to help writing shorter code for relatively simple use cases, while allowing use of other database-related code or libraries.
Here is how we try to achieve this. The library can control transactions, but also provides way to relinquish it. It keeps no inner state except for static (almost) compile-time structures and current values of the properties. The methods help to emit trivial SQL code, but also take free-form expressions, allowing to make the SQL as complex as needed. Only standard SQL constructs are generated, simplifying support for different RDBMS flavors.
There are two major classes: the Entity
describing the DAOs, and BaseStatement
performing operations on them. There is also a thin layer supporting JDBC/Java/Kotlin type translation.
This enum
class lists the supported JDBC types and references to methods
passing them to/from the JDBC driver. Its heart is a table of type Rec
containing information about every supported type: the Java class, the setter, getter,
and parser methods, and its internal library type.
Parsers are methods to convert into their type from String. These are used when reading data passed by REST calls. Some supported types do not define parsers even while they should. They are to add to the library should such need arise.
Since Kotlin and Java primitive types differ, we provide our own type codes for supported data types. Maybe we can get away without that, time will show.
Not every JDBC type is supported by the library, some exotic types were left out not because of technical difficulties, but because of lack of desire to test them. In fact, only a subset of supported types was tested with real databases. Moreover, not all supported types even have reader or parser defined. This is mainly because of lack of demand.
It doesn't seem that Kotlin primitive types map to their Java analogs directly.
But in our code we treat Kotlin Int
same as Java Integer
.
For that reason, function k2j()
from typeMappings.kt first checks for Kotlin
types. If the type is not recognized, it calls JdbcTypeCode to attempt to handle the
type as Java's.
Database objects are described by a user-defined class, derived from Entity
. The
class defines properties corresponding to database column, and provides additional information
about them with @Column annotation. That information is used for type
translation when binding values and reading them back.
The class also defines named Column Groups.
The class defines database table columns and their mapping to class properties. It stores @Column annotation attributes, its type code, reference to the Kotlin property, etc.
The class also contains methods to read and set property from JDBC ResultSet,
parse its values from String
, bind it by calling into
JdbcTypeCode
methods, etc.
BaseStatement
class provides DML statement executor and a number of helper
functions. It is an abstract class requiring implementation of function build()
use to generate the particular SQL statement. Derived classes Select/Insert/Update/DeleteStatement
override the function.
These derived classes also define functions to list columns/expressions to be used in select, set, where, order by etc portions of their SQL statements. These lists are used when building the SQL.
SelectStatement
is special in the sense that it provides its own run()
method. Other classes use standard runDML()
method from VaseStatement
.
The library comes with Unit and Integration tests. Not all code paths are covered, but the goal is to cover as mach as it makes sense.
The library uses JUnit 5 and pom-located Kotlin "kotlin-test-junit" magic making things work in Maven.
The tests run against real databases with Maven FailSafe plugin. The plugin
runs at verify
stage which is invoked at mvn verify
,
mvn install
, or mvn deploy
phases. See
Maven Build Lifecycle
documentation for details.
For a test to be recognized as Integration, its file name must start or end with "IT" or "ITCase".
The code comes with a few helper functions located under
src/test/kotlin/com/amcentral365/pl4kotlin/integrationTests
.
The functions are defined in files Sql.kt
and Script.kt
.
There are functions to parse configuration file, establish connection, run
setup and teardown scripts, and more.
The directory contains README.md
file describing how to setup and run the tests
in detail.


|
XPMP2
X-Plane multiplayer library 2 - using instancing
|
Settings message, identifying a sending plugin, regularly providing its settings. More...
#include <XPMPRemote.h>
Public Member Functions | |
| RemoteMsgSettingsTy () | |
| Constructor sets most values to zero. More... | |
| Public Member Functions inherited from XPMP2::RemoteMsgBaseTy | |
| RemoteMsgBaseTy (RemoteMsgTy _ty, std::uint8_t _ver) | |
| Constructor just sets the values. More... | |
Public Attributes | |
| char | name [16] |
| plugin's name, not necessarily zero-terminated if using full 12 chars More... | |
| float | maxLabelDist |
| Maximum distance for drawing labels? [m]. More... | |
| char | defaultIcao [4] |
| Default ICAO aircraft type designator if no match can be found. More... | |
| char | carIcaoType [4] |
| Ground vehicle type identifier. More... | |
| std::uint8_t | logLvl:3 |
| logging level More... | |
| bool | bLogMdlMatch:1 |
| Debug model matching? More... | |
| bool | bObjReplDataRefs:1 |
Replace dataRefs in .obj files on load? More... | |
| bool | bObjReplTextures:1 |
Replace textures in .obj files on load if needed? More... | |
| bool | bLabelCutOffAtVisibility:1 |
| Cut off labels at XP's reported visibility mit? More... | |
| bool | bMapEnabled:1 |
| Do we feed X-Plane's maps with our aircraft positions? More... | |
| bool | bMapLabels:1 |
| Do we show labels with the aircraft icons? More... | |
| bool | bHaveTCASControl:1 |
| Do we have AI/TCAS control? More... | |
| std::uint16_t | filler |
| yet unused, fills size up for a multiple of 8 More... | |
| Public Attributes inherited from XPMP2::RemoteMsgBaseTy | |
| RemoteMsgTy | msgTy: 4 |
| message type More... | |
| std::uint8_t | msgVer: 4 |
| message version More... | |
| bool | bLocalSender: 1 |
| is the sender "local", ie. on same machine? More... | |
| std::uint8_t | filler1: 7 |
| yet unsed More... | |
| std::uint16_t | pluginId = 0 |
| lower 16 bit of the sending plugin's id More... | |
| std::uint32_t | filler2 = 0 |
Settings message, identifying a sending plugin, regularly providing its settings.
| XPMP2::RemoteMsgSettingsTy::RemoteMsgSettingsTy | ( | ) |
Constructor sets most values to zero.
| bool XPMP2::RemoteMsgSettingsTy::bHaveTCASControl |
Do we have AI/TCAS control?
| bool XPMP2::RemoteMsgSettingsTy::bLabelCutOffAtVisibility |
Cut off labels at XP's reported visibility mit?
| bool XPMP2::RemoteMsgSettingsTy::bLogMdlMatch |
Debug model matching?
| bool XPMP2::RemoteMsgSettingsTy::bMapEnabled |
Do we feed X-Plane's maps with our aircraft positions?
| bool XPMP2::RemoteMsgSettingsTy::bMapLabels |
Do we show labels with the aircraft icons?
| bool XPMP2::RemoteMsgSettingsTy::bObjReplDataRefs |
Replace dataRefs in .obj
files on load?
| bool XPMP2::RemoteMsgSettingsTy::bObjReplTextures |
Replace textures in .obj
files on load if needed?
| char XPMP2::RemoteMsgSettingsTy::carIcaoType[4] |
Ground vehicle type identifier.
| char XPMP2::RemoteMsgSettingsTy::defaultIcao[4] |
Default ICAO aircraft type designator if no match can be found.
| std::uint16_t XPMP2::RemoteMsgSettingsTy::filler |
yet unused, fills size up for a multiple of 8
| std::uint8_t XPMP2::RemoteMsgSettingsTy::logLvl |
logging level
| float XPMP2::RemoteMsgSettingsTy::maxLabelDist |
Maximum distance for drawing labels? [m].
| char XPMP2::RemoteMsgSettingsTy::name[16] |
plugin's name, not necessarily zero-terminated if using full 12 chars


Last updated: January 21st, 2019
Career Buddy: Nehomah Mora
My name is Brandon. I build political websites to promote political candidates and their campaigns. I use HTML, CSS, and Javascript to create these sites. What are you doing to help your local statesperson?
The first week was kind of stressful and overwhelming. Topics in MySQL quickly went over my head and I feel like I have a lot of catching up to do just to keep up. Brent and Chloe have been helpful, although I may have to ask about getting a technical coach soon.
Week two was basically just me being confused and stressed about PHP and OOP assignments. Everyone's generally ahead of me and it's hard to catch up. Unable to get sleep a couple of nights and had a hard time retaining info and keeping up. Told Karen that I'll need a technical coach soon. Already over it.


Back in 2010 Rolf Buchholz was verified by the Guinness Book of Records as the world's most pierced man.

The German was spotted showing off the striking look at the 10th International Brussels Tattoo Convention, which took place this weekend.
As well as the heavily tattooed Dortmund man, visitors to the convention enjoyed oggling body-modifications enthusiasts from across the world, skateboarding displays and a motorcycle wall of death.
The splash Rolf made this weekend was not the first time he has made headlines.
Back in 2014 he came to the public attention when he was turned away from Dubai International Airport because officials suspected him of witchcraft, 7sur7 reported .
Magic has nothing to do with Rolf's look however.
Human horns are actually made of either Teflon, coral or silicone which are then inserted beneath the skin of the forehead.
As they stretch out the skin, larger and larger horns can be put in.
The first recorded set of human horns belonged to American sideshow performer The Enigma, who had a couple of silicone nodules installed beneath his jigsaw tattooed face.
While it may cause heads to turn, Rolf's extreme look does not cause him problems in the bedroom.

”It's not a problem at all," the telecommunications worker told The Daily Star.
"I have had the piercings already so long, if there was a problem, I would have got rid of them already long ago."


---
layout: post
title: 'Day 15: Ah-hah! Moment'
date: '2014-09-29T07:13:00.000-07:00'
author: geoff purdy
tags:
modified_time: '2017-03-26T05:00:52.496-07:00'
blogger_id: tag:blogger.com,1999:blog-1206336038417661147.post-2761816991665874418
blogger_orig_url: http://geoffreypurdy.blogspot.com/2014/09/day-15-ah-hah-moment.html
---
The reader may notice from the absence of blog posts that I slacked off a little over the weekend. I ended up doing all three homework assignments by Saturday with the intent to clean one up for a really well done final submission. I submitted what I felt was the best of the three and got some extra sleep Sunday night. Probably a good idea.
I awoke with an epiphany about functions and how they relate to unit testing. I think my left brain had needed some down time to catch up with my right brain.


Piers Morgan hints he'll quit Good Morning Britain at end of year
But is he really on the way out?
by Robert LeighGood Morning Britain host Piers Morgan has hinted yet again he could be soon leaving the ITV breakfast show.
Last week the 54-year-old indicated his future on GMB should not be taken for granted after he suggested contract negotiations might be necessary to extend his stay.
Discussing the new changes to ITV's daytime schedule with fellow host Susanna Reid on Monday, he teased his professional services had not been secured to accommodate an extra half hour on the box every morning.
"The show has been extended until 9 o’clock and let’s just say I haven’t been secured for that period yet," Piers said.
Read more: Piers Morgan rips into Prince Andrew for "desperate, toe curling" interview
Susanna replied: "This is when you do your contract negotiations live on air."
And Piers continued: "I prefer to be honest. So, we'll see."
However, Piers seemingly upped the ante by giving a sign he may not be around in 2020.
After Susanna claimed she had the backing of the show's production team in a debate about which of them would make the better Prime Minister, Piers sulkily implied he'll be off.
Read more: Grinning Piers Morgan mocks injured Amanda Holden during night out
"They voted for the one they think might still be here in January," he fired back.
"They always think long term on this show. Always looking after each other."
But Susanna jubilantly responded: "[They want] Someone who’s a stayer! Someone who’s got stamina! Someone who’s not going to leave at the drop of a hat!"
In October, a petition demanding the former newspaper editor's sacking racked up thousands of signatures.
- Good Morning Britain airs on weekdays from 6am
Leave us a comment on our Facebook page @EntertainmentDailyFix and let us know what you think of this story.


CloudSOC from UKCloud Service Definition
Why UKCloud?
UKCloud is dedicated to helping the UK Public Sector and UK citizens by delivering more choice and flexibility through safe and trusted cloud technology. We own and operate a UK-sovereign, industry-leading, multi-cloud platform, located within the Government's Crown Campus, offering multiple cloud technologies, including VMware, Azure, OpenStack, OpenShift and Oracle. This enables customers to choose the right technology for creating new workloads or migrating existing applications to the cloud.
We recognise the importance of government services in making the country run smoothly, which is why we include the highest level of support to all our customers at no extra cost. This includes a dedicated 24/7 UK telephone and ticket support, and Network Operations Centre (NOC) utilising protective and proactive monitoring tools, and access to UKCloud's technical experts.
What is CloudSOC from UKCloud?
Modern organisations need to consider cyber defence as a priority; attacks can come from anywhere, at any time. Cloud services have driven incredible efficiencies into the UK Public Sector, however, increased and more distributed IT estates present greater opportunity for a maturing and more complex cyber attack. As organisations transition more services to cloud providers, an end-to-end cyber security solution takes on the utmost importance.
CloudSOC is an always-on, cloud-hosted cyber security capability that can see all your IT systems, all the time, ensuring you have an up-to-date view of possible threats.
Utilising e2e-assure's capability performing services such as traffic analysis; deep packet inspections; IDS, vulnerability scanning; blacklist monitoring of the assets that matter to you; highly skilled SOC personnel and UKCloud's highly connected, highly secure cloud platform, we deliver a SOC that can see your entire IT estate and is always available.
For full information regarding this product, we have Service Scopes, FAQs and other relevant documents on our Knowledge Centre.
What the service can help you achieve
Provides an end to end cyber security capability. Continual cyber defence with alerts and incident response. Identify threats before they become incidents.
Integrates with existing toolsets to ensure that you are getting best value from your existing cyber investments.
Provides support for your SOC with a variety of support options available, from online training and helpdesk, to managed SOC functions.
Monitors your workloads at OFFICIAL, OFFICIAL-SENSITIVE and SECRET classifications.
Simplifies the management of the increasing attack surface of your cyber security environment by providing a consistent security management service for all your workloads.
Improves the level of cyber capability within your own organisation with tailored support options. Take control of the monitoring platform in your own SOC, have support incidents pro-actively triaged by remote analysts, or define a bespoke support arrangement.
Product options
The service is designed to be flexible and allows you to choose from the options below to match your requirements.
Platform only
Take the Cumulo protective monitoring solution and give control to your own SOC team.
The platform collects events, logs and other information continuously and generates security alerts on a 24/7 basis. Customers may choose to create alerts that will notify them via email or via the portal which can escalate critical or high priority alerts within 15 minutes of detection.
Log Reporting, Log Collection, Logging and Storage
Log collection up to 5,000 eps
Log and Threat Alerting
Email alerts to customer
Monthly summary report and compliance reports
Retention period of 6 months
Platform + SOC services
Have the alerts from your monitored estate triaged and managed by highly trained analysts. Choose from a range of service levels to suit your needs that provide a range of support options from automated alerting, up to active and Automated Cyber Defence remediation (where agreed) and forensic investigation of malware. For full details on options see the service scope.
Pricing and packaging
Pricing from £1.96 per asset per month. Full pricing with all options including licensing and connectivity is available in the 3rd Party Software Pricing Guide. Customer will need to also purchase the appropriate UKCloud infrastructure to host the CloudSOC solution.
Free trial
A 15-day free trial with complete access to all AppDynamics platform components is available. Please contact UKCloud for details.
Accreditation and information assurance
The security of our platform is our number one priority. We've always been committed to adhering to exacting standards, frameworks and best practice. Everything we do is subject to regular independent validation by government accreditors, sector auditors, and management system assessors. Details are available on the UKCloud website.
Connectivity options
UKCloud provides one of the best-connected cloud platforms for the UK Public Sector. We offer a range of flexible connectivity options detailed in the UKCloud Pricing Guide which enable access to our secure platform by DDoS-protected internet, native PSN, Janet, HSCN and RLI and your own lease lines via our HybridConnect service.
An SLA you can trust
We understand that enterprise workloads need a dependable service that underpins the reliability of the application to users and other systems, which is why we offer one of the best SLAs on G-Cloud. As the SLA varies based on the chosen cloud technology, you can find full details on each service's SLA, including measurements and service credits, in the SLA Definition article on the UKCloud Knowledge Centre.
The small print
For full terms and conditions including onboarding and responsibilities, please refer to the Terms and conditions documents.
Feedback
If you find a problem with this article, click Improve this Doc to make the change yourself or raise an issue in GitHub. If you have an idea for how we could improve any of our services, send an email to feedback@ukcloud.com.


Welcome to my portfolio.
I’m a front-end development. I love to solve a solution or make something beautiful. I like to making things that are useful to other people. Moreover, I like the joy of always learning, which springs from the nonrepeating nature of the task.
Most of my work is making website, graphics and branding. I think about how to design a website that can impact audience and company. How to make the user experience impressed with functional and design. Down here is my work so feel free to take a look.


Public Domain Images (Via Twitter)
Top 6 dumbest hacks of all time (Via RWW)
Steve Jobs Book Excerpt: Why he work the Black Mock Turtleneck Uniform (Via 9-5 mac)
The three Terrifying minutes that created The Gunstringer. (Via joystiq)
What to consider when licensing source code? (Via Answers.onstartups
Moral Decline and the end of big ideas (Via the Washington Post)
Ubuntu 11.10 released. Nothing special here…. OH WAIT
When is the startup phase over? (Via Answers.onstartups) (also At what point is a startupno longer a startup?)
Influencing the Influencers: You’re Doing it Wrong (Via RWW)
John Gruber talks about Amazons new Kindles (Via Daring Fireball)
Why education startups do not succeed (Via Avichal Garg’s blog)
iOS5 gets released - just talk.


Events
{% assign future = site.data.events[8] %}The {{future.ordinal}} triannual {{future.name}}
@ {{future.location}}
is {{future.dates}}
--- layout: default --- {{content}}
The {{future.ordinal}} triannual {{future.name}}
is {{future.dates}}
Yrevocnu is a creative society engaged in an infinite game devoted to the process of uncovery in all its forms.
The moves in the game are a series of events, held twice a year at varying locations in the real world and online.
They are opportunities to share skills and ideas with one another through play.
They are opportunities to make something.
They are opportunities to shape the future of our community.
Currently the events are invitation-only. We select for great people who we think have something to learn from one another.


Introduction to Service Design and Engineering Project- 2014/2015
Mirko Morandi, Luca Zamboni, Roberto Zen


look at this trendy chick doesn't she make you want to buy stuff? If you want to be super trendy like all this trendy accessories and what not. well this girl is setting the trend because you are going to buy these clothes now right?
Hey check out this hipster up there. He has a pink tie on. Apparently he is part of a band i'm unfamiliar with but look he has a pink bow tie. Buy Stuff!!! Sales Sales Sales. Buy It! You need it!
YOURNAMEINCORPARATED@LLC.ENTERPRISE


HealthInvest
Profile
Logout
Calculate Repayment
Amount
Moratorium
Loan Term
Monthly Repayment
Principal + Interest-- monthly installment
Submit


 More...
|
| |
| | Font (std::shared_ptr< BackendFontBase > backendFont, const String &id) |
| | Constructor to create the font from an internal backend font. More...
|
| |
| const String & | getId () const |
| | Returns the id that was used to load the font. More...
|
| |
|
| operator bool () const |
| | Converts the font to a boolean to check if it is a nullptr of not.
|
| |
|
bool | operator== (std::nullptr_t) const |
| | Compares the font with a nullptr.
|
| |
|
bool | operator!= (std::nullptr_t) const |
| | Compares the font with a nullptr.
|
| |
|
bool | operator== (const Font &right) const |
| | Compares the font with another one.
|
| |
|
bool | operator!= (const Font &right) const |
| | Compares the font with another one.
|
| |
| FontGlyph | getGlyph (char32_t codePoint, unsigned int characterSize, bool bold, float outlineThickness=0) const |
| | Retrieve a glyph of the font. More...
|
| |
| float | getKerning (char32_t first, char32_t second, unsigned int characterSize) const |
| | Returns the kerning offset of two glyphs. More...
|
| |
| float | getLineSpacing (unsigned int characterSize) const |
| | Returns the line spacing. More...
|
| |
| std::shared_ptr< BackendFontBase > | getBackendFont () const |
| | Returns the internal font. More...
|
| |
◆ Font() [1/4]
| tgui::Font::Font |
( |
const String & |
id | ) |
|
Constructor to create the font from a string (filename by default)
- Parameters
-
◆ Font() [2/4]
| tgui::Font::Font |
( |
const char * |
id | ) |
|
Constructor to create the font from a string (filename by default)
- Parameters
-
◆ Font() [3/4]
| tgui::Font::Font |
( |
const void * |
data, |
|
|
std::size_t |
sizeInBytes |
|
) |
| |
Constructor to create the font from a byte array.
- Parameters
-
| data | Pointer to the file data in memory |
| sizeInBytes | Size of the data to load, in bytes |
◆ Font() [4/4]
Constructor to create the font from an internal backend font.
- Parameters
-
| backendFont | Internal font to use |
| id | Id of the font (usually filename) |
◆ getBackendFont()
Returns the internal font.
- Returns
- Backend font that is used internally
◆ getGlobalFont()
| static Font tgui::Font::getGlobalFont |
( |
| ) |
|
|
static |
Returns the global font that is used for all new widgets.
- Returns
- Global font
◆ getGlyph()
| FontGlyph tgui::Font::getGlyph |
( |
char32_t |
codePoint, |
|
|
unsigned int |
characterSize, |
|
|
bool |
bold, |
|
|
float |
outlineThickness = 0 |
|
) |
| const |
Retrieve a glyph of the font.
If the font is a bitmap font, not all character sizes might be available. If the glyph is not available at the requested size, an empty glyph is returned.
- Parameters
-
| codePoint | Unicode code point of the character to get |
| characterSize | Reference character size |
| bold | Retrieve the bold version or the regular one? |
| outlineThickness | Thickness of outline (when != 0 the glyph will not be filled) |
- Returns
- The glyph corresponding to codePoint and characterSize
◆ getId()
| const String& tgui::Font::getId |
( |
| ) |
const |
Returns the id that was used to load the font.
- Returns
- Id of the font or an empty string when no id was passed when this object was created
◆ getKerning()
| float tgui::Font::getKerning |
( |
char32_t |
first, |
|
|
char32_t |
second, |
|
|
unsigned int |
characterSize |
|
) |
| const |
Returns the kerning offset of two glyphs.
The kerning is an extra offset (negative) to apply between two glyphs when rendering them, to make the pair look more "natural". For example, the pair "AV" have a special kerning to make them closer than other characters. Most of the glyphs pairs have a kerning offset of zero, though.
- Parameters
-
| first | Unicode code point of the first character |
| second | Unicode code point of the second character |
| characterSize | Size of the characters |
- Returns
- Kerning value for first and second, in pixels
◆ getLineSpacing()
| float tgui::Font::getLineSpacing |
( |
unsigned int |
characterSize | ) |
const |
Returns the line spacing.
Line spacing is the vertical offset to apply between two consecutive lines of text.
- Parameters
-
| characterSize | Size of the characters |
- Returns
- Line spacing, in pixels
◆ setGlobalFont()
| static void tgui::Font::setGlobalFont |
( |
const Font & |
font | ) |
|
|
static |
Changes the global font that is used for all new widgets.
- Parameters
-
The documentation for this class was generated from the following file:


EXIT TO EDEN A film review by James Berardinelli Copyright 1994 James Berardinelli
Rating (0 to 10): 4.9
Date Released: 10/14/94 Running Length: 1:52 Rated: R (Sex, nudity, language, whips, chains, thongs)
Starring: Dana Delany, Paul Mercurio, Rosie O'Donnell, Dan Aykroyd, Stuart Wilson, Iman Director: Garry Marshall Producers: Alexandra Rose and Garry Marshall Screenplay: Deborah Amelon and Bob Brunner based on the novel by Anne Rice Cinematography: Theo Van De Sande Music: Patrick Doyle Released by Savoy Pictures
Break out the whips and chains! We're going on a trip to an island called Eden, where the dominatrix Mistress Lisa hold court and just about anything (supposedly) goes. And, judging from the actual journey, if author Anne Rice has any complaints about the shoddy treatment her book got in this limp translation, they're probably well-justified.
EXIT TO EDEN is really two stories in one, which is this case means less, not more, for the money. The film exhibits a split personality in just about every area, from its views on sex down to its uncertainty about whether it wants to be a slapstick crime farce or an offbeat romance.
Elliot (STRICTLY BALLROOM's Paul Mercurio) is a celebrated photographer with a penchant for being spanked (developed when he was a lad in Australia). He signs up for a trip to an exclusive B&D fantasy island and, once there, falls hopelessly in thrall to Mistress Lisa (Dana Delany), the raven-haired resort boss. Much to her surprise and dismay, she finds herself responding to this new, individualistic guest, and certain involuntary defense mechanisms spring into place.
Taken alone, this particular storyline might have made an enjoyable motion picture. If he didn't want to face up to certain serious issues, director Garry Marshall could have done something similar to what he did with PRETTY WOMAN. Unfortunately, this is only half the plot--and the better half by far.
Quite by accident, Elliot has taken the only existing photographs of super criminal Omar (Stuart Wilson). Since Omar is incredibly camera-shy, he and his cohort in crime Nina (Iman) follow Elliot to the island with the goal of killing him and retrieving the film. Fortunately, a pair of repressed Los Angeles cops (played by Rosie O'Donnell and Dan Aykroyd) are hot on the trail. Everyone eventually ends up on Eden.
There are a lot of attempts at slapstick in EXIT TO EDEN, none of which work.  Despite the presence of accomplished comics O'Donnell and Aykroyd, EXIT TO EDEN is almost laughless. Worse still, all the failed humor detracts from time that might better have been spent developing the relationship between Elliot and Lisa.
Rather than approaching his potentially-controversial subject matter with a degree of sensitivity and intelligence, Marshall elects to adopt a PORKY'S-like, exploitative attitude. Soft-porn titillation interferes with story telling, and one wonders whether Delany and Mercurio were chosen for their roles based on their ability and charisma, or on the appearance of their naked buns (which get a fair amount of exposure).
EXIT TO EDEN has all the ingredients of late-night cable fare. The film, which invites a decidedly-unfavorable comparison to John Duigan's SIRENS, isn't so much repugnant as it is disappointing. It's "R" rating also raises questions about the basic inconsistency of the MPAA. Other, non-mainstream films have gotten "NC-17"s for a lot less. Perhaps the Association tempered their rating because they found EXIT TO EDEN amusing. If so, they're probably the only ones.
- James Berardinelli<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


Below is a script I started writing back at the LMB. It visualizes 3D classification jobs from RELION and should be compatible with the most recent version (3.1) - in principle it should also work for 2D classes, but I am not willing to take any responsibility :). I tried to keep the script flexible, but if something breaks, please feel free to reach out.
The output PDF file has various flavors of information. It starts with some plots about the convergence behavior:
Show how particles jump around between classes (bare in mind that with the ‘use small subset’ option, things might look a bit funky):
Visualize how certain micrographs contribute to classes, which might be important for merging datasets or to look at any kind of systematic drift during data collection:
…to histograms about every single column in the last data.star file. Classification sometimes does interesting things, such as classifying particles based on defocus, coordinates (which might be an indication of varying ice thickness) etc.


| convert | R Documentation |
This function takes Rd output files (documentation files that R uses), and converts them to HTML for documentation that fits course requirement.
convert(RdName)
Rdname |
name of RD file |
labels |
data frame of variable labels, columns are variable, obs are descriptions |


--- layout: post title: How to set JavaBean set as Datasource in iReports, along with a working sample. date: 2013-12-20 11:29:00.000000000 +05:30 categories: [] tags: - bean - bean as datasource - iReport - jaspersoft - technical - tutorial - video - walkthrough status: publish type: post published: true meta: blogger_bid: '2279754227642197645' blogger_blog: ankurthetechie.blogspot.com blogger_id: '2967599333371419445' blogger_author: g116451164261752827176 blogger_comments: '2' blogger_permalink: /2013/12/java-beanset-datasource.html blogger_thumbnail: http://1.bp.blogspot.com/-kRCYrv4FigE/UrQk3qR8K9I/AAAAAAAAAYw/bH2zTQQcZHk/s400/Untitled.png _thumbnail_id: '73' author: login: admin@reportlingo email<EMAIL_ADDRESS>display_name: admin@reportlingo first_name: Ankur last_name: Gupta excerpt: !ruby/object:Hpricot::Doc options: {} ---
/**
* Bean
*
* @author Ankur Gupta
*/
public class PersonBean {
private String name = "";
private int age = 0;
public PersonBean(String name, int age) {
this.name = name;
this.age = age;
}
public int getAge() {
return age;
}
public String getName() {
return name;
}
}
/**
* Responsible for filling values in the Bean and return it as collection of bean.
*
* @author Ankur Gupta
*/
public class TestFactory {public static java.util.Collection generateCollection() {
// Creates the collection
java.util.Vector collection = new java.util.Vector();// Adds the values in the bean and adds it into the collection
collection.add(new PersonBean("Ted", 20));
collection.add(new PersonBean("Jack", 34));
collection.add(new PersonBean("Bob", 56));
collection.add(new PersonBean("Alice", 12));
collection.add(new PersonBean("Robin", 22));
collection.add(new PersonBean("Peter", 28));// returns the collection of beans.
return collection;
}
}
2. Array of Beans
/**
* Responsible for filling values in the Bean and return it as collection of bean.
*
* @author Ankur Gupta
*/
public class TestFactory {// Creates the Arraylist
PersonBean[] list = new PersonBean[6];// Adds the values in the bean and adds it into the Array
list[0]= (new PersonBean("Ted", 20));
list[1]= (new PersonBean("Jack", 34));
list[2]= (new PersonBean("Bob", 56));
list[3]= (new PersonBean("Alice", 12));
list[4]= (new PersonBean("Robin", 22));
list[5]= (new PersonBean("Peter", 28));// returns the Array of beans.
return list;
}
}
Now, we need to compile these files and put the generated jar file in the classpath of the iReport.
Next we need to set the datasource, by adding datasource Java Bean set as datasource and fill in the Factory class as well as the function which generates the bean as array or collection, whichever suits our purpose.
In this case:
Factory class : javabeanset.TestFactory
Generating function: generateBeanArray/generateCollection (based upon collection or array)
Below are some screen shots.
| Array of JavaBeans |
| Collection of JavaBeans |
You can follow the video link for setting javabeans as datasource. Here is the Youtube video made by me which gives a complete walkthrough to set the datasource as javabean with the help of a sample report also.
I have made a sample in the video itself here is zip file which contains:
1, Jar File (You need to place this in your classpath)
2. JRXML File
3. Set datasource as shown in the video and insert the values provided in the above screenshots.
4. Test Run PDF(PDF output of the Sample report)
== ZIP Sample File ==
Follow all the steps in order to get the sample working.
Hope this clears your doubt for this topic. Still if you face any issues or problems then you can add a comment below .
Happy Coding.!!


About Me
My name is Diane Peshlakai. I'm native american and I enjoy different kinds of food. I also enjoy nature. I have two
beautiful sons who I deeply love. I enjoy going to different places and trying new and great tasting food. Some of my favorites
are Chinese, Vietnamese, Korean, American, Seafood, and New Mexican food.
At every New Mexican restaurant I visit I have to order chips and salsa.
I would say El Brunos Restaurante and Cantina is my favorite place!I use to be a barista so I got to also have
my coffee preferably a nice sweet caramel macchiato!
I'm also an obsessed fanatic for the WALKING DEAD show!!!
I dont miss an episode and my favorite character is Daryl and Michonne.
I can't wait for the upcoming season which is coming this October. Shaun of
the dead movie is another zombie favorite.


Enumerable Methods
I recently learned about group_by
after a good 2 hrs struggle without knowing of it's existence
06/15/15
Method summary: groups - by result of block - returns a hash
I used it to replace this block of code:
def mode(array)
hash = {}
solution_array = []
array.each {|i| hash[i] ||= array.count(i)}
max_count = hash.values.max
hash.each {|k,v| solution_array << k if v == max_count}
return solution_array
end
After using group_by:
def mode(array)
return [] if array.empty?
groups = array.group_by{ |e| e }.values
max_count = groups.max_by{ |set| set.count }.count
groups.select{ |set| set.size == max_count }.map{|set| set.first }
end


Update your eBooks here
Go back to Dashboard
Username:
Title of eBook:
URL of eBook:
Description:
Describe your books here