9kw Captcha object constructor Supports solving of Captcha Types:
- Image
- reCaptcha v2
- reCaptcha v3
- Captcha URL
- Base64 Captcha
Methods
# async asyncGetSolution(captchaID)
Get the solution of that captcha id The callback is called with err, solution where solution can be a string or empty string if no solution yet this method should be called until there is a solution ex: every 3 seconds
Parameters:
| Name | Type | Description |
|---|---|---|
captchaID |
String |
# async asyncGetSolutionLoop(captchaID, timeoutopt)
Get the captcha solution Tries to get the solution before the timeout every 3 seconds If timeout, Promise will reject with error If solution, Promise will resolve with with solution
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
captchaID |
String | |||
timeout |
Number |
<optional> |
30 | seconds to giveup (30 is a good number) |
# async asyncIsCorrect(captchaID, isCorrectopt)
Say to 9kw if the captcha solution you got from the getSolution method is correct or incorrect Promise can resolve with response.text Promise can reject with error
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
captchaID |
String | |||
isCorrect |
Boolean |
<optional> |
false |
# async asyncServerCheck()
Get the server info If there is an error Promise will reject with error If successful Promise will resolve with res.text
# async asyncSubmit(imageUrlOrSiteKey, siteUrlopt)
Submit the captcha (Image, Audio or Site Key) - Async Promise will resolve with err or captchaID where the captchaID is an integer
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
imageUrlOrSiteKey |
String | Path to the image or siteKey (for siteKey solve the siteUrl must be set) |
|
siteUrl |
String |
<optional> |
URL of the site containing recaptcha (required for siteKey solve) |
# async asyncSubmitBase64(data)
Submit the captcha (Base64) Promise will resolve with err, captchaID where the captchaID is an integer
Parameters:
| Name | Type | Description |
|---|---|---|
data |
String | Base64 string |
# async asyncSubmitFile(pathToFile, siteUrlopt, priorityopt)
Submit the captcha File (Image or Audio) - Async Promise will resolve with err or captchaID where the captchaID is an integer
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
pathToFile |
String | Path to the image or siteKey (for siteKey solve the siteUrl must be set) |
||
siteUrl |
String |
<optional> |
URL of the site containing recaptcha (required for siteKey solve) |
|
priority |
Number |
<optional> |
process.env.CAPTCHA_PRIO_9KW | Overwrite the priority from API. Usefull to have different priorities for different captchas in the same environment. |
# getBalance(callback)
Get the user balance
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function | Needs to handle err<Object|String|null>, response |
# getSolution(captchaID, callback)
Get the solution of that captcha id The callback is called with err, solution where solution can be a string or empty string if no solution yet this method should be called until there is a solution ex: every 3 seconds
Parameters:
| Name | Type | Description |
|---|---|---|
captchaID |
String | |
callback |
function | Needs to handle err<Object|String|null>, solution<Object|String> |
# getSolutionLoop(captchaID, callback, timeoutopt)
Get the captcha solution Tries to get the solution before the timeout every 3 seconds If timeout, callback is called with error If solution, callback is called with null, solution
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
captchaID |
String | |||
callback |
function | Needs to handle err<Object|String|null>, solution<Object|String> |
||
timeout |
Number |
<optional> |
30 | seconds to giveup (30 is a good number) |
# isCorrect(captchaID, isCorrectopt, optionalCallbackopt)
Say to 9kw if the captcha solution you got from the getSolution method is correct or incorrect
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
captchaID |
String | |||
isCorrect |
Boolean |
<optional> |
false | |
optionalCallback |
function |
<optional> |
Needs to handle err<Object|String|null>, resText |
# serverCheck(callback)
Get the server info
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function | Needs to handle err<Object|String|null>, serverinfoString |
# submit(imageUrlOrSiteKey, callback, siteUrlopt, priorityopt)
Submit the captcha (Image/Audio URL or Site Key) Callback will receive err, captchaID where the captchaID is an integer
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
imageUrlOrSiteKey |
String | Path to the image or siteKey |
||
callback |
function | Needs to handle err<Object|String|null>, response<Object|String> |
||
siteUrl |
String |
<optional> |
URL of the site containing recaptcha |
|
priority |
Number |
<optional> |
process.env.CAPTCHA_PRIO_9KW | Optional overwrite the priority from API. Usefull to have different priorities for different captchas in the same environment. |
# submitBase64(data, callback)
Submit the captcha (Base64) Callback will receive err, captchaID where the captchaID is an integer
Parameters:
| Name | Type | Description |
|---|---|---|
data |
String | Base64 string |
callback |
function | Needs to handle err<Object|String|null>, response<Object|String> |
# submitFile(pathToFile, callback, siteUrlopt, priorityopt)
Submit the captcha File (Image or Audio) Callback will receive err, captchaID where the captchaID is an integer
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
pathToFile |
String | Path to the image or siteKey |
||
callback |
function | Needs to handle err<Object|String|null>, response<Object|String> |
||
siteUrl |
String |
<optional> |
URL of the site containing recaptcha |
|
priority |
Number |
<optional> |
process.env.CAPTCHA_PRIO_9KW | Overwrite the priority from API. Usefull to have different priorities for different captchas in the same environment. |


As we have seen, the goals in the body of a sentence are linked by the operator `,', which can be interpreted as conjunction (and). The Prolog language provides a number of other operators, known as control structures, for building complex goals. Apart from being built-in predicates, these control structures play a special role in certain language features, namely Grammar Rules (see ref-gru), and when code is loaded or asserted in the context of modules (see ref-mod). The set of control structures is described in this section, and consists of:
,
:Q ISO;
:Q ISO:
:P ISO->
:Q;
:R ISO->
:Q ISO!
ISO\+
:P ISO ^
:Psetof/3
and bagof/3
)
if(
:P,
:Q,
:R)
once(
:P)
ISO


The following demonstrates the handling of repetition events handled by onadded
, onmoved
, and onremoved
HTML attributes set on a repetition template which handle their respective events. This is made possible by extension to the specification, found in this implementation.


The position of the graph can be controlled with the method
WindrosePlot::SetPos($aXPos,$aYPos)
The position can be specified as either absolute position (in pixels) or as a fraction of width and height. The anchor for the position is the center of the windrose plot. For example, the following line centers the plot in the graph
1 | $windplot->SetPos(0.5,0.5); |
In the same way as for the position the size of the windrose plot can be specified as either an absolute value or as a fraction of the minimum of width and height. The size specified refers to the diameter of the plot.
The size is controlled with the the method
WindrosePlot::SetSize($aDiameter)
as in
1 | $windplot->SetSize(200); |
The code above sets the diameter of the plot to 200 pixels, setting the value to 0.7 would set the diameter to 0.7 * min(WIDTH,HEIGHT) where width and height are the size of the graph.
The size of the middle circle (the zero-range circle) can be adjusted with the method
WindrosePlot::SetZCircleSize($aDiameter)
$aDiameter
, The diameter can be specified as either an
absolute integer value or as a fraction of the windrose plot diameter.
For example the following line sets the size to 1/3 of the windrose plot.
1 | $windplot->SetZCircleSize(1/3); |
The legend is displayed in a fixed position just below the windrose plot as can be seen in all the previous examples.
All legend methods is accessed through the legend property of the windrose plot as in
1 | $windroseplot->legend->SetFont(...); |
There are four basic attributes that can be customizable for the legend as described in the following paragraphs.
To allow for maximum flexibility font can be specified for both the numerical ranges as well as for the text under the legend. In order to avoid making the legend to wide it is often desirable to use a smaller font for the ranges and a slightly larger font for the actual text under the legend (as well as inside the "calm" circle - the indicator for bucket 0).
The fonts for the legend is adjusted by the following methods
SetTFont()
, The text below the legend
SetLFont()
, The font for the labels
SetCFont()
, The font for the label inside the "calm"
circle
SetFont()
, Sets all the font areas above the same
font. Note that if this method is called after one of the individual
settings previous specified (e.g. SetCFont()
) they will
be overwritten.
The colors for the fonts are specified in an analogue way by using the methods
SetTFontColor()
SetLFontColor()
SetCFontColor()
SetFontColor()
Figure 21.10. Windrose legend methods explains visually how these methods are applied
Figure 21.11. Using chinese fonts (
illustrates how two fonts were used
for the legend. For the circle we have use a Chinese font (The Kanji characters
roughly means "Chinese language")windrose_ex6.1.php
)
The source file (as every source file in the library) is encoded in utf-8. For technical reasons some browsers might not render the Chinese characters correctly when the source file is viewed.
The "Calm" circle can have it's size, line weight and color adjusted. In
addition (as was shown in Figure 21.11. Using chinese fonts (
) specify any
text within the circle. By default the text "Calm" is printed inside the circle.
The following methods are used to adjust these properties. windrose_ex6.1.php
)
SetCircleWeight($aWeight)
SetCircleRadius($aRadius)
SetCircleColor($aColor)
SetCircleText($aTxt)
For the ranges it is possible to adjust how the numbers are formatted with a
general format string (in the style of a printf()
format string).
This would allow, for example, to choose the number of decimal values to show in
the legend. The format string is specified with a call to
Legend::SetFormat($aFmt)
.
The format will be applied to both the lower and upper range value. This means that the actual legend range text in the legend will be printed as [number format]-[number format].
The following example shows how to make sure the ranges are displayed as integers
1 | $wp->legend->SetFormat('%d'); |
Finally it is also possible to specify a text at the bottom of the legend with a call to
Legend::SetText($aTxt)
. The text will be displayed
just underneath the legend as for example, shown in Figure 21.11. Using chinese fonts (
windrose_ex6.1.php
)
The values displayed in the legend for the ranges can be adjusted with a call to
WindRosePlot::SetRanges($aRanges)
. By default the
ranges are set to 0,1,2,3,5,6,10,13.5,99.0, this means that the
ranges printed will be 1-2, 2-3, 3-5, ....
The following example shows how to change this to the ranges 0.000-0.001, 0.001-0.003, 0.003-0.005
1 2 | $windplot->SetRanges(array(0.001,0.003,0.005));
$windplot->SetFormat('%.3f'); |
As can be seen the first range (bucket 0) is not really directly printed. It is by default indicated by the circle to the left in the legend.
In the example lines above we also changed the format to display the decimals. Without this the default is only to show one decimal and that would show all ranges as 0.0. An example of how this might look can be seen in figure 10 below.
The colors of both the radial grid and the circular grid can be adjusted. This is done with the method
WindrosePlot::SetGridColor($aColor1,$aColor2)
The first argument specifies the grid circle color and the second argument specifies the radial grid colors.
To adjust the weight (thickness) of the grid lines (both circle and radial lines) the following method is used
WindrosePlot::SetGridWeight($aWeight1,$aWeight2)
The first argument specifies the weight of the circle and the second the weight of the radial lines.
It is possible to have individual colors of the radial grid lines (and line style &weight) by using any of the methods
SetRadialColors()
SetRadialStyles()
SetRadialWeight()
Due to technical and performance limitations circle weight can only be specified in the range [1,3] (inclusively).
Finally we remember that it is possible to add a rectangular box around the plot by using the method
WindrosePlot::SetBox($aColor='black', $aWeight=1,
$aStyle='solid', $aShow=true)
an example of this can be seen in Figure 21.7. Adding two windrose plots to the same graph (
.windrose_2plots_ex1.php
)
The size of the center circle can be manually adjusted as either specified in absolute number of pixels or as fractions of the windrose plot (not the entire windrose graph). This is done with the method
WindrosePlot::SetZCircleSize($aSize)
By default the compass cardinal directions are presented in English locale using standard denominations for the 16 compass directions.
Localizing these names are done with a call to the method
WindrosePlot::SetCompassLabels($aLabels)
The order of the names for the directions should start with the corresponding name for "East" and then continue counter-clockwise all the way to "East North East". Adjusting the names for the compass directions means two things:
If there is named direction in the data (as key) that key must now also be in localized form.
The displayed names for the compass direction will be shown in localized form.
For example, the code snippet below shows how to localize the compass directions into Swedish.
1 2 3 4 5 6 7 8 9 10 | ...
$data = array(
'sso' => array(12,8,2,3),
6 => array(5,4,4,5,4),
);
$se_CompassLbl =
array('O','ONO','NO','NNO','N','NNV','NV','VNV','V','VSV','SV','SSV','S','SSO','SO','OSO');
....
$windroseplot->SetCompassLabels($se_CompassLbl);
... |
and the following shows how to make a localization into Japanese
The source file (as every source file in the library) is encoded in utf-8. For technical reasons some browsers might not render the Japanese characters correctly when the source file is viewed.
To adjust the colors used for each range in the plot the method
WindrosePlot::SetRangeColors($aRangeColors)
The following example shows how to set a red-brown color scale
1 2 | $rangeColors = array('khaki','yellow','orange','orange:0.7','brown','darkred','black');
$windplot->SetRangeColors($rangeColors); |
The weight (width) of the legs used for each range in the plot is by default set to the range 2,4,6,8,10,12,14,16,18,20 pixels.
This can be adjusted with a call to the method
WindrosePlot::SetRangeWeights($aWeights)
If fewer weights than ranges used are supplied the ranges will wrap-around. The following example shows how to set a larger difference in size for the legs between the ranges.
1 | $windplot->SetRangeWeights(array(2,6,10,14,18)); |


You lose!
Play again
Landing interval
Next
Pause
New game
Drop (space bar)
Deform (up arrow)
Developed by
Li Enze


CORBA defines a type set much larger than Lua.
Therefore, many different IDL types are mapped to a single Lua type, for example all compound IDL types are mapped to Lua tables with different structures.
This provides a higher degree of flexibility because a single Lua value may be a valid struct
and exception
value at the same time.
But, this also brings problems since sometimes OiL cannot infer the correct IDL type a Lua value must be encoded when it is sent through the network.
In this section, we describe the mapping OiL uses to convert IDL types to Lua types and vice-versa.
All CORBA numeric types are mapped into the number
type of Lua.
Usually, the number type of Lua has the same precision of the double
of C, but this can be changed when Lua is compiled.
All CORBA string types are mapped to the string
type of Lua. Therefore, there are no constrains about the size of string values inside Lua.
The char
type is also mapped into the string
type of Lua, but char
values are strings with a single character.
The CORBA boolean
type is mapped into the boolean
type of Lua. However, when a value of type other than boolean
is marshaled into a CORBA boolean it is mapped into true
, except for nil
that is mapped into false
.
Enumeration values are mapped into a string containing the name of the enum value. For example, consider the following IDL definition:
enum WeekDay{ sun, mon, tue, wed, thu, fri, sat }; interface Calendar { void setday(in WeekDay day); void nextday(); WeekDay today(); };
Then the following code tests whether the result of operation today
returns the enumeration value sun
if calendar:today() == "sun" then print "Go home and rest!" end
On the other hand, both strings and numbers can be marshaled into enum values if they match the name or the numeric value of an enumeration. For example, the following lines produce the same results.
calendar:setday("sun") calendar:setday(0)
Structure values are mapped to a Lua table that maps all the name of the fields defined in the IDL definition into their proper values. For example, consider the following IDL definition.
struct Book { long isbn; string title; string author; string publisher; long year; }; interface Library { Book get_book(in long isbn); void add_book(in Book book); };
Then, the following code prints the fields of the Book
structure.
book = library:get_book(book_id) print("ISBN:" , book.isbn ) print("Title:" , book.title ) print("Author:" , book.author ) print("Publisher:", book.publisher) print("Year:" , book.year )
In order to marshal a struct
value, you must provide a value (e.g. a table) that index all the struct
fields to its proper values.
For instance, to marshal a structure of type Book
you could use one of the following possibilities.
-- table containing the actual values library:add_book({ isbn =<PHONE_NUMBER>, title = "Programming in Lua", author = "Roberto Ierusalimschy", publisher = "Lua.org", year = 2003, }) -- userdata that index field values into its proper values local books = database:query([[ SELECT isbn, title, author, publisher, year FROM Books WHERE year > 2000 ]]) for _, book in ipairs(books) do -- book is a userdata used to get -- values from a database query library:add_book(book) end
Sequence values are mapped to Lua arrays containing the values of the sequence. Actually, Lua arrays are tables mapping values at integer indices ranging from 1 to the number of elements in the array. In order to marshal sequences, you must create a Lua array that contains the values of the sequence. For example, suppose the following IDL definition.
interface NumberCompare { double max(in sequence<long> numbers); };
Then, the following code invokes max
with a sequence of long
values.
print("Maximum is:", compare:max({64,33,52,15,29}))
If a sequence contains nil
values then it must define field n
that contains the number of elements of the sequence.
All sequences creates by OiL provides this field n
.
For better performance, sequences of octets are mapped to a string containing the character value corresponding to each octet of the sequence. This is possible because Lua strings can contain any character value, including the NULL character.
Array values are mapped similarly to the way sequences are. However, Lua arrays marshaled as CORBA arrays must have the exact number of elements as defined by the CORBA array type.
Again, for better performance, arrays of octets are mapped to a string containing the character values corresponding to each octet of the array.
Union values are mapped to tables containing information about the discriminator and the actual union value. Union tables contain the following fields:
_switch = <value of the discriminator> _value = <value of the selected union field> _field = <name of the selected union field>
Additionally, union values offer shortcuts to its value: you can access the value of the union by the selected union field name, for example, suppose the following IDL union definition:
union MyUnion switch(short) { case 1: string onechoice; case 2: long otherchoice; case 3: double anotherchoice; }
Then you can access the union value like the following:
local union = myobject:get_unionvalue() if union._switch == 1 then print(union.onechoice) elseif union._switch == 2 then print(union.otherchoice) elseif union._switch == 3 then print(union.anotherchoice) end
In order to marshal some union value you must create a table that matches one of the following options:
_switch = <value of the discriminator> _value = <value of the selected union field> _field = <name of the selected union field> _value = <value of the selected union field>
You can also use the union shortcuts to create union values, so it is possible to place the union value at the union field name, so OiL will assume the corresponding discriminator. For example, suppose the IDL union described above, than you could create a matching union value using one of the following options (the formats are presented in order of precedence):
union = { _switch = 0 } union = { _switch = 2, _value = 1024 } union = { _switch = 3, anotherchoice = 0.625 } union = { _field = "otherchoice", _value = 1024 } union = { _field = "anotherchoice", anotherchoice = 0.625 } union = { onechoice = "my string value" }
Unlike other IDL types, when an object is transfered through the network it is not copied. Instead, only a reference for the object is sent through the network. Therefore, interface types actually denote object references, which are mapped to Lua as tables that have an opaque structure. Both servants and proxies are object references, but the former is a reference for a local object and the later is typically a reference for a remote one. Additionally, both servants and proxies provide methods matching the attributes and methods of the interface they implement, which can be called to perform invocation on the referenced object. The following sections, describe the mappings of operations, attributes and exceptions defined in IDL interfaces.
Operations are mapped to methods that receive as parameters the values of all in
and inout
parameters of the operation.
The values of these parameters are in the same relative order as in the IDL definition.
Furthermore, these methods return the value returned by the IDL operation followed by the output values of each out
and inout
parameters.
Again, the values of these parameters are returned in the same relative order as defined in the IDL definition.
Operations, which return type is void
, does not return an additional value before the output value of the out
and inout
parameters.
For example, suppose the following IDL interface, which defines an operation to connect a channel to a given host defined by parameter host
.
broker:loadidl[[ interface Channel { boolean connect(in string host, inout long attempts, out long port); }; ]]
The code below invokes operation connect
on a proxy that implements the Channel
interface.
The value of parameter host
is the string "localhost"
, the value of parameter attempts
is number 3.
The returned value is stored in variable success
.
The resulting values of inout
parameter attempts
and out
parameter port
are stored in the local variables attempts
and port
, respectively.
local proxy = broker:newproxy(oil.readIOR("channel.ior"), "Channel") local success, attempts, port = proxy:connect("localhost", 3) if success then io.write("successfully connect to host ", host, " at port ", port, " after ", attempts, " attempts.") else io.write("unable to connect to a port of host ", host, " after 3 attempts.") end
The same mappings is valid for implementation of servants. Therefore, a possible implementation for the interface above would be
local impl = {} function impl:connect(host, max) for actual = 1, max do local port = self:getnextport() conn = socket.connect(host, port) if conn then self.conn = conn return true, -- returned value actual, -- value of attempts parameter port -- value of port parameter end end return false, -- returned value max, -- value of parameter 'attempts' -1 -- value of parameter 'port' end broker:newobject(impl, nil, "Channel")
Generally, attributes in an IDL are mapped as a pair of _get_
and _set_
methods of the Lua object.
For example, suppose the following IDL definition.
broker:loadidl[[ interface Hello { attribute long count; void say_hello_to(in string name); }; ]]
Then, all references to objects (e.g. proxies) of interface Hello
provides operations _get_count()
and _set_count(value)
, which are used to get and change the value of the attribute count
, respectively.
This is illustrated in the example below.
local proxy = broker:newproxy(oil.readIOR("hello.ior"), "Hello") print("Value of count is:", proxy:_get_count()) proxy:_set_count(0)
Similarly, an object that is registered as a servant with interface Hello
could provide the following implementation.
local impl = { names = {} } function impl:_get_count() return #self.names end function impl:_set_count(value) if value < #self.names then for i = value+1, #self.names do self.names[i] = nil end end end function impl:say_hello_to(name) self.names[#self.names+1] = name print("Hello "..name.."!") end broker:newobject(impl, nil, "Hello")
Alternatively, an attribute is also mapped as a field of the Lua object.
However, this is only valid for the implementation object of a servant.
This means that attributes cannot be accessed as fields of proxies.
The example below, shows an alternative implementation for a servant with interface Hello
.
local impl = { count = 0 } function impl:say_hello_to(name) self.count = self.count + 1 print("Hello "..name.."!") end broker:newobject(impl, nil, "Hello")
Exceptions are mapped to Lua errors, but instead of a textual message, exceptions are errors that carry a table as the error value.
Like structures, this table maps the name of fields defined in the IDL to their values.
However, it contains the additional field _repid
that contains the repository ID of the exception.
For example, suppose the following IDL exception definition.
broker:loadidl[[ exception CompilationError { string script; string message; }; exception ExecutionError { string script; string message; }; interface RemoteLua { void run_script(in string path) raises (CompilationError, ExecutionError); }; ]]
A valid exception value for this definition would be
local impl = {} function impl:run_script(path) local chunk, errmsg = loadfile(path) if not chunk then -- raise CompilationError exception error{ _repid = "IDL:CompilationError:1.0", script = path, message = errmsg, } end local success, errmsg = pcall(chunk) if not success then -- raise ExecutionError exception error{ _repid = "IDL:ExecutionError:1.0", script = path, message = errmsg, } end end broker:newobject(impl, nil, "RemoteLua")
Therefore, to catch an exception you shall use the same mechanisms used to catch Lua errors, as illustrated in the example below.
local remoteLua = broker:newproxy(oil.readfrom("ref.ior"), "RemoteLua") local success, errmsg = pcall(remoteLua.run_script, remoteLua, "/usr/lua/scripts/error.lua") if not success then print("Caught an exception with repID:", errmsg._repid) print(" Failed scrpt:", errmsg.script) print(" Error message:", errmsg.message) end
TypeCode values are mapped to a table containing the fields that describes the type accordingly to its representation in CORBA's CDR.
Basic types are represented by pre-defined tables exported by module oil.corba.idl
, as listed below.
| Descriptor | CORBA type |
|---|---|
oil.corba.idl.void | void |
oil.corba.idl.short | short |
oil.corba.idl.long | long |
oil.corba.idl.ushort | unsigned short |
oil.corba.idl.ulong | unsigned long |
oil.corba.idl.float | float |
oil.corba.idl.double | double |
oil.corba.idl.boolean | boolean |
oil.corba.idl.char | char |
oil.corba.idl.octet | octet |
oil.corba.idl.any | any |
oil.corba.idl.TypeCode | TypeCode |
oil.corba.idl.string | string |
oil.corba.idl.object | CORBA::Object |
Constructed types follow a pre-defined structure.
Module oil.corba.idl
provides auxiliary functions to construct TypeCodes for constructed types, as illustrated below:
local MyEnum = oil.corba.idl.enum{ -- typedef information repID = "IDL:MyEnum:1.0", name = "MyEnum", -- list of enumeration values "text", "number", "logic", }
local MyStruct = oil.corba.idl.struct{ -- typedef information repID = "IDL:MyStruct:1.0", name = "MyStruct", -- list of struct fields { type = oil.corba.idl.string , name = "text" }, { type = oil.corba.idl.double , name = "number" }, { type = oil.corba.idl.boolean, name = "logic" }, }
local MyStringSeq = oil.corba.idl.sequence{ oil.corba.idl.string } local MyBoundedSeq = oil.corba.idl.sequence{ oil.corba.idl.string, maxlength = 100 }
local MyStringArray = oil.corba.idl.array{ oil.corba.idl.string, length = 100 }
local MyUnion = oil.corba.idl.union{ -- typedef information repID = "IDL:MyUnion:1.0", name = "MyUnion", -- union discriminant definition switch = oil.corba.idl.short, default = 0, -- first option is the default -- list of union options { label = 1, type = oil.corba.idl.string , name = "text" }, { label = 2, type = oil.corba.idl.double , name = "number" }, { label = 3, type = oil.corba.idl.boolean, name = "logic" }, }
local MyExcept = oil.corba.idl.union{ -- typedef information repID = "IDL:MyExcept:1.0", name = "MyExcept", -- list of exception members { type = oil.corba.idl.string, name = "message" }, { type = oil.corba.idl.string, name = "file" }, { type = oil.corba.idl.long , name = "line" }, }
local HelloObjectRef = oil.corba.idl.Object{ repID = "IDL:Hello:1.0", name = "Hello", }
local BaseValueType = oil.corba.idl.valuetype{ repID = "IDL:Base:1.0", name = "Base", { type = oil.corba.idl.string , name = "text" , access = "private" }, { type = oil.corba.idl.double , name = "number", access = "public" }, } local MyValueType = oil.corba.idl.valuetype{ repID = "IDL:MyValue:1.0", name = "MyValue", base_value = BaseValueType, { type = oil.corba.idl.boolean, name = "logic" , access = "public" }, }
Some Lua values can be automatically mapped to any
s because OiL defines a default mapping for them.
This default mapping is illustrated in the table below.
nil | null |
number | double |
string | string |
boolean | boolean |
To marshal other values as any
s or to encode some of the values of the table above with a different IDL type than the default one, you must create a table to represent the any
.
This table must have a field _anyval
containing the actual value of the any
and a field _anytype
with the type of the any
, as illustrated below
local any_with_long = { _anyval = 123, _anytype = oil.corba.idl.long, }
Alternatively, you can set field __type
of the metatable of a Lua value to define the IDL type it must be encoded in a any
.
Finally, the type of the any can be defined as the metatable of the table containing the actual value.
For illustrative purpose, the code below creates different any
s using the different possibilities allowed by OiL.
-- any value containing a long local longany = setmetatable({ _anyval = 4 }, oil.corba.idl.long) -- any value containing a struct local MyStructType = oil.corba.idl.struct{ repID = "IDL:MyStruct:1.0", name = "MyStruct", { type = oil.corba.idl.string , name = "text" }, { type = oil.corba.idl.double , name = "number" }, { type = oil.corba.idl.boolean, name = "logic" }, } local structany1 = setmetatable({ text = "some text", number = 123, logic = true, }, MyStructType) -- any value containing a struct with a custom metatable local structany2 = setmetatable({}, { __index = structany1, __type = MyStructType, }) -- any value containing a sequence of anys local myanyseq = { longany, structany1, structany2 } local seqany = setmetatable(myanyseq, oil.corba.idl.sequence{oil.corba.idl.any})
Value Types are mapped to a Lua like structs, that is, a table that maps all the name of the fields defined in the IDL definition into their proper values.
However, unlike structs, nil
can be mapped as Value Types.
The table representing the Value Type shall have a metatable with field __type
to define the actual Value Type it must be encoded.
For example, suppose the followin Value Type definition:
valuetype Book { public long isbn; public string title; public string author; public string publisher; public long year; }; valuetype RentableBook : truncable Book { private boolean rented; }; interface Library { Book get_book(in long isbn); void add_book(in Book book); };
To call operation add_book
with a Value Type of type RentableBook
you can do the following:
book = { isbn =<PHONE_NUMBER>, title = "Programming in Lua", author = "Roberto Ierusalimschy", publisher = "Lua.org", year = 2003, } setmetatable(book, { __type = "::RentableBook" } library:add_book(book)
You can also define constructor for Value Types received by the ORB to add the implementation of any operation provided by the Valeu Type, as illustrated below:
local orb = oil.init() orb:loadidlfile[[ // extracted from book "Pure CORBA" by Filtan Bolton abstract interface IAccount { // operations boolean withdraw(in long amount); void pay_in(in long amount); }; valuetype AccountVal supports IAccount { // state members public long m_account_id; public string m_owner; private long m_balance; }; interface PassByValue { void pass_account_val(in IAccount val); }; ]] orb.valuefactories["IDL:AccountVal:1.0"] = function(val) function val:withdraw(value) if self.m_balance >= value then self.m_balance = self.m_balance - value return true end return false end function val:pay_in(value) self.m_balance = self.m_balance + value end end


Explain the purpose of the package.json file and node_modules directory.
Given multiple choices, identify the difference between npm’s package.json and package-lock.json files.
Use npm –version to check what version is currently installed and use npm to update itself to the latest version.
Use npm init to create a new package and npm install to add a package as a dependency. Then use require to import the module and utilize it in a JavaScript file.
Given an existing GitHub repository, clone the repo and use npm to install it’s dependencies.
Define a constructor function using ES5 syntax.
prototype
of a constructor function.Define a static method on the prototype
of a constructor function.
function Book() { // constructor function ES5 (looks exactly like a regular function)
}
Book.prototype.read = function() { // instance method
}
Book.readAllBooks = function() { // static method
}
class
using ES6 syntax.class Book {
constructor() {
}
read() {
}
static readAllBooks() {
}
}
Book.prototype.anotherRead = function() { // instance method
}
const objectKeys = Object.keys;
Define an instance method
on a class (ES6).
Define a static method
on a class (ES6).
Instantiate an instance of a class using the new
keyword.
extends
syntax for an ES6 class.class Book {
constructor(name, author) {
}
read() {
}
}
class Magazine extends Book {
flipThrough() {
}
read() {
// overwriting Book's read method
}
}
const mag = new Magazine();
mag.read();
const book = new Book();
book.flipThrough();
Utilize the super
keyword in a child class to inherit from a parent class.
Utilize module.exports
and require
to import and export functions and class from one file to another.
class Book {
}
class Magazine {
}
const obj = {
Book,
Magazine
}
// module.exports = obj;
module.exports = Book;
What are the three pillars of object-oriented programming? What is each pillar’s definition?
The SOLID principles - What does each letter stand for? - We talked about the S and L in more depth; know how to apply them and what they mean for us in JavaScript
How to apply the Law of Demeter
module.exports = ClassName
, module.exports = { ClassName }
, or exports.ClassName = ClassName
for exporting. Know the differences and how to use each.const ClassName = require('./file/path')
or const { ClassName } = require('./file/path')
for importing. Know the differences and how to use each.


The RARS is hosted at https://github.com/TheThirdOne/rars and will contain updated releases, bug lists, etc.
For bug reporting, questions or comments, please create an issue at https://github.com/TheThirdOne/rars/issues


runtime.mheap.sweepdone (field)
8 uses
runtime (current package)
mgc.go#L178: mheap_.sweepdone = 1
mgc.go#L2179: mheap_.sweepdone = 0
mgcsweep.go#L195: if atomic.Load(&mheap_.sweepdone) != 0 {
mgcsweep.go#L207: atomic.Store(&mheap_.sweepdone, 1)
mgcsweep.go#L244: if atomic.Xadd(&mheap_.sweepers, -1) == 0 && atomic.Load(&mheap_.sweepdone) != 0 {
mgcsweep.go#L281: return mheap_.sweepdone != 0
mheap.go#L68: sweepdone uint32 // all spans are swept
mheap.go#L907: if h.sweepdone == 0 {
The pages are generated with Golds v0.2.7-preview. (GOOS=darwin GOARCH=amd64)


Invalid Project Name.
Invalid Author.
Select
Minecraft Version
You need to select a Minecraft and Forge version.
Initialize Git Repository
Create


"Computers are able to see, hear and learn. Welcome to the future."
What is Machine Learning?
It is a branch of artificial intelligence based on the idea that systems can learn from data, identify patterns and make decisions with minimal human intervention.
Applications of Machine Learning
Digital Marketing.
Banking e.g. to determine churn rates.
Traveling e.g. in google maps when it picks the best route for a journey.
Health care e.g. in oncology to identify cancerous tissue.
Personal voice assistants e.g. Cortana, Siri.
Alert: Watch out for an upcoming 3-day online training in Machine Learning. Register NOW so that you
don't miss out. Registration is FREE! Click the button to register.


These are the same companies that many of us buy our energy from. By telling them you won’t stand for it and switching your power to a better company, you can support energy companies that are helping to minimise the impacts of climate change and show the dirty energy companies that their actions are not sustainable in the long-term.
In this action, we’ll help you to understand who’s responsible for preventing Australia from taking a stronger stance on climate change, and what you can do about it.
You should get:
A copy of a recent electricity bill (less than 6 months old)
(you can do this process without it, but it’ll be easier with a bill in front of you)
(Click on the steps below to see the details)
Read about the dirty 3 energy companies that are holding back investment in renewables.
The Greenpeace Green Electricity Guide ranks Powershop, Diamond Energy and Momentum as the top 3 greenest electricity retailers.
Here’s some things you might want to know about each of them:
For full details, you can read the Greenpeace Green Electricity Guide and visit the website of the power company to learn about their pricing.
| Powershop | Diamond Energy | Momentum Energy | |
|---|---|---|---|
| Billing | Monthly billing through their online “shop”. Buy online and on time to get their highest discount You buy power from Powershop through their online “shop” or through an app on your phone If you prefer using apps or paying online, Powershop may be preferable |
Quarterly Uses traditional billing, if you prefer a quarterly bill and then paying it, Diamond may be preferable. |
Monthly or Quarterly Uses traditional billing, if you prefer a quarterly bill and then paying it, Momentum may be preferable |
| Discounts | You get a guaranteed discount, plus a higher discount if you pay online and on time |
Yes, if you set up direct debit |
Bonus credit for joining if you join online Discount if you pay with direct debit |
| Swtiching | Powershop will cover any exit fee from your old energy company (up to $75) | (Unknown) | (Unknown) |
| Minimum Contract Length | No lock-in contracts | 24 months | 12 months |
| Exit Fee | No exit fee | $22 if you exit within the first 12 months | No exit fee |
| Solar Feed In | Solar customers have access to the same prices as non-solar customers Solar feed-in tariff is 7.2c/kWh |
If you have solar panels you should check how that impacts your prices |
If you have solar panels you should check how that impacts your prices |
This information was current on 18 February, 2016
Exit Fees
Some power companies may charge you a fee to switch away from them. You should check your current energy company's website or call them to check on this.
If you’re switching to Powershop, they’ll cover your exit fee (up to $75).
If you’re planning to switch to another energy provider, you could give them a call and ask if they’ll cover your exit fee.
There are some websites that help you compare how much your energy bill will change if your switch.
(Note: these websites may not include the exit fee when they estimate your costs)
If you want to support Climate for Change, make sure you come back here and use our links to make the switch to Powershop.
These websites can help you do a price comparison:
For your action to have the most impact, your energy company needs to know that they’ve lost you because of their actions on climate change and that these are important to customers.
Send them a quick message to let them know why you've switched.
Tips for writing a message:
Tell them you know they lobbied against the Renewable Energy Target.
Include your customer reference number / account number
Tell them you’ve taken your business elsewhere (they might not make the connection if you don’t).
Be polite. The person reading your message may not even be aware of their employer’s actions.
Dear Sir/Madam,
I’m a former customer and I am writing to let you know that I have changed to another power company because of your actions in relation to the Renewable Energy Target.
I am concerned about Climate Change and I believe that having an ambitious RETr is important for a safe climate and the future of Australia. I was disappointed to learn that your company lobbied the Government to have the RET scrapped or reduced in 2015.
I hope in future you will chose more responsible climate action.
Sincerely,
You can send your feedback to the big 3 energy companies here:
You can further support the Renewable Energy Target by choosing the GreenPower option with your energy provider.
By choosing one of the top energy retailers as ranked by Greenpeace, you are supporting a company that has supported the Renewable Energy Target. If you choose GreenPower, then your money will contribute to supporting the growth of renewable energy in Australia.
That means your GreenPower will help us to exceed the Renewable Energy Target, which is the kind of action we need right now.
Choose the GreenPower powerpacks in the online shop (you can set these as your default powerpack in your settings).
By choosing these powerpacks, Powershop will voluntarily surrender additional Renewable Energy Certificates which encourages even further investment in renewable energy.
Choose Diamond Pure Plus
Choose GreenPower


|
MetaDrone
2.0
|
Exposes the properties used to access the information in a WebSocket connection request. More...
Protected Member Functions | |
| WebSocketContext () | |
| Initializes a new instance of the WebSocketContext class. More... | |
Properties | |
| abstract CookieCollection | CookieCollection [get] |
| Gets the HTTP cookies included in the request. More... | |
| abstract NameValueCollection | Headers [get] |
| Gets the HTTP headers included in the request. More... | |
| abstract string | Host [get] |
| Gets the value of the Host header included in the request. More... | |
| abstract bool | IsAuthenticated [get] |
| Gets a value indicating whether the client is authenticated. More... | |
| abstract bool | IsLocal [get] |
| Gets a value indicating whether the client connected from the local computer. More... | |
| abstract bool | IsSecureConnection [get] |
| Gets a value indicating whether the WebSocket connection is secured. More... | |
| abstract bool | IsWebSocketRequest [get] |
| Gets a value indicating whether the request is a WebSocket connection request. More... | |
| abstract string | Origin [get] |
| Gets the value of the Origin header included in the request. More... | |
| abstract NameValueCollection | QueryString [get] |
| Gets the query string included in the request. More... | |
| abstract Uri | RequestUri [get] |
| Gets the URI requested by the client. More... | |
| abstract string | SecWebSocketKey [get] |
| Gets the value of the Sec-WebSocket-Key header included in the request. More... | |
| abstract IEnumerable< string > | SecWebSocketProtocols [get] |
| Gets the values of the Sec-WebSocket-Protocol header included in the request. More... | |
| abstract string | SecWebSocketVersion [get] |
| Gets the value of the Sec-WebSocket-Version header included in the request. More... | |
| abstract System.Net.IPEndPoint | ServerEndPoint [get] |
| Gets the server endpoint as an IP address and a port number. More... | |
| abstract IPrincipal | User [get] |
| Gets the client information (identity, authentication, and security roles). More... | |
| abstract System.Net.IPEndPoint | UserEndPoint [get] |
| Gets the client endpoint as an IP address and a port number. More... | |
| abstract WebSocket | WebSocket [get] |
| Gets the WebSocketSharp.WebSocket instance used for two-way communication between client and server. More... | |
Exposes the properties used to access the information in a WebSocket connection request.
The WebSocketContext class is an abstract class.
|
protected |
Initializes a new instance of the WebSocketContext class.
|
get |
Gets the HTTP cookies included in the request.
A WebSocketSharp.Net.CookieCollection that contains the cookies.
|
get |
Gets the HTTP headers included in the request.
A NameValueCollection that contains the headers.
|
get |
Gets the value of the Host header included in the request.
A string that represents the value of the Host header.
|
get |
Gets a value indicating whether the client is authenticated.
true
if the client is authenticated; otherwise, false
.
|
get |
Gets a value indicating whether the client connected from the local computer.
true
if the client connected from the local computer; otherwise, false
.
|
get |
Gets a value indicating whether the WebSocket connection is secured.
true
if the connection is secured; otherwise, false
.
|
get |
|
get |
Gets the value of the Origin header included in the request.
A string that represents the value of the Origin header.
|
get |
Gets the query string included in the request.
A NameValueCollection that contains the query string parameters.
|
get |
Gets the URI requested by the client.
A Uri that represents the requested URI.
|
get |
Gets the value of the Sec-WebSocket-Key header included in the request.
This property provides a part of the information used by the server to prove that it received a valid WebSocket connection request.
A string that represents the value of the Sec-WebSocket-Key header.
|
get |
Gets the values of the Sec-WebSocket-Protocol header included in the request.
This property represents the subprotocols requested by the client.
An T:System.Collections.Generic.IEnumerable<string> instance that provides an enumerator which supports the iteration over the values of the Sec-WebSocket-Protocol header.
|
get |
Gets the value of the Sec-WebSocket-Version header included in the request.
This property represents the WebSocket protocol version.
A string that represents the value of the Sec-WebSocket-Version header.
|
get |
Gets the server endpoint as an IP address and a port number.
A System.Net.IPEndPoint that represents the server endpoint.
|
get |
Gets the client information (identity, authentication, and security roles).
A IPrincipal that represents the client information.
|
get |
Gets the client endpoint as an IP address and a port number.
A System.Net.IPEndPoint that represents the client endpoint.
|
get |
Gets the WebSocketSharp.WebSocket instance used for two-way communication between client and server.


f1 description with long lots words that go things yeahhh
f2 description with long lots words that go things yeahhh
line2
f3 description with long lots words that go things yeahhh
f4 description with long lots words that go things yeahhh
f5 description with long lots words that go things yeahhh


Timestamp microservice - used for translating to and from natural language to unix formats.
Must pass a string of either
| Example Call | Example Result |
|---|---|
https://sour-kilometer.glitch.me/December%2015,%202015 |
{"unix":1450137600,"natural":"December 15, 2015"} |
https://sour-kilometer.glitch.me/1352221111 |
{"unix":<PHONE_NUMBER>,"natural": "November 6, 2012"} |
https://sour-kilometer.glitch.me/March1240April341September |
{"unix": null,"natural": null} |
https://sour-kilometer.glitch.me/colour=red |
{"unix": null,"natural": null} |


This directory contains additional exercises.
The files below in the directory texts
are Coq scripts with a lot of admitted theorems and/or lacking or incomplete definitions. You have just to replace some Admitted
, Parameter
, etc. with Coq code ended by Qed
or Defined
.
Please feel tree to add any additional lemma or auxiliary function if it helps. Please do not require libraries which contain axioms (like Classical
, ClassicalChoice
), unless explicitely suggested.
The files below in the directory solutions
contain solutions to the exercises above.
Please feel free to suggest improvements on our propositions, and new interesting exercises.


{% extends 'vestlus.html' %} {% load crispy_forms_tags %} {% load crispy_forms_field %} {% block content %}
Invite member
Joined {{ membership.created_at|timesince }} ago


Interface EditableDiscovery
A discovery that supports the addition and removal of bindings and types.
Binding types have a name and optionally one or more parameters. Binding
types can be added with the Puli\Discovery\Api\EditableDiscovery::addBindingType()
method:
use Puli\Discovery\Api\Type\BindingParameter; use Puli\Discovery\Api\Type\BindingType; $discovery->addBindingType(new BindingType('acme/message-catalog', array( new BindingParameter('translationDomain', null, 'messages'), ));
Bindings can be added for these types with the Puli\Discovery\Api\EditableDiscovery::addBinding()
method:
$discovery->addBinding( new ResourceBinding('/app/trans/errors.*.xlf', 'acme/xliff-messages', array( 'translationDomain' => 'errors', ), );
Use Puli\Discovery\Api\Discovery::findBindings()
to retrieve bindings for a given type:
$bindings = $discovery->findBindings('acme/xliff-messages'); foreach ($bindings as $binding) { foreach ($binding->getResources() as $resource) { $translator->addXlfCatalog( $resource->getLocalPath(), $binding->getParameter('translationDomain') ); } }
- Puli\Discovery\Api\EditableDiscovery implements Puli\Discovery\Api\Discovery
Namespace: Puli\Discovery\Api
Author: Bernhard Schussek<EMAIL_ADDRESS>Since: 1.0
Located at Api/EditableDiscovery.php
Author: Bernhard Schussek<EMAIL_ADDRESS>Since: 1.0
Located at Api/EditableDiscovery.php
public
|
|
public
|
|
public
|
#
removeBindings( string|null $typeName = null, Webmozart\Expression\Expression $expr = null )
Removes all bindings from the discovery. |
public
|
|
public
|
|
public
|
findBindings(),
getBinding(),
getBindingType(),
getBindingTypes(),
getBindings(),
hasBinding(),
hasBindingType(),
hasBindingTypes(),
hasBindings()
|


Update your email address here. To be able to use the site after this update, you must verify the new address.
Update your password here, this will be used the next time you log in.


Elixir v1.3.4 DateTime
A datetime implementation with a time zone.
This datetime can be seen as an ephemeral snapshot of a datetime at a given timezone. For such purposes, it also includes both UTC and Standard offsets, as well as the zone abbreviation field used exclusively for formatting purposes.
Developers should avoid creating the DateTime struct directly and instead rely on the functions provided by this module as well as the ones in 3rd party calendar libraries.
Where are my functions?
You will notice this module only contains conversion functions as well as functions that work on UTC. This is because a proper DateTime implementation requires a TimeZone database which currently is not provided as part of Elixir.
Such may be addressed in upcoming versions, meanwhile, use 3rd party packages to provide DateTime building and similar functionality with time zone backing.
Summary
Functions
Converts the given Unix time to DateTime
Converts the given Unix time to DateTime
Converts the given date time to ISO8601
Converts a DateTime
into a NaiveDateTime
Converts the given date time to a string according to its calendar
Converts the given DateTime to Unix time
Returns the current datetime in UTC
Types
t :: %DateTime{calendar: Calendar.calendar, day: Calendar.day, hour: Calendar.hour, microsecond: Calendar.microsecond, minute: Calendar.minute, month: Calendar.month, second: Calendar.second, std_offset: Calendar.std_offset, time_zone: Calendar.time_zone, utc_offset: Calendar.utc_offset, year: Calendar.year, zone_abbr: Calendar.zone_abbr}
Functions
from_unix(integer, :native | System.time_unit) :: {:ok, DateTime.t}
Converts the given Unix time to DateTime.
The integer can be given in different unit
according to System.convert_time_unit/3
and it will
be converted to microseconds internally.
Unix times are always in UTC and therefore the DateTime will be returned in UTC.
Examples
iex> DateTime.from_unix(1464096368)
{:ok, %DateTime{calendar: Calendar.ISO, day: 24, hour: 13, microsecond: {0, 0}, minute: 26,
month: 5, second: 8, std_offset: 0, time_zone: "Etc/UTC", utc_offset: 0,
year: 2016, zone_abbr: "UTC"}}
iex> DateTime.from_unix(1432560368868569, :microseconds)
{:ok, %DateTime{calendar: Calendar.ISO, day: 25, hour: 13, microsecond: {868569, 6}, minute: 26,
month: 5, second: 8, std_offset: 0, time_zone: "Etc/UTC", utc_offset: 0,
year: 2015, zone_abbr: "UTC"}}
The unit can also be an integer as in System.time_unit
:
iex> DateTime.from_unix(1432560368868569, 1024)
{:ok, %DateTime{calendar: Calendar.ISO, day: 23, hour: 22, microsecond: {211914, 3}, minute: 53,
month: 1, second: 43, std_offset: 0, time_zone: "Etc/UTC", utc_offset: 0,
year: 46302, zone_abbr: "UTC"}}
Negative Unix times are supported, up to -62167219200 seconds, which is equivalent to “0000-01-01T00:00:00Z” or 0 gregorian seconds.
iex> DateTime.from_unix(-12345678910)
{:ok, %DateTime{calendar: Calendar.ISO, day: 13, hour: 4, microsecond: {0, 0}, minute: 44,
month: 10, second: 50, std_offset: 0, time_zone: "Etc/UTC", utc_offset: 0,
year: 1578, zone_abbr: "UTC"}}
When a Unix time before that moment is passed to from_unix/2
, :error
will be returned.
from_unix!(non_neg_integer, :native | System.time_unit) :: DateTime.t
Converts the given Unix time to DateTime.
The integer can be given in different unit
according to System.convert_time_unit/3
and it will
be converted to microseconds internally.
Unix times are always in UTC and therefore the DateTime will be returned in UTC.
Examples
iex> DateTime.from_unix!(1464096368)
%DateTime{calendar: Calendar.ISO, day: 24, hour: 13, microsecond: {0, 0}, minute: 26,
month: 5, second: 8, std_offset: 0, time_zone: "Etc/UTC", utc_offset: 0,
year: 2016, zone_abbr: "UTC"}
iex> DateTime.from_unix!(1432560368868569, :microseconds)
%DateTime{calendar: Calendar.ISO, day: 25, hour: 13, microsecond: {868569, 6}, minute: 26,
month: 5, second: 8, std_offset: 0, time_zone: "Etc/UTC", utc_offset: 0,
year: 2015, zone_abbr: "UTC"}
Negative Unix times are supported, up to -62167219200 seconds, which is equivalent to “0000-01-01T00:00:00Z” or 0 gregorian seconds.
iex> DateTime.from_unix(-12345678910)
{:ok, %DateTime{calendar: Calendar.ISO, day: 13, hour: 4, microsecond: {0, 0}, minute: 44,
month: 10, second: 50, std_offset: 0, time_zone: "Etc/UTC", utc_offset: 0,
year: 1578, zone_abbr: "UTC"}}
When a Unix time before that moment is passed to from_unix!/2
, an ArgumentError will be raised.
Converts a DateTime
into a Date
.
Because Date
does not hold time nor timezone information,
data will be lost during the conversion.
Examples
iex> dt = %DateTime{year: 2000, month: 2, day: 29, zone_abbr: "CET",
...> hour: 23, minute: 0, second: 7, microsecond: {0, 0},
...> utc_offset: 3600, std_offset: 0, time_zone: "Europe/Warsaw"}
iex> DateTime.to_date(dt)
~D[2000-02-29]
Converts the given date time to ISO8601.
Only supports converting date times which are in the ISO calendar, attempting to convert date times from other calendars will raise.
WARNING: the ISO8601 does not contain the time zone nor its abbreviation,
which means information is lost when converting to such format. This
is also why this module does not provide a from_iso8601/1
function,
as it is impossible to build a proper DateTime
from only the
information in the ISO8601 string.
Examples
iex> dt = %DateTime{year: 2000, month: 2, day: 29, zone_abbr: "CET",
...> hour: 23, minute: 0, second: 7, microsecond: {0, 0},
...> utc_offset: 3600, std_offset: 0, time_zone: "Europe/Warsaw"}
iex> DateTime.to_iso8601(dt)
"2000-02-29T23:00:07+01:00"
iex> dt = %DateTime{year: 2000, month: 2, day: 29, zone_abbr: "UTC",
...> hour: 23, minute: 0, second: 7, microsecond: {0, 0},
...> utc_offset: 0, std_offset: 0, time_zone: "Etc/UTC"}
iex> DateTime.to_iso8601(dt)
"2000-02-29T23:00:07Z"
iex> dt = %DateTime{year: 2000, month: 2, day: 29, zone_abbr: "AMT",
...> hour: 23, minute: 0, second: 7, microsecond: {0, 0},
...> utc_offset: -14400, std_offset: 0, time_zone: "America/Manaus"}
iex> DateTime.to_iso8601(dt)
"2000-02-29T23:00:07-04:00"
Converts a DateTime
into a NaiveDateTime
.
Because NaiveDateTime
does not hold timezone information,
any timezone related data will be lost during the conversion.
Examples
iex> dt = %DateTime{year: 2000, month: 2, day: 29, zone_abbr: "CET",
...> hour: 23, minute: 0, second: 7, microsecond: {0, 1},
...> utc_offset: 3600, std_offset: 0, time_zone: "Europe/Warsaw"}
iex> DateTime.to_naive(dt)
~N[2000-02-29 23:00:07.0]
Converts the given date time to a string according to its calendar.
Examples
iex> dt = %DateTime{year: 2000, month: 2, day: 29, zone_abbr: "CET",
...> hour: 23, minute: 0, second: 7, microsecond: {0, 0},
...> utc_offset: 3600, std_offset: 0, time_zone: "Europe/Warsaw"}
iex> DateTime.to_string(dt)
"2000-02-29 23:00:07+01:00 CET Europe/Warsaw"
iex> dt = %DateTime{year: 2000, month: 2, day: 29, zone_abbr: "UTC",
...> hour: 23, minute: 0, second: 7, microsecond: {0, 0},
...> utc_offset: 0, std_offset: 0, time_zone: "Etc/UTC"}
iex> DateTime.to_string(dt)
"2000-02-29 23:00:07Z"
iex> dt = %DateTime{year: 2000, month: 2, day: 29, zone_abbr: "AMT",
...> hour: 23, minute: 0, second: 7, microsecond: {0, 0},
...> utc_offset: -14400, std_offset: 0, time_zone: "America/Manaus"}
iex> DateTime.to_string(dt)
"2000-02-29 23:00:07-04:00 AMT America/Manaus"
Converts a DateTime
into Time
.
Because Time
does not hold date nor timezone information,
data will be lost during the conversion.
Examples
iex> dt = %DateTime{year: 2000, month: 2, day: 29, zone_abbr: "CET",
...> hour: 23, minute: 0, second: 7, microsecond: {0, 1},
...> utc_offset: 3600, std_offset: 0, time_zone: "Europe/Warsaw"}
iex> DateTime.to_time(dt)
~T[23:00:07.0]
Converts the given DateTime to Unix time.
The DateTime is expected to be using the ISO calendar with a year greater than or equal to 0.
It will return the integer with the given unit,
according to System.convert_time_unit/3
.
Examples
iex><PHONE_NUMBER> |> DateTime.from_unix!() |> DateTime.to_unix()
1464096368
iex> dt = %DateTime{calendar: Calendar.ISO, day: 20, hour: 18, microsecond: {273806, 6},
...> minute: 58, month: 11, second: 19, time_zone: "America/Montevideo",
...> utc_offset: -10800, std_offset: 3600, year: 2014, zone_abbr: "UYST"}
iex> DateTime.to_unix(dt)
1416517099
iex> flamel = %DateTime{calendar: Calendar.ISO, day: 22, hour: 8, microsecond: {527771, 6},
...> minute: 2, month: 3, second: 25, std_offset: 0, time_zone: "Etc/UTC",
...> utc_offset: 0, year: 1418, zone_abbr: "UTC"}
iex> DateTime.to_unix(flamel)
-17412508655


To install the GeologicToolbox in ArcGIS Pro, the ArcPy script files have to be moved in a special ArcGIS folder. As a user-fiendly alternative, for Windows systems an installer might be used. The installer is realized using NSIS (Nullsoft Scriptable Install System).
With the help of NSIS, an executable file (extension .exe) will be generated. Particularly, this file contains all the files to be installed. To generate this executable binary file, an ASCII script file has to be created and to be compiled using the MakeNSISW tool that comes with NSIS.
The NSIS script file is self-explaining. At the end of the file, the install path inside ArcGIS Pro and a list of files that will be copied to the target folder is given:
SetOutPath $INSTDIR\Resources\ArcToolBox\Toolboxes
File .\GOCAD_import.py
File .\GOCAD_import_color.py
File .\Import_bif2.py
...


the most well-tested, battle-hardened blockchain
has been functional for
of the time since January 3rd, 2009.
(Bitcoin's genesis block: Jan 3 2009 02:54:25 GMT)
includes 6⅓ hours of downtime on 2013-03-12.
are composable components
that extend the Bitcoin codebase.
They transform Bitcoin's features
into domain-specific solutions.
are bundles of Elements
deployed as a blockchain
on the Bitcoin network.
Issued Assetsare arbitrarily created in a transaction |
Bonded Assetsare created & destroyed by a 2-way peg |
Both have very different security models!
elementsproject.org/elements
| Confidential Transactions | Segregated Witness | Relative Lock Time | Schnorr Signatures |
| New Opcodes | Signature Covers Value | Deterministic Pegs | Signed Blocks |
| Asset Issuance | Bitmask Sighash Modes |
testnet
blockchainOP_CHECKSEQUENCEVERIFY
mainnet
! 💥


JavaScript Intro
Array with Methods
Goal
Manipulate arrays with built-in methods
Technologies
JavaScript
Reference
w3schools
Array methods
MDN
join method
Live demo


American animated comedy television series
SpongeBob.
SquarePants is an energetic and optimistic sea sponge who lives in a submerged pineapple with his pet snail Gary, who meows like a cat. SpongeBob has a childlike enthusiasm for life, which carries over to his job as a fry cook at a fast food restaurant called the Krusty Krab. His greatest goal in life is to obtain a license to drive a boatmobile. His favorite pastimes include "jellyfishing", which involves catching jellyfish with a net in a manner similar to butterfly catching, and blowing soap bubbles into elaborate shapes.
Some text..
Sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.
Some text about me in culpa qui officia deserunt mollit anim..
Image
Image
Image
Some text..


George suffers from chronic low back pain that causes discomfort in his everyday life..
Play now!~ 12 minutes
Some quick example text to build on the card title and make up the bulk of the card's content.
Play now!~ 12 minutes
A virtual patient about "OSCE Station 2. Rectal examination"
Play now!~ 10 minutes


I am 21 years old and use several drugs enhancing my memory capabilities. I started with Piracetam about 2 years ago and use it till now with several breaks. My opinion about this drug is quite positive, but effects on my memory arenít so considerable.
My last course of Piracetam began about 1 month ago and continues till now. I began with starting dosage of 4,8 g for 5 days, then decreased it to 4,0 g and now use 2,8 g daily. Improvement is insignificant. I mentioned, that high dosages (even 6,0 g daily) do not create greater effect on me, comparing with normal recommended dosages (2,4-3,2 g daily). So I decided to continue therapy with these normal dosages.
Several weeks ago I read about Hydergine and its synergistic effects with Piracetam. So I decided to try. Now I am using 4,5 mg daily for about 2 weeks and mentioned quite significant memory enhancing effect. Also, with these two drugs I use lecithin and choline in dosage of 4 g per day.
One fact, which can mask the real effects of nootropics in my case history, is a depressant drug - Clonazepam. I am forced to use it, because I have vegetodystonia syndrome, which ceased only with Clonazepam (or Alprazolam). So I use 2,0 mg daily with no breaks for about 1 year. Very interesting, but I feel no side effects of Clonazepam (and any other BZD)- only several times it seemed to be effecting on me in its sedative or hypnotic properties. But anti-vegetodystonic effect of Clonazepam (or Alprazolam) is nearly 100%. All other BZDís I used (Diazepam, Medazepam, Chlordiazepoxide, Oxazepam, Triazolam, Midazolam, Flunitrazepam, Lorazepam, Nitrazepam Ö) are helpless- quite a strange situation.
Several words about getting Piracetam and Hydergine in my country. Piracetam is over-the-counter. Hydergine is a prescription drug, but it also used to treat vegetodystonia, so I can easily get it. My therapy with these drugs (Piracetam 2,8 g + Hydergine 4,5 mg) costs me about 0,5$ daily.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


ED WOOD A film review by Chad Polenz Copyright 1997 Chad Polenz
*** (out of 4 = good) 1994,, R, 124 minutes [2 hours, 4 minutes] [satire] starring: Johnny Depp (Ed Wood), Martin Landou (Bela Lugosi), Sarah Jessica Parker (Delores Wood), written by Scott Alexander, Larry Karaszewski, produced by Denise Di Novi, Tim Burton, directed by Tim Burton.
Did you ever wonder who made those bad sci-fi/horror movies they show at 2 a.m. that also end up being ridiculed on "Mystery Science Theater 3000"? Well Edward D. Wood Jr. is the man responsible for starting an entire industry of bad movies, unfortunately he never really saw it that way, and "Ed Wood" is a good satirical portrait of his life.
Ed Wood was a man so in love with the filmmaking process itself he didn't care if things went wrong, the script was terrible, or the props were fake. To him, it's not about scrutiny, it's about the joy of the movies and as long as people are having fun nothing else matters. Johnny Depp is excellent as the quite neurotic, obsessive, cross-dressing Ed Wood. He starts his showbusiness career by taking on projects no one else will touch, with stories so terrible it's a wonder they're even thought up. He writes his own scripts, does all the casting, and even manages to raise the money to make the movies himself.
But Ed has a heart, he knows who the respected people in the business are like Orson Wells, and feels the need to succeed as his role models have done. One day, he stumbles upon Bela Lugosi (Landou), a symbolic character in films of these types.  Lugosi is going broke, but much like Ed, he is so in love with film he'll take any job just to work. It's obvious we are meant to feel for the pathetic old man, but the attitude of the film isn't some type of sappy melodrama, it is a satire through and through.
Even Ed's home life is portrayed in a very satirical and funny manner, as a parody of 50s sit-coms. The dialogue is so over-the-top it's hard to tell what's scripted and what's improvised.
There is a fair amount of events and actions going on in this movie, yet there is no specific plot, just the adventures of Ed Wood. We see him pitch his ideas and not understand how anyone couldn't like anything shown to them on a screen. He actually believes the audience is scared by his monsters and aliens, and he is going to win an Oscar for his work. Ed and his crew aren't even discouraged when they are attacked by an angry mob of frustrated movie-goers!
 One of the final scenes depicts the opening night of "Plan 9" and we can see the excitement bristling in Ed's eyes.
I liked "Ed Wood" even though there wasn't much to it. It has a great sense of mood and is very clever overall. Why did he make all those bad movies anyway? The good thing about this film is that it doesn't try to answer that question (6/4/96) (1/18/97) (6/11/97) [see also: "Barton Fink," also by Burton: "Batman"]
please visit Chad'z Movie Page @ http://members.aol.com/ChadPolenz/index.html
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


{% extends "layout.html" %} {% block page_title %} How old are you? {% endblock %} {% block content %} Back How old are you? How old are you? {% endblock %}


Frequently Asked Questions
What can i do in My Profile
Your profile contains links to some of the most used functions of p2pLoans.com some of which are:
-
My Profile Link
Allowing you to edit your:
Profile Name, Contact Email Address, PayPal Email Address and also include an introduction for your profile. Your PayPal Email Address should be the email address linked to your paypal account, we use this account to send you any funds from p2pLoans.com from where you can transfer them to any bank account in the world. My Inbox
Any Messages sent to you either from your fellow Loans or from p2pLoans.com will appear in your inbox
Wallet
Your WalletYour Wallet is used to fund your activities in p2pLoans.com and also as a place where income from the three main source of funds can all be transferred. funds in your wallet can also be withdrawn to your linked PayPal Account. and you can also fund your Wallet from external sources such as your Bank Account or PayPal.
To Deposit Funds to your Wallet
Click on the deposit amount selection and then click on the lowest multiple of the funds you wish to deposit.
For example if i wish to deposit 90 dollars, i would click on the ten dollar selection and then use a multiple of 9 on the next screen to get a total of 90 dollars, then proceed to deposit my funds either through my paypal account or bank account.
To Withdraw Funds
Enter an amount you wish to withdraw on the Withdraw Amount Field and then proceed, Note that any amount less than $ 100.00 cannot be withdrawn this way
After a succesfull withdrawal a schedule for withdrawal will be created and a date when your funds will be available will be indicated above. Note that any successive withdrawal requests will reset the schedule and add your new request to the old one.
-
How Loans Work
P2P Loans works by first allowing you an opportunity to become a loan financier, you are able to do this on your profile by allocating a portion of your available funds in your wallet into your loan pocket.
This funds will then be used to fund p2pLoans.com loan clients, after a successfull loan finance round you are then allowed to accept a loan of up to fifteen percent more of the total funds you financed other loans with, you can then choose to either transfer your loan pocket into your wallet or continue financing other clients until you reach an amount you are satisfied with. this allows you to earn a lot of compound interest on your initial investment, into your loan pocket
How Much can i get in Loans
P2P Loans does not place a restriction as to how much you can realistically earn as interest on your initial financed amount, however you can only earn 15% on any loan pocket amount from which you can perpetually finance others until you are satisfied.
This is how you can do it:
- You place an initial loan pocket of $ 100.00 and its all taken as loans,
- Then you can realistically now obtain a loan of 15% more than the hundred dollars you previously financed others with. which will mean that your loan pocket now has $ 115.00 which you can then re-finance and so on and so on
- There's also no limit as to how many times you can go through the circle of finance - loan in one day
- However lets assume you can go over the circle of loan and finance twice in one day then in one week you can earn :
That is over $ 707.57 in one week from an initial investment of $100.00 and sufficient promotions enabling you to finance a loan twice in the same day.
Day Finance Loan Finance Loan Monday $ 100.00 $ 115.00 $ 115.00 $ 132.25 Tuesday $ 132.25 $ 152.09 $ 152.09 $ 174.90 Wednesday $ 174.90 $ 201.14 $ 201.14 $ 231.31 Thursday $ 231.31 $ 266.00 $ 266.00 $ 305.90 Friday $ 305.90 $ 351.79 $ 351.79 $ 404.56 Saturday $ 404.56 $ 465.24 $ 465.24 $ 535.03 Sunday $ 535.03 $ 615.28 $ 615.28 $ 707.57 Day Finance Loan Finance Loan
How it Works
Working as an affiliate in p2pLoans.com allows you to earn an income from loans, campaigns, and subscription fees of your own Affiliate on a daily basis.
This allows you to boost your monthly income as you are now able to earn from each and every client using p2pLoans.com you are directly responsible for.
Activating your Affiliate Link and Landing Page
- Open your My Profile Link
- Click on the Affiliate Tab
- Click on My Settings
- Click on SEO Title and Enter Unique Title for your Landing Page then Click on Update
- Then Click on SEO Description and then do the same...note that your description must be at most 255 characters long
- Then you continue doing this for all sections of your landing page until the footer after which you will be done
- Your Affiliate Link is the one indicated on the big button starting with a link icon..
Sharing your Affiliate Link to your Peers
- Once our page has been fully edited and its satisfactory you can share it on any of your social media accounts
Accessing your Affiliate Funds
- The income you make as an affiliate will be reflected as Total Income
- Your Available Funds is funds that can be transferred to your wallet
- Once you click the transfer button all your Available Funds will be transferred to your wallet from our wallet your funds can be transferred to your PayPal Account
https://www.p2pLoans.com uses Google Accounts for authentication for multiple reasons some of which are as follows:At the end of the day we can simply say that using Google Account Authentication helps us secure your Accounts in ways we could never have managed if we use any other accounts.
- https://www.p2pLoans.com is a Google App Engine Application meaning its already running within Google Servers and Google Accounts Authentication is the most secured and readily available authentication for Google Apps
- The Nature of our Web Application means that we have to try our best to prevent the app from being used by spammers so using Google Accounts goes a long way into making sure that we at least have real people using our Web Application not Bots
- Two factor authentication Google Accounts already have Two Factor authentication meaning you can secure your accounts against un authorised access using some of the best technologies the Web has to Offer, without two factor authentication you would not know when your account is Hacked
- Prevention from Hacking and you loosing your funds in turn ..Google Accounts are one of the most secured accounts on the internet today


Hi, I am
Dharmendra
A Software Developer who Love to explore the world of WEB, and solve challanging problems.
Technologoies I work on,


Angle facts
Sum of angles
Sum of angles connected to a line from the one side = 180 degrees.
Sum of angles in any triangle = 180 degrees.
Sum of the two smaller angles in a right-angled triangle = 90 degrees.
Sum of angles connected to a line from the one side = 180 degrees.
Sum of angles in any triangle = 180 degrees.
Sum of the two smaller angles in a right-angled triangle = 90 degrees.
When a line crosses parallel lines alternate angles are equal and corresponding angles are equal.
When two lines cross, opposite angles are equal.
If in a triangle all sides equal, the angles are all 60 degrees.


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PathHandler
This interface must be implemented and then registred as the
handler of a PathParser
instance in order to be
notified of parsing events.
| Method Summary | |
|---|---|
void |
arcAbs(float rx,
float ry,
float xAxisRotation,
boolean largeArcFlag,
boolean sweepFlag,
float x,
float y)
Invoked when an absolute elliptical arc command has been parsed. |
void |
arcRel(float rx,
float ry,
float xAxisRotation,
boolean largeArcFlag,
boolean sweepFlag,
float x,
float y)
Invoked when a relative elliptical arc command has been parsed. |
void |
closePath()
Invoked when a closepath has been parsed. |
void |
curvetoCubicAbs(float x1,
float y1,
float x2,
float y2,
float x,
float y)
Invoked when an absolute cubic bezier curve command has been parsed. |
void |
curvetoCubicRel(float x1,
float y1,
float x2,
float y2,
float x,
float y)
Invoked when a relative cubic bezier curve command has been parsed. |
void |
curvetoCubicSmoothAbs(float x2,
float y2,
float x,
float y)
Invoked when an absolute smooth cubic bezier curve command has been parsed. |
void |
curvetoCubicSmoothRel(float x2,
float y2,
float x,
float y)
Invoked when a relative smooth cubic bezier curve command has been parsed. |
void |
curvetoQuadraticAbs(float x1,
float y1,
float x,
float y)
Invoked when an absolute quadratic bezier curve command has been parsed. |
void |
curvetoQuadraticRel(float x1,
float y1,
float x,
float y)
Invoked when a relative quadratic bezier curve command has been parsed. |
void |
curvetoQuadraticSmoothAbs(float x,
float y)
Invoked when an absolute smooth quadratic bezier curve command has been parsed. |
void |
curvetoQuadraticSmoothRel(float x,
float y)
Invoked when a relative smooth quadratic bezier curve command has been parsed. |
void |
endPath()
Invoked when the path ends. |
void |
linetoAbs(float x,
float y)
Invoked when an absolute line command has been parsed. |
void |
linetoHorizontalAbs(float x)
Invoked when an horizontal absolute line command has been parsed. |
void |
linetoHorizontalRel(float x)
Invoked when an horizontal relative line command has been parsed. |
void |
linetoRel(float x,
float y)
Invoked when a relative line command has been parsed. |
void |
linetoVerticalAbs(float y)
Invoked when a vertical absolute line command has been parsed. |
void |
linetoVerticalRel(float y)
Invoked when a vertical relative line command has been parsed. |
void |
movetoAbs(float x,
float y)
Invoked when an absolute moveto command has been parsed. |
void |
movetoRel(float x,
float y)
Invoked when a relative moveto command has been parsed. |
void |
startPath()
Invoked when the path starts. |
| Method Detail |
|---|
void startPath() throws ParseException
ParseException
- if an error occured while processing the pathvoid endPath() throws ParseException
ParseException
- if an error occured while processing the pathvoid movetoRel(float x, float y) throws ParseException
Command : m
x
- the relative x coordinate for the end pointy
- the relative y coordinate for the end point
ParseException
- if an error occured while processing the pathvoid movetoAbs(float x, float y) throws ParseException
Command : M
x
- the absolute x coordinate for the end pointy
- the absolute y coordinate for the end point
ParseException
- if an error occured while processing the pathvoid closePath() throws ParseException
Command : z | Z
ParseException
- if an error occured while processing the pathvoid linetoRel(float x, float y) throws ParseException
Command : l
x
- the relative x coordinates for the end pointy
- the relative y coordinates for the end point
ParseException
- if an error occured while processing the pathvoid linetoAbs(float x, float y) throws ParseException
Command : L
x
- the absolute x coordinate for the end pointy
- the absolute y coordinate for the end point
ParseException
- if an error occured while processing the pathvoid linetoHorizontalRel(float x) throws ParseException
Command : h
x
- the relative X coordinate of the end point
ParseException
- if an error occured while processing the pathvoid linetoHorizontalAbs(float x) throws ParseException
Command : H
x
- the absolute X coordinate of the end point
ParseException
- if an error occured while processing the pathvoid linetoVerticalRel(float y) throws ParseException
Command : v
y
- the relative Y coordinate of the end point
ParseException
- if an error occured while processing the pathvoid linetoVerticalAbs(float y) throws ParseException
Command : V
y
- the absolute Y coordinate of the end point
ParseException
- if an error occured while processing the pathvoid curvetoCubicRel(float x1, float y1, float x2, float y2, float x, float y) throws ParseException
Command : c
x1
- the relative x coordinate for the first control pointy1
- the relative y coordinate for the first control pointx2
- the relative x coordinate for the second control pointy2
- the relative y coordinate for the second control pointx
- the relative x coordinate for the end pointy
- the relative y coordinate for the end point
ParseException
- if an error occured while processing the pathvoid curvetoCubicAbs(float x1, float y1, float x2, float y2, float x, float y) throws ParseException
Command : C
x1
- the absolute x coordinate for the first control pointy1
- the absolute y coordinate for the first control pointx2
- the absolute x coordinate for the second control pointy2
- the absolute y coordinate for the second control pointx
- the absolute x coordinate for the end pointy
- the absolute y coordinate for the end point
ParseException
- if an error occured while processing the pathvoid curvetoCubicSmoothRel(float x2, float y2, float x, float y) throws ParseException
Command : s
x2
- the relative x coordinate for the second control pointy2
- the relative y coordinate for the second control pointx
- the relative x coordinate for the end pointy
- the relative y coordinate for the end point
ParseException
- if an error occured while processing the pathvoid curvetoCubicSmoothAbs(float x2, float y2, float x, float y) throws ParseException
Command : S
x2
- the absolute x coordinate for the second control pointy2
- the absolute y coordinate for the second control pointx
- the absolute x coordinate for the end pointy
- the absolute y coordinate for the end point
ParseException
- if an error occured while processing the pathvoid curvetoQuadraticRel(float x1, float y1, float x, float y) throws ParseException
Command : q
x1
- the relative x coordinate for the control pointy1
- the relative y coordinate for the control pointx
- the relative x coordinate for the end pointy
- the relative x coordinate for the end point
ParseException
- if an error occured while processing the pathvoid curvetoQuadraticAbs(float x1, float y1, float x, float y) throws ParseException
Command : Q
x1
- the absolute x coordinate for the control pointy1
- the absolute y coordinate for the control pointx
- the absolute x coordinate for the end pointy
- the absolute x coordinate for the end point
ParseException
- if an error occured while processing the pathvoid curvetoQuadraticSmoothRel(float x, float y) throws ParseException
Command : t
x
- the relative x coordinate for the end pointy
- the relative y coordinate for the end point
ParseException
- if an error occured while processing the pathvoid curvetoQuadraticSmoothAbs(float x, float y) throws ParseException
Command : T
x
- the absolute x coordinate for the end pointy
- the absolute y coordinate for the end point
ParseException
- if an error occured while processing the pathvoid arcRel(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y) throws ParseException
Command : a
rx
- the X axis radius for the ellipsery
- the Y axis radius for the ellipsexAxisRotation
- the rotation angle in degrees for the ellipse's
X-axis relative to the X-axislargeArcFlag
- the value of the large-arc-flagsweepFlag
- the value of the sweep-flagx
- the relative x coordinate for the end pointy
- the relative y coordinate for the end point
ParseException
- if an error occured while processing the pathvoid arcAbs(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y) throws ParseException
Command : A
rx
- the X axis radius for the ellipsery
- the Y axis radius for the ellipsexAxisRotation
- the rotation angle in degrees for the ellipse's
X-axis relative to the X-axislargeArcFlag
- the value of the large-arc-flagsweepFlag
- the value of the sweep-flagx
- the absolute x coordinate for the end pointy
- the absolute y coordinate for the end point
ParseException
- if an error occured while processing the path
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Stay acctive and enjoy health and more fun!
Get to know other people who share your passion!
Never stop! Dive into new chanllenges every day


What is oAuth 2.0?
A standard for conveying authorization decisions.
I {username} authorize {app name} to do {whatever}
OAuth 2.0 is not an authentication protocol
OAuth 2.0 !== authentication protocol
OAuth 2.0 != authentication protocol
OAuth 2.0 is used inside of authentication protocols
OAuth 2.0 doesn't know about your users identities, it only care about authorization
OAuth 2.0 === Authorization
ArcGIS Portal/Online === Identity && Access
A Complete System
oAuth 2.0 + ArcGIS Portal/Online
User Logins vs App Authentication
User Logins
- User authorizes application
- Application can act on users behalf
- Usage if any is billed to that users organization
User User Logins When...
- You have to work with private content
- you need to create/edit content
- want usage to be billed to your apps users
Application Authentication
- App exchanges credentials for token
- Uses token to access premium services
- Often implimented as a proxy
Use Application Authentication When…
- You only need to work with public and premium content
- You dont want your users to sign in
Whats Changed?
- ArcGIS Portal 10.3 now supports oAuth 2.0
- 1st class oAuth 2.0 support in the JS API
- More support for OAuth in the ArcGIS Runtimes
- New ways to access premium services
- Better Authentication Docs
Demo Time!
- Browser-based with JS API
- Server-based with JS API + Hapi
- App Proxies for Premium Services
Demos on GitHub


WiFi Setup
Web Update
File Upload
Update FavIcons
Panel
Env file
Config file
State of elements
current files
SSDP description
reboot
bytes available.
bytes (%) in use
portal.htm
portalConfig.htm
monitor.htm
iotStyleCheck
chartLine-test
chartPie-test
gauge-test
elementcheck


--- layout: page title: "Developing Web Applications with Haskell and Yesod" prev: OEBPS/ch20s02.html next: OEBPS/ch21s02.html book_path: books/michael-snoyman-developing-web-applications-with-haskell-and-yesod-_oeb/ --- {% include JB/setup %} {% raw %}
Sphinx is a search server, and powers the search feature on many sites, including Yesod’s own site. While the actual code necessary to integrate Yesod with Sphinx is relatively short, it touches on a number of complicated topics, and is therefore a great case study in how to play with some of the under-the-surface details of Yesod.
There are essentially three different pieces at play here:
Storing the content we wish to search. This is fairly straightforward Persistent code, and we won’t dwell on it much in this chapter.
Accessing Sphinx search results from inside Yesod. Thanks to the sphinx
package, this is actually very easy.
Providing the document content to Sphinx. This is where the interesting stuff happens, and will show how to deal with streaming content from a database directly to XML, which gets sent directly over the wire to the client.
Unlike many of our other examples, to start with here we’ll need to actually configure and run our external Sphinx server. I’m not going to go into all the details of Sphinx, partly because it’s not relevant to our point here, and mostly because I’m not an expert on Sphinx.
Sphinx provides three main command-line utilities: searchd
is the actual search daemon that receives requests from the
client (in this case, our web app) and returns the search results. indexer
parses the set of documents and creates the search
index. search
is a debugging utility that will run
simple queries against Sphinx.
There are two important settings: the source and the index. The source tells Sphinx where to read document information from. It has direct support for MySQL and PostgreSQL, as well as a more general XML format known as xmlpipe2. We’re going to use the last one. This not only will give us more flexibility with choosing Persistent backends, but will also demonstrate some more powerful Yesod concepts.
The second setting is the index. Sphinx can handle multiple indices simultaneously, which allows it to provide search for multiple services at once. Each index will have a source it pulls from.
In our case, we’re going to provide a URL from our application (/search/xmlpipe) that provides the XML file required by Sphinx, and then pipe that through to the indexer. So we’ll add the following to our Sphinx config file:
source searcher_src { type = xmlpipe2 xmlpipe_command = curl http://localhost:3000/search/xmlpipe } index searcher { source = searcher_src path = /var/data/searcher docinfo = extern charset_type = utf-8 }
In order to build your search index, you would run indexer searcher
. Obviously
this won’t work until you have your web app running. For a production site, it would make sense
to run this command via a crontab script so the index is regularly updated.