The moment 2 parties agree on a repo, they finalize 2 numbers
– The Price is the amount paid for the security at the “opening” leg
– The Rate is the interest to be paid at the “closing” leg
For a common repo, the opening leg is a spot trade, so price is comparable to the market price of the security, but negotiable if it's illiquid.
A repo can also be forward-start. Price would be a forward price.
Routed events have a bit of theory behind it. Routing theory perhaps?
One of the (top 3?) essential jobs of xaml is linking up the GUI event handlers. These event handlers are essential and found in every GUI toolkit. WPF event handlers are often implemented as instance methods in the xaml class. The xaml xml can specify a handler method by unqualified method name like a bare-word.
A bit of history on the “event” concept. In swing and other GUI, an event instance is a single occurrence of a … say a button click (or mouse-over or a special key combination). In dotnet, an event is conceptually a (usually non-static) field holding a functor. In GUI, such an event often points to an instance method of the xaml class behind the xaml. So I feel in a dotnet gui an event in a xaml screen is like “a specific type of user action”, like a click on ButtonA. WPF uses a supercharged kind of event, built on top of the CLR event. We are talking about routed event.
To understand routed event, we better bear in mind that a xaml defines a screen, built with a tree of visuals in a containment hierarchy. Such a hierarchy is also essential in Swing.
When a user action happens, the WPF “Hollywood” typically raises 2 routed events — 1) a tunneling version then 2) a bubbling version. Tunneling events are named Preview_*, and designed to fire before the bubbling event. [[illustrated wpf]] shows a simple example. Upon a click, first the tunnel event hits outer container, then the inner image, and then a second event, the bubble event, hits the inner image then the outer container. Both the inner and outer visual object define event handlers for the click, adding up to 4 event handler methods in the code behind. Therefore we we see 4 log messages.
This is all standard behavior of “Hollywood”. It provides flexibility that you can opt out. You can disable any of the 4 event handlers, and an earlier tunneling event handler can stop the propagation of the tunneling event (ditto bubble), but often you want to give outermost container the first chance to react, before the children. “
This gives the container the power to see an event before its children“, as someone pointed out on http://stackoverflow.com/questions/1107922/wpf-routed-events-tunneling-and-bubbling. Here’s my sound byte –
In the preview (tunneling) phase, container gets the preview before the children
When WPF creators came up with the command infrastructure, they had some competing designs, motivations, trade-off etc. http://msdn.microsoft.com/en-us/library/ms752308.aspx pointed out 2 major driving forces. Here’s my wording, not the original wording
2) enable/disable the Multiple CommandSources at once.
Various authors also touched on these 2 concepts among other concepts. I find it extremely insightful to single out these 2 primary purposes.
Let me elaborate a bit ….
We often write lookup procedures to return a single joined record.
Better distinguish between these scenarios below. The same stored proc
– returns 0-row
– return a special value to indicate 0-row
– return a null value for a field
– return a default value
If possible, I generally avoid returning null value, because they
require extra parsing in java. Besides, null values can be a consequence
of many scenarios — ambiguous.
If the one and only select from the proc simply selects a bunch of
variables, then 0-row won’t happen. How do you indicate 0-row? A very
common scenario. I often use a @rowct variable, that’s updated by the
earlier table selects. In this context, we can also put special values
into other fields to indicate 0-row.
If you want the caller to know it’s 0-row, null or default value, when
all scenarios are possible.
– then choosing a default value can be tricky
– null can be tricky because in the @rowct case, a lot of fields of the
last select might be null.
Many new web frameworks rely on the dual.
– Rich Faces
Singapore is a trickier work place than US. It would be great to find a mentor and a protective manager.
I usually have good rapport with users, but it's possible that I may not jell well with some traders and some colleagues.
I hope to fall back on my ability to get-things-done and my system knowledge so they would feel it's hard to find someone to replace me.
Absolutely must —
* top-level container? Yes, mostly JFrame, as the other 2 top-level containers are less useful or popular
* content pane
* JComponent, the parent of most UI components
* layout manager is an absolute must, since every content pane needs a layout manager, unless you choose absolute positioning
There are non-UI objects that are absolute musts —
– invokeLater() etc. Without it swing might appear to be functional, but i don't feel safe.
* UI events and listeners
If you are expecting more, I'm afraid those are the only ones I know. But here are a few “unavoidables”
– jtable? row/column data. Why is Excel by far the most important and sophisticated among Office apps?
– text panes?
– jpanel? indispensable for grouping components
Always a well-defined, well-understood problem, with no ambiguity. Usually a typical comp science problem. Usually 5 – 30 min given. The faster, the better, since interviewer has really limited time, even if they say “take your time”.
+ Usually needs some non-trivial algo, perhaps some data structure.
+ Usually you need to be crystal clear about stackVar vs fields vs static var.
+ For loops and recursion, you need to be crystal clear about boundary conditions.
Often you need a good grasp of a lot of important details of the language.
– Often you need to be crystal clear about memory (de)allocation.
– For pointers, you need to be absolutely clear about init, reseating, deallocations.
The algo always builds up from
– if/while (the simplest, but can be tricky)
– methods, ctor,
– recursion? sometimes, esp if the data structure is a graph
– regex? seldom
Therefore you need to be thoroughly familiar with a small number of lego blocks.
Data structures involved
– linked list
– binary tree
– directory tree
char symbol; // null terminator not needed
int bidPrice; // no float please
This is a 23-byte fixed-width record, extremely network friendly.
Q: write a hash function q[ int hashCode(char * char7) ] for 300,000 symbols
%%A: (c*31 + c)*31 …. but this is too slow for this options exchange
I was told there’s a solution with no loop no math. I guess some kind of bitwise operation on the 56bits of char7.