|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.security.auth.callback.ConfirmationCallback
public class ConfirmationCallback
Underlying security services instantiate and pass a
ConfirmationCallback
to the handle
method of a CallbackHandler
to ask for YES/NO,
OK/CANCEL, YES/NO/CANCEL or other similar confirmations.
CallbackHandler
,
Serialized Form| Field Summary | |
|---|---|
static int |
CANCEL
CANCEL option. |
static int |
ERROR
ERROR message type. |
static int |
INFORMATION
INFORMATION message type. |
static int |
NO
NO option. |
static int |
OK
OK option. |
static int |
OK_CANCEL_OPTION
OK/CANCEL confirmation confirmation option. |
static int |
UNSPECIFIED_OPTION
Unspecified option type. |
static int |
WARNING
WARNING message type. |
static int |
YES
YES option. |
static int |
YES_NO_CANCEL_OPTION
YES/NO/CANCEL confirmation confirmation option. |
static int |
YES_NO_OPTION
YES/NO confirmation option. |
| Constructor Summary | |
|---|---|
ConfirmationCallback(int messageType,
int optionType,
int defaultOption)
Construct a ConfirmationCallback with a
message type, an option type and a default option. |
|
ConfirmationCallback(int messageType,
String[] options,
int defaultOption)
Construct a ConfirmationCallback with a
message type, a list of options and a default option. |
|
ConfirmationCallback(String prompt,
int messageType,
int optionType,
int defaultOption)
Construct a ConfirmationCallback with a prompt,
message type, an option type and a default option. |
|
ConfirmationCallback(String prompt,
int messageType,
String[] options,
int defaultOption)
Construct a ConfirmationCallback with a prompt,
message type, a list of options and a default option. |
| Method Summary | |
|---|---|
int |
getDefaultOption()
Get the default option. |
int |
getMessageType()
Get the message type. |
String[] |
getOptions()
Get the confirmation options. |
int |
getOptionType()
Get the option type. |
String |
getPrompt()
Get the prompt. |
int |
getSelectedIndex()
Get the selected confirmation option. |
void |
setSelectedIndex(int selection)
Set the selected confirmation option. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int UNSPECIFIED_OPTION
The getOptionType
method returns this
value if this ConfirmationCallback
was instantiated
with options
instead of an optionType
.
public static final int YES_NO_OPTION
An underlying security service specifies this as the
optionType
to a ConfirmationCallback
constructor if it requires a confirmation which can be answered
with either YES
or NO
.
public static final int YES_NO_CANCEL_OPTION
An underlying security service specifies this as the
optionType
to a ConfirmationCallback
constructor if it requires a confirmation which can be answered
with either YES
, NO
or CANCEL
.
public static final int OK_CANCEL_OPTION
An underlying security service specifies this as the
optionType
to a ConfirmationCallback
constructor if it requires a confirmation which can be answered
with either OK
or CANCEL
.
public static final int YES
If an optionType
was specified to this
ConfirmationCallback
, this option may be specified as a
defaultOption
or returned as the selected index.
public static final int NO
If an optionType
was specified to this
ConfirmationCallback
, this option may be specified as a
defaultOption
or returned as the selected index.
public static final int CANCEL
If an optionType
was specified to this
ConfirmationCallback
, this option may be specified as a
defaultOption
or returned as the selected index.
public static final int OK
If an optionType
was specified to this
ConfirmationCallback
, this option may be specified as a
defaultOption
or returned as the selected index.
public static final int INFORMATION
public static final int WARNING
public static final int ERROR
| Constructor Detail |
|---|
public ConfirmationCallback(int messageType, int optionType, int defaultOption)
ConfirmationCallback
with a
message type, an option type and a default option.
Underlying security services use this constructor if they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL confirmation.
messageType
- the message type (INFORMATION
,
WARNING
or ERROR
). optionType
- the option type (YES_NO_OPTION
,
YES_NO_CANCEL_OPTION
or
OK_CANCEL_OPTION
). defaultOption
- the default option
from the provided optionType (YES
,
NO
, CANCEL
or
OK
).
IllegalArgumentException
- if messageType is not either
INFORMATION
, WARNING
,
or ERROR
, if optionType is not either
YES_NO_OPTION
,
YES_NO_CANCEL_OPTION
, or
OK_CANCEL_OPTION
,
or if defaultOption
does not correspond to one of the options in
optionType
.public ConfirmationCallback(int messageType, String[] options, int defaultOption)
ConfirmationCallback
with a
message type, a list of options and a default option.
Underlying security services use this constructor if
they require a confirmation different from the available preset
confirmations provided (for example, CONTINUE/ABORT or STOP/GO).
The confirmation options are listed in the options
array,
and are displayed by the CallbackHandler
implementation
in a manner consistent with the way preset options are displayed.
messageType
- the message type (INFORMATION
,
WARNING
or ERROR
). options
- the list of confirmation options. defaultOption
- the default option, represented as an index
into the options
array.
IllegalArgumentException
- if messageType is not either
INFORMATION
, WARNING
,
or ERROR
, if options
is null,
if options
has a length of 0,
if any element from options
is null,
if any element from options
has a length of 0, or if defaultOption
does not lie within the array boundaries of
options
.public ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption)
ConfirmationCallback
with a prompt,
message type, an option type and a default option.
Underlying security services use this constructor if they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL confirmation.
prompt
- the prompt used to describe the list of options. messageType
- the message type (INFORMATION
,
WARNING
or ERROR
). optionType
- the option type (YES_NO_OPTION
,
YES_NO_CANCEL_OPTION
or
OK_CANCEL_OPTION
). defaultOption
- the default option
from the provided optionType (YES
,
NO
, CANCEL
or
OK
).
IllegalArgumentException
- if prompt
is null,
if prompt
has a length of 0,
if messageType is not either
INFORMATION
, WARNING
,
or ERROR
, if optionType is not either
YES_NO_OPTION
,
YES_NO_CANCEL_OPTION
, or
OK_CANCEL_OPTION
,
or if defaultOption
does not correspond to one of the options in
optionType
.public ConfirmationCallback(String prompt, int messageType, String[] options, int defaultOption)
ConfirmationCallback
with a prompt,
message type, a list of options and a default option.
Underlying security services use this constructor if
they require a confirmation different from the available preset
confirmations provided (for example, CONTINUE/ABORT or STOP/GO).
The confirmation options are listed in the options
array,
and are displayed by the CallbackHandler
implementation
in a manner consistent with the way preset options are displayed.
prompt
- the prompt used to describe the list of options. messageType
- the message type (INFORMATION
,
WARNING
or ERROR
). options
- the list of confirmation options. defaultOption
- the default option, represented as an index
into the options
array.
IllegalArgumentException
- if prompt
is null,
if prompt
has a length of 0,
if messageType is not either
INFORMATION
, WARNING
,
or ERROR
, if options
is null,
if options
has a length of 0,
if any element from options
is null,
if any element from options
has a length of 0, or if defaultOption
does not lie within the array boundaries of
options
.| Method Detail |
|---|
public String getPrompt()
ConfirmationCallback
was instantiated without a prompt
.public int getMessageType()
INFORMATION
,
WARNING
or ERROR
).public int getOptionType()
If this method returns UNSPECIFIED_OPTION
, then this
ConfirmationCallback
was instantiated with
options
instead of an optionType
.
In this case, invoke the getOptions
method
to determine which confirmation options to display.
YES_NO_OPTION
,
YES_NO_CANCEL_OPTION
or
OK_CANCEL_OPTION
), or
UNSPECIFIED_OPTION
if this
ConfirmationCallback
was instantiated with
options
instead of an optionType
.public String[] getOptions()
ConfirmationCallback
was instantiated with
an optionType
instead of options
.public int getDefaultOption()
YES
, NO
, OK
or
CANCEL
if an optionType
was specified to the constructor of this
ConfirmationCallback
.
Otherwise, this method returns the default option as
an index into the
options
array specified to the constructor
of this ConfirmationCallback
.public void setSelectedIndex(int selection)
selection
- the selection represented as YES
,
NO
, OK
or CANCEL
if an optionType
was specified to the constructor
of this ConfirmationCallback
.
Otherwise, the selection represents the index into the
options
array specified to the constructor
of this ConfirmationCallback
.getSelectedIndex()
public int getSelectedIndex()
YES
, NO
, OK
or
CANCEL
if an optionType
was specified to the constructor of this
ConfirmationCallback
.
Otherwise, this method returns the selected confirmation
option as an index into the
options
array specified to the constructor
of this ConfirmationCallback
.setSelectedIndex(int)
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


A name is required.
Please provide a name without numbers or special characters.
A phone number is required.
Please a provide a valid number.
Please enter a valid email address.
The email address must be in the form of name@company.domain


mpg123(1) mpg123(1) NAME mpg123 - play audio MPEG 1.0/2.0/2.5 stream (layers 1, 2 and 3) SYNOPSIS mpg123 [ options ] file ... | URL ... | - DESCRIPTION mpg123 reads one or more files (or standard input if ``-'' is specified) or URLs and plays them on the audio device (default) or outputs them to stdout. file/URL is assumed to be an MPEG audio bit stream. OPERANDS The following operands are supported: file(s) The path name(s) of one or more input files. They must be valid MPEG-1.0/2.0/2.5 audio layer 1, 2 or 3 bit streams. If a dash ``-'' is specified, MPEG data will be read from the standard input. Furthermore, any name starting with ``http://'' is recog‐ nized as URL (see next section). OPTIONS mpg123 options may be either the traditional POSIX one letter options, or the GNU style long options. POSIX style options start with a single ``-'', while GNU long options start with ``--''. Option arguments (if needed) follow separated by whitespace (not ``=''). Note that some options can be absent from your installation when disabled in the build process. INPUT OPTIONS -k num, --skip num Skip first num frames. By default the decoding starts at the first frame. -n num, --frames num Decode only num frames. By default the complete stream is decoded. --fuzzy Enable fuzzy seeks (guessing byte offsets or using approximate seek points from Xing TOC). Without that, seeks need a first scan through the file before they can jump at positions. You can decide here: sample-accurate operation with gapless features or faster (fuzzy) seeking. -y, --no-resync Do NOT try to resync and continue decoding if an error occurs in the input file. Normally, mpg123 tries to keep the playback alive at all costs, including skipping invalid material and searching new header when something goes wrong. With this switch you can make it bail out on data errors (and perhaps spare your ears a bad time). Note that this switch has been renamed from --resync. The old name still works, but is not advertised or recommened to use (subject to removal in future). --resync-limit bytes Set number of bytes to search for valid MPEG data once lost in stream; <0 means search whole stream. If you know there are huge chunks of invalid data in your files... here is your hammer. Note: Only since version 1.14 this also increases the amount of junk skipped on beginning. -p URL | none, --proxy URL | none The specified proxy will be used for HTTP requests. It should be specified as full URL (``http://host.domain:port/''), but the ``http://'' prefix, the port number and the trailing slash are optional (the default port is 80). Specifying none means not to use any proxy, and to retrieve files directly from the respective servers. See also the ``HTTP SUPPORT'' section. -u auth, --auth auth HTTP authentication to use when recieving files via HTTP. The format used is user:password. -@ file, --list file Read filenames and/or URLs of MPEG audio streams from the speci‐ fied file in addition to the ones specified on the command line (if any). Note that file can be either an ordinary file, a dash ``-'' to indicate that a list of filenames/URLs is to be read from the standard input, or an URL pointing to a an appropriate list file. Note: only one -@ option can be used (if more than one is specified, only the last one will be recognized). -l n, --listentry n Of the playlist, play specified entry only. n is the number of entry starting at 1. A value of 0 is the default and means playling the whole list, a negative value means showing of the list of titles with their numbers... --loop times for looping track(s) a certain number of times, < 0 means infinite loop (not with --random!). --keep-open For remote control mode: Keep loaded file open after reaching end. --timeout seconds Timeout in (integer) seconds before declaring a stream dead (if <= 0, wait forever). -z, --shuffle Shuffle play. Randomly shuffles the order of files specified on the command line, or in the list file. -Z, --random Continuous random play. Keeps picking a random file from the com‐ mand line or the play list. Unlike shuffle play above, random play never ends, and plays individual songs more than once. --no-icy-meta Do not accept ICY meta data. -i, --index Index / scan through the track before playback. This fills the index table for seeking (if enabled in libmpg123) and may make the operating system cache the file contents for smoother operating on playback. --index-size size Set the number of entries in the seek frame index table. --preframes num Set the number of frames to be read as lead-in before a seeked-to position. This serves to fill the layer 3 bit reservoir, which is needed to faithfully reproduce a certain sample at a certain posi‐ tion. Note that for layer 3, a minimum of 1 is enforced (because of frame overlap), and for layer 1 and 2, this is limited to 2 (no bit reservoir in that case, but engine spin-up anyway). OUTPUT and PROCESSING OPTIONS -o module, --output module Select audio output module. You can provide a comma-separated list to use the first one that works. --list-modules List the available modules. -a dev, --audiodevice dev Specify the audio device to use. The default is system-dependent (usually /dev/audio or /dev/dsp). Use this option if you have multiple audio devices and the default is not what you want. -s, --stdout The decoded audio samples are written to standard output, instead of playing them through the audio device. This option must be used if your audio hardware is not supported by mpg123. The out‐ put format per default is raw (headerless) linear PCM audio data, 16 bit, stereo, host byte order (you can force mono or 8bit). -O file, --outfile Write raw output into a file (instead of simply redirecting stan‐ dard output to a file with the shell). -w file, --wav Write output as WAV file. This will cause the MPEG stream to be decoded and saved as file file , or standard output if - is used as file name. You can also use --au and --cdr for AU and CDR for‐ mat, respectively. --au file Does not play the MPEG file but writes it to file in SUN audio format. If - is used as the filename, the AU file is written to stdout. --cdr file Does not play the MPEG file but writes it to file as a CDR file. If - is used as the filename, the CDR file is written to stdout. --reopen Forces reopen of the audiodevice after ever song --cpu decoder-type Selects a certain decoder (optimized for specific CPU), for exam‐ ple i586 or MMX. The list of available decoders can vary; depend‐ ing on the build and what your CPU supports. This options is only availabe when the build actually includes several optimized decoders. --test-cpu Tests your CPU and prints a list of possible choices for --cpu. --list-cpu Lists all available decoder choices, regardless of support by your CPU. -g gain, --gain gain [DEPRECATED] Set audio hardware output gain (default: don't change). The unit of the gain value is hardware and output module dependent. (This parameter is only provided for backwards compat‐ ibility and may be removed in the future without prior notice. Use the audio player for playing and a mixer app for mixing, UNIX style!) -f factor, --scale factor Change scale factor (default: 32768). --rva-mix, --rva-radio Enable RVA (relative volume adjustment) using the values stored for ReplayGain radio mode / mix mode with all tracks roughly equal loudness. The first valid information found in ID3V2 Tags (Com‐ ment named RVA or the RVA2 frame) or ReplayGain header in Lame/Info Tag is used. --rva-album, --rva-audiophile Enable RVA (relative volume adjustment) using the values stored for ReplayGain audiophile mode / album mode with usually the effect of adjusting album loudness but keeping relative loudness inside album. The first valid information found in ID3V2 Tags (Comment named RVA_ALBUM or the RVA2 frame) or ReplayGain header in Lame/Info Tag is used. -0, --single0; -1, --single1 Decode only channel 0 (left) or channel 1 (right), respectively. These options are available for stereo MPEG streams only. -m, --mono, --mix, --singlemix Mix both channels / decode mono. It takes less CPU time than full stereo decoding. --stereo Force stereo output -r rate, --rate rate Set sample rate (default: automatic). You may want to change this if you need a constant bitrate independent of the mpeg stream rate. mpg123 automagically converts the rate. You should then com‐ bine this with --stereo or --mono. -2, --2to1; -4, --4to1 Performs a downsampling of ratio 2:1 (22 kHz) or 4:1 (11 kHz) on the output stream, respectively. Saves some CPU cycles, but at least the 4:1 ratio sounds ugly. --pitch value Set hardware pitch (speedup/down, 0 is neutral; 0.05 is 5%). This changes the output sampling rate, so it only works in the range your audio system/hardware supports. --8bit Forces 8bit output --float Forces f32 encoding -e enc, --encoding enc Choose output sample encoding. Possible values look like f32 (32-bit floating point), s32 (32-bit signed integer), u32 (32-bit unsigned integer) and the variants with different numbers of bits (s24, u24, s16, u16, s8, u8) and also special variants like ulaw and alaw 8-bit. See the output of mpg123's longhelp for actually available encodings. -d n, --doublespeed n Only play every n'th frame. This will cause the MPEG stream to be played n times faster, which can be used for special effects. Can also be combined with the --halfspeed option to play 3 out of 4 frames etc. Don't expect great sound quality when using this option. -h n, --halfspeed n Play each frame n times. This will cause the MPEG stream to be played at 1/n'th speed (n times slower), which can be used for special effects. Can also be combined with the --doublespeed option to double every third frame or things like that. Don't expect great sound quality when using this option. -E file, --equalizer Enables equalization, taken from file. The file needs to contain 32 lines of data, additional comment lines may be prefixed with #. Each data line consists of two floating-point entries, separated by whitespace. They specify the multipliers for left and right channel of a certain frequency band, respectively. The first line corresponds to the lowest, the 32nd to the highest frequency band. Note that you can control the equalizer interactively with the generic control interface. --gapless Enable code that cuts (junk) samples at beginning and end of tracks, enabling gapless transitions between MPEG files when encoder padding and codec delays would prevent it. This is enabled per default beginning with mpg123 version 1.0.0 . --no-gapless Disable the gapless code. That gives you MP3 decodings that include encoder delay and padding plus mpg123's decoder delay. -D n, --delay n Insert a delay of n seconds before each track. -o h, --headphones Direct audio output to the headphone connector (some hardware only; AIX, HP, SUN). -o s, --speaker Direct audio output to the speaker (some hardware only; AIX, HP, SUN). -o l, --lineout Direct audio output to the line-out connector (some hardware only; AIX, HP, SUN). -b size, --buffer size Use an audio output buffer of size Kbytes. This is useful to bypass short periods of heavy system activity, which would nor‐ mally cause the audio output to be interrupted. You should spec‐ ify a buffer size of at least 1024 (i.e. 1 Mb, which equals about 6 seconds of audio data) or more; less than about 300 does not make much sense. The default is 0, which turns buffering off. --preload fraction Wait for the buffer to be filled to fraction before starting play‐ back (fraction between 0 and 1). You can tune this prebuffering to either get faster sound to your ears or safer uninterrupted web radio. Default is 1 (wait for full buffer before playback). --smooth Keep buffer over track boundaries -- meaning, do not empty the buffer between tracks for possibly some added smoothness. MISC OPTIONS -t, --test Test mode. The audio stream is decoded, but no output occurs. -c, --check Check for filter range violations (clipping), and report them for each frame if any occur. -v, --verbose Increase the verbosity level. For example, displays the frame numbers during decoding. -q, --quiet Quiet. Suppress diagnostic messages. -C, --control Enable terminal control keys. By default use 's' or the space bar to stop/restart (pause, unpause) playback, 'f' to jump forward to the next song, 'b' to jump back to the beginning of the song, ',' to rewind, '.' to fast forward, and 'q' to quit. Type 'h' for a full list of available controls. --title In an xterm, or rxvt (compatible, TERM environment variable is examined), change the window's title to the name of song currently playing. --long-tag Display ID3 tag info always in long format with one line per item (artist, title, ...) --utf8 Regardless of environment, print metadata in UTF-8 (otherwise, when not using UTF-8 locale, you'll get ASCII stripdown). -R, --remote Activate generic control interface. mpg123 will then read and execute commands from stdin. Basic usage is ``load <filename> '' to play some file and the obvious ``pause'', ``command. ``jump <frame>'' will jump/seek to a given point (MPEG frame number). Issue ``help'' to get a full list of commands and syntax. --remote-err Print responses for generic control mode to standard error, not standard out. This is automatically triggered when using -s . --fifo path Create a fifo / named pipe on the given path and use that for reading commands instead of standard input. --aggressive Tries to get higher priority -T, --realtime Tries to gain realtime priority. This option usually requires root privileges to have any effect. -?, --help Shows short usage instructions. --longhelp Shows long usage instructions. --version Print the version string. HTTP SUPPORT In addition to reading MPEG audio streams from ordinary files and from the standard input, mpg123 supports retrieval of MPEG audio files or playlists via the HTTP protocol, which is used in the World Wide Web (WWW). Such files are specified using a so-called URL, which starts with ``http://''. When a file with that prefix is encountered, mpg123 attempts to open an HTTP connection to the server in order to retrieve that file to decode and play it. It is often useful to retrieve files through a WWW cache or so-called proxy. To accomplish this, mpg123 examines the environment for variables named MP3_HTTP_PROXY, http_proxy and HTTP_PROXY, in this order. The value of the first one that is set will be used as proxy specification. To override this, you can use the -p command line option (see the ``OPTIONS'' section). Specifying -p none will enforce contacting the server directly without using any proxy, even if one of the above envi‐ ronment variables is set. Note that, in order to play MPEG audio files from a WWW server, it is necessary that the connection to that server is fast enough. For exam‐ ple, a 128 kbit/s MPEG file requires the network connection to be at least 128 kbit/s (16 kbyte/s) plus protocol overhead. If you suffer from short network outages, you should try the -b option (buffer) to bypass such outages. If your network connection is generally not fast enough to retrieve MPEG audio files in realtime, you can first download the files to your local harddisk (e.g. using wget(1)) and then play them from there. If authentication is needed to access the file it can be specified with the -u user:pass. INTERRUPT When in terminal control mode, you can quit via pressing the q key, while any time you can abort mpg123 by pressing Ctrl-C. If not in terminal con‐ trol mode, this will skip to the next file (if any). If you want to abort playing immediately in that case, press Ctrl-C twice in short succession (within about one second). Note that the result of quitting mpg123 pressing Ctrl-C might not be audible immediately, due to audio data buffering in the audio device. This delay is system dependent, but it is usually not more than one or two seconds. SEE ALSO wget(1), sox(1), NOTES MPEG audio decoding requires a good deal of CPU performance, especially layer-3. To decode it in realtime, you should have at least an i486DX4, Pentium, Alpha, SuperSparc or equivalent processor. You can also use the -m option to decode mono only, which reduces the CPU load somewhat for layer-3 streams. See also the -2 and -4 options. If everything else fails, use the -s option to decode to standard output, direct it into a file and then use an appropriate utility to play that file. You might have to use a tool such as sox(1) to convert the output to an audio format suitable for your audio player. If your system is generally fast enough to decode in realtime, but there are sometimes periods of heavy system load (such as cronjobs, users log‐ ging in remotely, starting of ``big'' programs etc.) causing the audio output to be interrupted, then you should use the -b option to use a buf‐ fer of reasonable size (at least 1000 Kbytes). BUGS Mostly MPEG-1 layer 2 and 3 are tested in real life. Please report any issues and provide test files to help fixing them. Free format streams are not supported, but they could be (there is some code). No CRC error checking is performed. Some platforms lack audio hardware support; you may be able to use the -s switch to feed the decoded data to a program that can play it on your audio device. Notably, this includes Tru64 with MME, but you should be able to install and use OSS there (it perhaps will perform better as MME would anyway). AUTHORS Maintainers: Thomas Orgis<EMAIL_ADDRESS><EMAIL_ADDRESS>Nicholas J. Humfrey Creator: Michael Hipp Uses code or ideas from various people, see the AUTHORS file accompanying the source code. LICENSE mpg123 is licensed under the GNU Lesser/Library General Public License, LGPL, version 2.1 . WEBSITE http://www.mpg123.org http://sourceforge.net/projects/mpg123 31 Jan 2008 mpg123(1)


A FAMILY THING A film review by John Schuurman Copyright 1996 John Schuurman
Alright, there is one mighty stretch of credulity that we viewers must make if we are to become fully engaged with this movie. The film asks a lot in this one regard but once the concession is made we are pleased we have made it and congratulations are in order. If we can do this -- suspend our native skepticism -- this fine film and America's two best actors take over and provide a wonderful encounter with that which is best in the human condition.
OK, here is what you have to get around: Robert Duvall and James Earl Jones as biological half-brothers. Of course, not in a million years. So we all agree. But then we can get back to the movie.
The story takes place in modern day America. It is a simple story and one gives nothing away by telling some of it. Earl Pilcher (Duvall) a deeply Southern man from a thoroughly Southern place learns that though he was brought up white and though he looks white and acts white, he is in fact half black. It seems that his biological father forced sexual relations on a black woman who worked for the family. The woman became pregnant and died while giving birth to little Earl. The child is light skinned and is then brought up in his father's home under the ruse of being the natural son of two white parents.
The movie begins with Earl being told the truth about his origins and composition. He is also made aware that there is a brother, a half-brother named Ray Murdock (Jones), a policeman who lives in Chicago. The rest of the film is a dance between these two -- a sometimes painful, often angry, deeply touching, frequently humorous dance -- through the minefield of contemporary race relations.
The partners, Earl and Ray, move across the screen toward each other. Carrying all the baggage of their respective cultures, they are wary and suspicious, even hateful at the outset. But the music of -- biology? duty? decency? -- slowly draws them towards one another and they become friends and at the end of the dance, we think they find the special love *phileo* of brothers.
Assisting them, (and arguably the music personified), is blind Aunt T. in an inspired performance by Chicago stage actress Irma P. Hall. Go see this movie just for Aunt T. She steals the show. Since she can't see, she tells us that she no longer "has the benefit of being able to judge between people on the way they look." But blind Aunt T. is the catalyst that brings the best out of her two reluctant dancers.
As I watched, I was at once frightened and hopeful for the rest of us. If a suspension of disbelief is necessary to view Duvall and Jones as half-brothers, no such act is asked of us to believe that we are in a terrible and frightening crisis of racism in America. Self-evident though that is, this film made my heart quake over the vastness of the gulf between cultures.
And yet, here we saw one relationship in which healing occured. It was just one, (and the movie is not silly or so naive as to suggest that something so vast and unwieldly as the contemporary racial gulf is fixable), but it was one sign that there IS something better than racial divide. Such relationships can happen and as a sign, this was for the moment -- enough.
John Schuurman
for more reviews by John see: http://www.mcs.com/~sjvogel/wcrc/movies.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


We optimize services!
- exploit web-enabled niches
- engineer extensible networks
- seize e-business mindshare
- streamline synergistic partnerships
- exploit rich vortals
- morph revolutionary technologies
- reintermediate ubiquitous applications
- e-enable out-of-the-box infrastructures
- architect best-of-breed content
- morph front-end synergies


Now you know whether your program will be run live on the ISS by an astronaut, or whether you will have the opportunity to cheer on your regional competitors as they go for first place!
By the end of this week, you should:
Hopefully this program has shown you the importance of space exploration and the possibility of an exciting career in space or in computer science. Even if you decide to pursue another area, though, we hope that you enjoyed your ZR experience and will continue to pay attention to what is going on above the clouds!
What do you like to do and think about, and what skills do you have? Why does this matter? Your skills and interests can lead you to some careers or career areas that might suit you. Take one or several of the following online and paper career interest inventories:
You can use the following resources to get started:
At this point, you may be interested in learning more about NASA–what they do, what we've learned from their work, and what they are hoping to do in the future. Now is the perfect time to look more at NASA in the past, today, and in the future.
Look at the current and planned NASA missions for 2013 and beyond using the following resources:
These will give you a good sense of what NASA is doing today and in the future.
 You're in luck if you want to get to space–several private commercial organizations are developing ways to get to space, including:
Work as part of a team to find a product or service one of these company is offering (or hoping to offer in the future) and then pitch that product or service (or idea!) to the group.
For a single point in 3-dimensional space, using three coordinates to define its position is a simple task. But what about an object with length, width, and height (like the SPHERES satellites)–could you use the same coordinates to find its position? Find out with this slideshow.
In the fall of 2012, NASA landed the Mars rover Curiosity. Much of the nation–and the world–was captivated by this incredible engineering feat. It may be difficult to imagine what it took to get the rover to Mars–and what it will take to continue planetary exploration–but you can get a sense by exploring the following resources:
The end of this five-week program does not mean that your fun needs to end. You might want to continue to participate in the ZR program through middle school and even into high school, but there are also a number of other programming and robotics competitions and programs that you can participate in. For example:


Please fill in this form to create an account.
NAME :
ID :
EMAIL :
PHONE :
Intrests Health and Fitness Books and Literature Arts Technology Design and Media
JION IN : *you can choose more than one * Sport Committee Social Committee Health Committee
By creating an account you agree to our Terms & Privacy


PMCO Fall Split 2019, Prelims Day 2 Match 11: IND finishes #5, INS finishes #9, Bigetron wins Game 11
by KuldeepPMCO Fall Split 2019 Prelims for Global Finals are being held in Kuala Lumpur, Malaysia. The 11th match of Prelims Day 2 took place in the map Vikendi, from a third-person perspective. The flight path for this match started from the north-west part of the map and went towards the north-east part of the map. The first play-zone formed near the north-west side of the map, and it circled hot-priority locations such as Los Dobro Mesto, Krichas, and Goroka.
Party Gaming's Jihun eliminated AustinX from SynerGE to secure the first kill of the game. IND's Kratos with a superb play was able to kill two members of Futbolist. Futbolist was unaware when Kratos sneaked on them from behind. IND then went on to eliminate SynerGE and Orange Esports from the game. An exceptional grenade from Red Canids wiped out two members of INS. IND's impressive run ended after the Indian team was sandwiched by Bigetron and Asterion Myth. Bigetron won the game after they eliminated 2 members from Red Canids and 2 members from Asterion Myth in a chaotic battle. They secured 18 kills in the 11th game of PMCO Fall Split Prelims for Global Finals.
Match 11- Vikendi TPP
- Bigetron: 18 kills and 38 points
- Red Canids: 6 kills and 20 points
- Asterion Myth: 6 kills and 126 points


FreeStuffDev is open for contribution from all people around the world.
Things to keep in mind:
If you have any questions, feel free to reach out at @hilmanski


<
Moringa Devshop
We are a Kenyan based software development firm, creating software that fulfill your goals and needs
Let's Begin
Menu


EMDR Remote
Duration (seconds)
Bulb Color
Display Mode
Slide
Blink
Time on inside bulbs (ms)
Time on edge bulb (ms)
Play sound
Sound Frequency (
400
hertz)
Start


Class constructor
void
__construct
([string|null $data = null])
-
string|null
$data: Path to the configuration file, the configuration as a string or null which means that configuration will be loaded for the system.
Compare the value regarding to the given treshold depending on the supplied operator
bool
compareSizeDirective
(string $directiveName, string|int $treshold, [string $operator = '='])
-
string
$directiveName: Directive name
-
string|int
$treshold: Treshold value
-
string
$operator: Comparison operator
Returns a directive value if it is set, null otherwise
string|null
getDirective
(string $directiveName)
Returns all the directives values as an array
array
getDirectives
()
Returns size directive values in specified unit
string|int
getSizeDirective
(string $directiveName, [string $targetUnit = self::MEGA_BYTES])
-
string
$directiveName: Directive name
-
string
$targetUnit: Target unit
Indicates whether a directive is disabled or not
boolean
isDirectiveDisabled
(string $directiveName)
Indicates whether a directive is enabled or not
boolean
isDirectiveEnabled
(string $directiveName)
Indicates whether a directive is numeric or not
boolean
isDirectiveNumeric
(string $directiveName)
Indicates whether a directive is set or not
boolean
isDirectiveSet
(string $directiveName)
Checks if the directive value is different from a given value
bool
isSizeDirectiveDifferentFrom
(string $directiveName, string|int $value)
-
string
$directiveName: Directive name
-
string|int
$value: Value to compare directive value to
Checks is the directive value is equal to a given value
bool
isSizeDirectiveEqualTo
(string $directiveName, string|int $treshold)
-
string
$directiveName: Directive name
-
string|int
$treshold: Treshold value
Checks is the directive value is greater than a given value
bool
isSizeDirectiveGreaterThan
(string $directiveName, string|int $treshold)
-
string
$directiveName: Directive name
-
string|int
$treshold: Treshold value
Checks is the directive value is greater than or equal to a given value
bool
isSizeDirectiveGreaterThanOrEqualTo
(string $directiveName, string|int $treshold)
-
string
$directiveName: Directive name
-
string|int
$treshold: Treshold value
Checks is the directive value is less than a given value
bool
isSizeDirectiveLessThan
(string $directiveName, string|int $treshold)
-
string
$directiveName: Directive name
-
string|int
$treshold: Treshold value
Checks is the directive value is less than or equal tot a given value
bool
isSizeDirectiveLessThanOrEqualTo
(string $directiveName, string|int $treshold)
-
string
$directiveName: Directive name
-
string|int
$treshold: Treshold value
Loads configuration from an array
-
array
$array: PHP configuration directives
Loads configuration from a php.ini file
-
string
$path: Path to the php.ini file
Loads configuration from a string
-
string
$string: Configuration as a string
Loads configuration from the system PHP_ConfigReport is run on
Converts size values to the specified unit
string|int
_convertSizeValue
(string|int $value, string $targetUnit)
-
string|int
$value: Value to convert
-
string
$targetUnit: Target unit


My wish list
add New Item to my wishlist
item Name:
Category
mobile phones
gaming Consoles
laptops
Cars
tablets
PCs
quantity
submit


- Women's Clothing
- See all Women's Clothing Stores
- Nordstrom 2.0% Cash Back See all Nordstrom Offers
- BaubleBar 4.0% Cash Back See all BaubleBar Coupons
- Six:02 13.0% Cash Back See all Six:02 Coupons
- Neiman Marcus 4.0% Cash Back See all Neiman Marcus Offers
- Saks Fifth Avenue 8.0% Cash Back See all Saks Fifth Avenue Coupons
-
Men's Clothing
- See all Men's Clothing Stores
- Ralph Lauren 5.0% Cash Back See all Ralph Lauren Coupons
- Kohl's 3.0% Cash Back See all Kohl's Coupons
- Macy's 6.0% Cash Back See all Macy's Coupons
- Jos. A. Bank 4.0% Cash Back See all Jos. A. Bank Coupons
- Levi's 2.5% Cash Back See all Levi's Coupons
-
Travel & Vacations
- See all Travel & Vacations Stores
- Hotels.com 3.0% Cash Back See all Hotels.com Coupons
- Booking.com 2.0% Cash Back See all Booking.com Coupons
- Choice Hotels 3.5% Cash Back See all Choice Hotels Coupons
- Hertz 2.5% Cash Back See all Hertz Coupons
- LivingSocial 3.0% Cash Back See all LivingSocial Coupons
-
Health & Beauty
- See all Health & Beauty Stores
- Weight Watchers $5.00 Cash Back See all Weight Watchers Coupons
- Origins 4.0% Cash Back See all Origins Coupons
- Kiehl's 4.0% Cash Back See all Kiehl's Coupons
- Bobbi Brown Cosmetics 4.0% Cash Back See all Bobbi Brown Cosmetics Coupons
- Origins 4.0% Cash Back See all Origins Coupons
-
Shoes & Handbags
- See all Shoes & Handbags Stores
- Kohl's 3.0% Cash Back See all Kohl's Coupons
- Rebecca Minkoff 4.0% Cash Back See all Rebecca Minkoff Coupons
- Dr. Scholls Shoes 5.0% Cash Back See all Dr. Scholls Shoes Coupons
- Macy's 6.0% Cash Back See all Macy's Coupons
- Nordstrom 2.0% Cash Back See all Nordstrom Offers
-
Electronics & Computers
- See all Electronics & Computers Stores
- Norton by Symantec Up to 12.5% Cash Back See all Norton by Symantec Coupons
- AVG Antivirus Up to 15.0% Cash Back See all AVG Antivirus Coupons
- MacMall 2.0% Cash Back See all MacMall Coupons
- Dell Small Business 12.0% Cash Back See all Dell Small Business Coupons
- Rosetta Stone 6.0% Cash Back See all Rosetta Stone Coupons
-
Home, Garden & Tools
- See all Home, Garden & Tools Stores
- Walmart 1.0% Cash Back See all Walmart Coupons
- Lands' End 6.0% Cash Back See all Lands' End Coupons
- Macy's 6.0% Cash Back See all Macy's Coupons
- JCPenney 15.0% Cash Back See all JCPenney Coupons
- HSN 3.0% Cash Back See all HSN Coupons
-
Baby, Kids & Toys
- See all Baby, Kids & Toys Stores
- Kohl's 3.0% Cash Back See all Kohl's Coupons
- Carter's 2.5% Cash Back See all Carter's Coupons
- Diapers.com 2.0% Cash Back See all Diapers.com Coupons
- Ralph Lauren 5.0% Cash Back See all Ralph Lauren Coupons
- Personal Creations 8.0% Cash Back See all Personal Creations Coupons
-
Sports & Outdoors
- See all Sports & Outdoors Stores
- Finish Line 4.0% Cash Back See all Finish Line Coupons
- Columbia Sportswear 5.0% Cash Back See all Columbia Sportswear Coupons
- Golfsmith 10.0% Cash Back See all Golfsmith Coupons
- Taylor Made Golf 3.0% Cash Back See all Taylor Made Golf Coupons
- Athleta 2.0% Cash Back See all Athleta Coupons
-
Food & Restaurants
- See all Food & Restaurants Stores
- Shari's Berries 4.0% Cash Back See all Shari's Berries Coupons
- See's Candies 4.0% Cash Back See all See's Candies Coupons
- Omaha Steaks 3.5% Cash Back See all Omaha Steaks Coupons
- The Popcorn Factory 3.0% Cash Back See all The Popcorn Factory Coupons
- Fannie May Candies 8.0% Cash Back See all Fannie May Candies Coupons
-
Books & Digital Media
- See all Books & Digital Media Stores
- Magazines.com 26.0% Cash Back See all Magazines.com Coupons
- Rosetta Stone 6.0% Cash Back See all Rosetta Stone Coupons
- Kobo 5.0% Cash Back See all Kobo Coupons
- TextbookUnderground 4.0% Cash Back See all TextbookUnderground Coupons
- Better World Books 3.0% Cash Back See all Better World Books Coupons
-
Flowers & Gifts
- See all Flowers & Gifts Stores
- Wine.com 2.5% Cash Back See all Wine.com Coupons
- The Bouqs 7.5% Cash Back See all The Bouqs Coupons
- From You Flowers 15.0% Cash Back See all From You Flowers Coupons
- ProFlowers 12.0% Cash Back See all ProFlowers Coupons
- FTD Flowers 12.0% Cash Back See all FTD Flowers Coupons
-
Office Supplies
- See all Office Supplies Stores
- MOO 2.5% Cash Back See all MOO Coupons
- Office Depot® and OfficeMax® 4.0% Cash Back See all Office Depot® and OfficeMax® Coupons
- AllPosters 6.0% Cash Back See all AllPosters Coupons
- Quill 3.0% Cash Back See all Quill Coupons
- Staples 2.0% Cash Back See all Staples Coupons
-
Ebates Daily Double
- Macy's
- Was 3.0%, Now 6.0% Cash Back
Join Free & Pick Your Bonus
Select Your Bonus*
Why You Should Join
You get cash back at any of 1,800 stores any time you start your shopping trip at Ebates.com. There are no points to redeem, no forms to mail in, and no fees. Stores pay Ebates a sales commission for sending shoppers their way, and Ebates uses the commission to pay you cash back. All we need is an email address so we can notify you when your cash back has been credited. To date, our members have already earned more than $250 million and you can join them today!
* Gift Card earned after first $25 purchase. By becoming a member, you agree to our Terms & Conditions.
All trademarks are proprietary to Ebates Inc.
Using Ebates is easy.
Only 3 steps:
- Sign up for free
- Pick a store or coupon
- Get cash back


Rate Limiting¶
Rate limiting in Swift is implemented as a pluggable middleware. Rate limiting is performed on requests that result in database writes to the account and container sqlite dbs. It uses memcached and is dependent on the proxy servers having highly synchronized time. The rate limits are limited by the accuracy of the proxy server clocks.
Configuration¶
All configuration is optional. If no account or container limits are provided there will be no rate limiting. Configuration available:
| Option | Default | Description |
| clock_accuracy | 1000 | Represents how accurate the proxy servers’ system clocks are with each other. 1000 means that all the proxies’ clock are accurate to each other within 1 millisecond. No ratelimit should be higher than the clock accuracy. |
| max_sleep_time_seconds | 60 | App will immediately return a 498 response if the necessary sleep time ever exceeds the given max_sleep_time_seconds. |
| log_sleep_time_seconds | 0 | To allow visibility into rate limiting set this value > 0 and all sleeps greater than the number will be logged. |
| rate_buffer_seconds | 5 | Number of seconds the rate counter can drop and be allowed to catch up (at a faster than listed rate). A larger number will result in larger spikes in rate but better average accuracy. |
| account_ratelimit | 0 | If set, will limit PUT and DELETE requests to /account_name/container_name. Number is in requests per second. |
| container_ratelimit_size | ‘’ | When set with container_ratelimit_x = r: for containers of size x, limit requests per second to r. Will limit PUT, DELETE, and POST requests to /a/c/o. |
| container_listing_ratelimit_size | ‘’ | When set with container_listing_ratelimit_x = r: for containers of size x, limit listing requests per second to r. Will limit GET requests to /a/c. |
The container rate limits are linearly interpolated from the values given. A sample container rate limiting could be:
container_ratelimit_100 = 100
container_ratelimit_200 = 50
container_ratelimit_500 = 20
This would result in
| Container Size | Rate Limit |
| 0-99 | No limiting |
| 100 | 100 |
| 150 | 75 |
| 500 | 20 |
| 1000 | 20 |
Account Specific Ratelimiting¶
The above ratelimiting is to prevent the “many writes to a single container” bottleneck from causing a problem. There could also be a problem where a single account is just using too much of the cluster’s resources. In this case, the container ratelimits may not help because the customer could be doing thousands of reqs/sec to distributed containers each getting a small fraction of the total so those limits would never trigger. If a system administrator notices this, he/she can set the X-Account-Sysmeta-Global-Write-Ratelimit on an account and that will limit the total number of write requests (PUT, POST, DELETE, COPY) that account can do for the whole account. This limit will be in addition to the applicable account/container limits from above. This header will be hidden from the user, because of the gatekeeper middleware, and can only be set using a direct client to the account nodes. It accepts a float value and will only limit requests if the value is > 0.
Black/White-listing¶
To blacklist or whitelist an account set:
X-Account-Sysmeta-Global-Write-Ratelimit: BLACKLIST
or
X-Account-Sysmeta-Global-Write-Ratelimit: WHITELIST
in the account headers.


The actress celebrated the “Racks in the Middle” rapper’s nominations with a photo on her personal Instagram page. In the photo, Hussle is seen sitting on a car outside of a house. He is wearing a plain black t-shirt, a silver chain and has a handful of money that is visible in the photo. The rapper is seen with a stern face as he looks to one side. He is also wearing a silver diamond stud earring in the photo.
In her caption, London expressed how proud she was of her longtime love and father of her child. She shared that she was “humbled” to have been around him and to witness the work that he put into his music prior to her death. She also made it noted that the rapper was once again nominated for an award for the 2020 music event.
At the time of writing, the photo of Hussle received more than 1 million likes. The photo also received more than 20,000 comments from Hussle and London’s fans.
“So deserving,” one follower wrote.
“We still feel him he not gone,” another fan chimed in.
“You was loved by GREATNESS,” another follower said.
“Nip the great,” another fan wrote.
The Grammy nominations were announced on Wednesday, November 20. According to Hollywood Life, Hussle is nominated for Best Rap Performance and Best Rap Song for “Racks in the Middle.” The rapper is also nominated for Best Rap/Song Collaboration for his DJ Khaled’s “Higher,” which also features John Legend. Once the nominations were announced, Twitter users took to the site to predict their thoughts on if Hussle will take home an award when it premieres in February.
Loading...
“I know Nipsey Hussle is going to get that Grammy and I know I’m going to cry my a** off when Lauren London gives that speech,” one fan predicted on Twitter.
Hussle unexpectedly passed away back in March after being shot and killed by Eric Holder. The rapper was outside of his clothing store, Marathon, when the shooting took place. The rapper’s death sent shockwaves across the world, as he was remembered by millions of fans and multiple people in the music and entertainment industry including YG, DJ Khaled, T.I., Cardi B and several others. In addition to London, Hussle left behind their son, Kross Asghedom and his daughter Emani.


Elizabeth Blackburn -
Currently I am:
Working on the kiosk project for The Wendy's Company
Boning up on the React.JS Flux framework
Planning a feminist revolution
Working on the kiosk project for The Wendy's Company
Boning up on the React.JS Flux framework
Planning a feminist revolution


{% if post.video-url %} The browser doesn't seem to support our video player... new browsers should. {% if post.video-embed-path %} Embed Code {% endif %} {% else %} {% if post.video-twitch-channel %}
The browser doesn't seem to support our video player... new browsers should.


play
stop
mute
max volume
Update Required
To play the media you will need to either update your browser to a recent version or update your
Flash plugin
.


Pig Dice Game
Player 1
Player 2
enter
NEW GAME
Player 1:
Roll
Hold
Dice Roll:
Turn Score:
Total Score:
Player 2:
Roll
Hold
Dice Roll:
Turn Score :
Total Score:


{% if form.instance.pk and form.instance.submissions.exists %}
{% blocktranslate trimmed %}
This access code has already been used. You can't delete it, but you can disable it by setting an expiration date.
{% endblocktranslate %}
{% for submission in form.instance.submissions.all %}


Student Information
| Enrolment Number | |
| Faculty Number | |
| Section | |
| Hall | |
| Registered | |
| Status |
Faculty Information
| Faculty ID | |
| Designation |
Other Information
| Gender | |
| Date of Birth | |
| Address | |
| City | |
| State | |
| Description |
Profile cannot be seen until email is verified and default password is changed
Go to Profile Settings to complete pending tasks


Foreign exchange (FX, forex) risk is the risk of a change in value due to variation in exchange rates be it resulting in a cash flow or recorded value difference. There are several exposures possible: - transaction exposure comes from cash flow changes in relation to contractual obligations. - translation exposure (aka accounting exposure) comes from translations of foreign accounts into home currency for a group account - economic exposure (aka operating, strategy exposure) comes from changes in exchange rates having an effect on sales and/or costs and hence company value. Nokia had a growth in sold phones for example but not a very good growth in sales, if any, due to the decline of the USD.
<!– more –>
Transaction exposure can be in both product price, invoice and realised profit or loss at conversion.

You create a product -> build stocks -> fix the foreign price [potential transaction exposure] -> receive order -> Invoice [actual transaction exposure] -> receive foreign funds -> exchange into local currency [gain or loss due to exchange rate movements]

Translation exposure arrises from assets and liabilities available in more than one currency. It is an account concept and results in adjustments to the balance sheet reserves of the parent company. In most countries there is an account standard abou which exchange rates to take in your books and in general you should stick to the true and fair idea, meaning that you shouldn’t change the way you pick exchange rates without a real reason.

Economic exposure is very wide and far ranging, direct or indirect.

To measure your foreign exchange exposure you can for example use spreadsheets including the revenues and costs over several months into the future and the potential changes in linked exchange rates. Economic exposure is harder to pin down, as it can be made up of quantifiable data and less precise information. A strategic DCF model and/or scenario analysis with the help of e.g. Porter’s five forces would help here.

Market for foreign exchange

The forex market is very complicated but the book will not try to make a forex trader but to be able to understand one. The market is a framework for buying and selling currencies, with this being possible in many markets world-wide, allowing for around the clock trading. There are two markets, namely the interbank (wholesale) and the client (retail) market. A major market for any currency is the home market and international interbank markets are only found in London, New York and Tokyo.

In Aprial 1998 the estimated net turnover in the global forex market wsa USD1,490 billion per working day. In relation to that, the International Monetary Fund released numbers for 1994 statingthat the total volume of goods sold world wide was USD4,314.9 billion. 58% of all forex trading happens in London, New York and Tokyo. 83% of the trading in London was interbank.

A speculator’s purpose is to take risks on market prices for profit while an arbitrageur is trying to optian risk free profits due to price differences in different markets.

The mechanics of foreign exchange

When currencies are bought or sold for immediate delivery (settlement in two working days) they are called spot (exchange) rates. There are two prices, one for buying and one for selling. The direct quote gives you the amount of local currency to buy one unit of foreign currency. In New York, it would be quoted as EUR1 = USD0,9055. The indirect quote gives you the number of units of foreign currency bought with one unit of home currency, e.g. USD1 = EUR1,1523

The spread between the rates for buying and selling currency (bid and offer spread) represents the dealer’s margin. The foreign exchange dealer is the market maker and posting the rates, while the market user takes the rates as given. Bid price is the rate at which the bank buys and the offer rate at which it sells.

When there isn’t liquid market from one currency to another, it might be worthwhile to look at cross rates, meaning that you exchange not directly but via another currency like the USD. You can use simple math to get the next exchange rate. e.g.: EUR/USD * USD/GBP = EUR/GBP.

Another thing are forward exchange contracts, an agreement to deliver a specified amount of one currency for a specified amount of another currency at some future date. This is a forward (exchange) rate. This agreement is binding. If a currency is trading at a discount, the currency is weaker in the forward market, otherwise it would be trading at a premium. Forward rates are either quoted forward outright rate or forward margin: forward outright = Spot + Forward margin

All transactiona are booked at the start of the deal, but the settlement of a forward deal is done at the end of the period, but to a price that has been locked in and booked at the beginning. This brings us to an interesthing concept: interest rate parity. This means that the forward rate will reflect the different in interest rates in the two currencies.

Forward Margin (FM) = [(Period in days) * (Spot rate) * (Foreign currency interest - Local currency interest)] / [360 + {Period in days x Local currency interest}]

This 360 days is just an old habit.

Remember that risk-free gains normally do not arise as arbitrageurs will put them back inline swiftly. There is also risk attached to forwards, e.g. due to the potential default (credit risk) of one of the parties during the deal, meaning you will have to do a new deal to replace the old one. Or the settlement risk when you hold your side but the other party doesn’t pay their share. To get arround this risk, banks will reduce your borrowing limit by 5-15% of the forward value. Remember: banks do not charge fees but make their money through the bid-offer spread.

Here are some advantages in relation to forwards: - fix currency prices - eliminate risk - colculate exact domestic currency value

Premium of the foreign currency means: - corrency string in foreign market - exporter will receive more of his local currency in the future - importer will pay more

In case of a discount - currency weaker in foreign market - exporter will receive less local currency - importer will pay less local currency.

The decision is led by the policy towards risk. Also, if you calculate the forward rate, and believe that the real rate at the time will be different, then there is a reason to go for such a deal. If you are in a high turnover business, with a small net margin, there is also a good reason to take out a forward cover since your margin might become negative by fluctuations in exchange rates alone. I remember one company with a very low margin business where the finance department actually made a good profit for the books due to good exploitation of the financial markets and hedging.

Forecasting foreign exchange rates

Unless you want to hedge all your currency exposure, you need to think about how to decide when to do it. There are four concepts that are said to explain international exchange rates, forming the four-way equivalence model together.

The purchasing power parity (PPP) is based on the idea that something should cost the same everywhere. Higher inflation will lead to adjustments in the exchange rates so that things cost the same again. In the short term, there are too many market imperfections for PPP to hold, but it does seem to work for the long term.

The fisher effect can be put into a formula: 1 + Nominal rate = (1+Real rate)(1+Expected inflation rate) The real rates are thought to be the same worldwide, meaning that differences in nominal rates have to come from differences in the expected inflation rate.

The fisher effect together with PPP makes up the International Fisher effect, saying that interest rate differentials will be reflected in forward exchange rates. This means that on top of a devaluaton of the home currency in case of higher inflation, there will also be an increase in home interest rate relative to the foreign market.

The interest rate parity theory (IRP) is about the idea that the difference between interest rates should be equal to the difference between forward and spot rates of exchange. The arbitrage relationship is key to this parity condition.

Expectations theory is linked to the EMH, meaning all relevant information is reflected in market rates. So the forward rate of exchange reflects what the spot rate in the future will be. All these four theories together give the four-way equivalence model, meaning that they all come to the same conclusion. (Forward - Spot rates = interest rates difference)

There is actually a Big Mac index, linked to PPP, which actually allows some prediction on future movements. Yes, that’s the price of Big Macs in different countries.

To forecast future exchange rates, some look at movements in a country’s capital account (movements in financial investments) and current account (movements of import and export). e.g. if the current account goes into a deficit, there will be a bigger demand for foreign currency to pay for those imports and that will put pressure on the exchange rate.

The monetarist approach is about looking at the money supply.

Technical analysis is rather about a long term study of the market over time, with the chartists using graphics of prices and trading volumes. They believe the market takes long to reflect new information, while fundamental analysts state that the EMH would not allow for such a thing to take place. The EMH might not hold on the currency markets though as some countries might support a set currency over the long term.

If you have different estimates you can combine them in currency histograms, weighting them by their perceived reliability.

Forex risk management within the organisation

This depends on how risk averse you are.

Very -> Finance in local currency or hedge Less -> Potential loss and gain is believed to be minimal or to cancel each other out Assymetrical -> hedge when interest costs preferable to exchange losses Aggressive Speculator -> exchange as potential for profit

Multi-divisional organisations needs to decide on (de)centralisation. Departments need to decide on their exposure to currency risks in relation to foreign production or invoicing in foreign currency or how to make capital available. You choice will be between the foreward rate achieved through hedging and the forecast that exists now. The currency hedging for your company depends on the type of business and the size and makeup of the corporation.

Techniques for exposure management

Exposure netting: Two companies in the same group net off the currency accounts that they owe to each other.

Matching: Similar to netting just that here you are matching receipts and payments in a sense.

Pricing adjustments: You adjust prices to match revenue and costs, establishing them in one currency only. Then of course you have exposure in your profits if you use the foreign currency.

Transfer pricing within a company can of course be set fairly liberaly.

Exchange risk guarantees: If there is a benefit for exporting then government might give guarantees.

Long-term borrowing in foreign currencies: Mainly used for reducing economic exposure. you simply finance in USD if your fixed asset are in the US. You also limit transaction exposure for the loan if sales are in the local market. Swaps have a potential here.

Financial instruments: trading in spot, forwards, futures or options.

Credit risk and settlement risk

They are normally lumped together as trade risk. The come from the same route and have a low probability but danger of total loss. You need a cash management system takes care that the security of your cash is protected and it is not lying around more than needed. Most problems of loosing money inside a company are inadvertent mistakes rather than deliberate fraud. Banks record phone calls not due to mistrust but for security and to easily settle disputes.

Trade creditors are normally ranked along with other unsecured creditors. Normally we expect to be paid normally. As current liability creditors we should look at our customer’s current assets as they are our source of payments. You can also request a credit report, which should not be seen as a substiture for your own analysis.

Letters of credit allow for reduction of credit risk by interposing one or more banks between the transactions. They are sometimes called documentary credits and there are lots of variants. There are some choices you need to make. Should it be revocable (cancelable before products shipped) or irrevocable. Does the LC remove the recepient from going directly to the customer? LCs can be confirmed (guarantee of both issuing country bank and local one) or advised. It is also most common for the supplier to fund the shipping period and then be paid. Sometimes LCs are used instead of allowing credits.

A letter of guarantee is about a bank guaranteeing a certain amount in relation to certain events.


Toptal Referral URLs
Referral URL for this page
Copy
My referral hashtag
(get at the Platform)
#
Save


PKCHECK(1) pkcheck PKCHECK(1) NAME pkcheck - Check whether a process is authorized SYNOPSIS pkcheck [--version] [--help] pkcheck [--list-temp] pkcheck [--revoke-temp] pkcheck --action-id action {--process { pid | pid,pid-start-time } | --system-bus-name busname} [--allow-user-interaction] [--enable-internal-agent] [--detail key value...] DESCRIPTION pkcheck is used to check whether a process, specified by either --process or --system-bus-name, is authorized for action. The --detail option can be used zero or more times to pass details about action. If --allow-user-interaction is passed, pkcheck blocks while waiting for authentication. The invocation pkcheck --list-temp will list all temporary authorizations for the current session and pkcheck --revoke-temp will revoke all temporary authorizations for the current session. This command is a simple wrapper around the PolicyKit D-Bus interface; see the D-Bus interface documentation for details. RETURN VALUE If the specified process is authorized, pkcheck exits with a return value of 0. If the authorization result contains any details, these are printed on standard output as key/value pairs using environment style reporting, e.g. first the key followed by a an equal sign, then the value followed by a newline. KEY1=VALUE1 KEY2=VALUE2 KEY3=VALUE3 ... Octects that are not in [a-zA-Z0-9_] are escaped using octal codes prefixed with \. For example, the UTF-8 string fÃ¸l,ä½ å¥½ will be printed as f\303\270l\54\344\275\240\345\245\275. If the specificied process is not authorized, pkcheck exits with a return value of 1 and a diagnostic message is printed on standard error. Details are printed on standard output. If the specificied process is not authorized because no suitable authentication agent is available or if the --allow-user-interaction wasn't passed, pkcheck exits with a return value of 2 and a diagnostic message is printed on standard error. Details are printed on standard output. If the specificied process is not authorized because the authentication dialog / request was dismissed by the user, pkcheck exits with a return value of 3 and a diagnostic message is printed on standard error. Details are printed on standard output. If an error occured while checking for authorization, pkcheck exits with a return value of 127 with a diagnostic message printed on standard error. If one or more of the options passed are malformed, pkcheck exits with a return value of 126. If stdin is a tty, then this manual page is also shown. NOTES Since process identifiers can be recycled, the caller should always use pid,pid-start-time to specify the process to check for authorization when using the --process option. The value of pid-start-time can be determined by consulting e.g. the proc(5) file system depending on the operating system. If only pid is passed to the --process option, then pkcheck will look up the start time itself but note that this may be racy. AUTHENTICATION AGENT pkcheck, like any other PolicyKit application, will use the authentication agent registered for the process in question. However, if no authentication agent is available, then pkcheck can register its own textual authentication agent if the option --enable-internal-agent is passed. AUTHOR Written by David Zeuthen<EMAIL_ADDRESS>with a lot of help from many others. BUGS Please send bug reports to either the distribution or the polkit-devel mailing list, see the link http://lists.freedesktop.org/mailman/listinfo/polkit-devel on how to subscribe. SEE ALSO polkit(8), pkaction(1), pkexec(1), pkttyagent(1) polkit May 2009 PKCHECK(1)


There are a few scheduler solutions avaiable, but few that meet the requirements for a microservices 12 factor app.
What you're looking for is a solution that can scale up with your application. Is adaptable to many different configuration scenarios, guarantees single delivery of scheduled events, and recovers from unscheduled down time.
Typically you don't actualy need the scheduler to execute the job, merely receiving the event that a job needs to be executed is much better. You already have a fully configured server runtime environment, there is no need to replicate that to a 'job-runner'. If you're in the situation that you a long running job that consumes a large amount of resources, this scheduler offers the flexibility to run those jobs in a dedicated environment. So it's the best of both worlds!
Please refer to the documentation for all the details.
Install the scheduler with npm install simple-event-scheduler
.
Be default the SequelizeAdapter expects to find a jobs table:
CREATE TABLE `job` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`channel` varchar(255) NOT NULL,
`active` int NOT NULL,
`cronexp` varchar(255) NULL,
`nextRunAt` datetime NULL,
`intervalSeconds` int NULL,
`lastRunTime`bigint NOT NULL,
`params` varchar(4096) NULL,
`startDate` datetime NULL,
`endDate` datetime NULL,
PRIMARY KEY (id)
);
Note that you can override the name of the table with the SeqeulizeAdapterOptions parameters of the constructor.
The 'jobs' are stored in the database. Database adapters are used to persist the job data in the database of your choice. When many instances of the scheduler are active in your landscape, the ACID transaction on the job record governs which instance gets to emit the event.
The Simple Event Scheduler relies on the configuration of its runtime environment. Therefore you need to instantiate a database adapter with a database connection. The adapter is then passed into the scheduler. In the case of the SequelizeAdapter, you pass in a sequelize instance.
const adapter = new SequelizeAdapter(sequelize);
const scheduler = new SimpleEventScheduler(adapter);
scheduler.start(); //start as needed
scheduler.stop(); //stop as needed.
Upon start, the scheduler will load the active jobs from the database. It will periodically go back to the database, to synchronize with any potential other scheduler instances. The frequency of database access is configurable.
The scheduler supports one-time jobs, that execute at a given time, and recurring jobs. The recurring jobs are created with a cron expression. Internally cron-parser is used to calculate the next required run date and time of the job.
const now = new Date();
const schedDate = new Date(now.getTime() + 1000 * 60 * 60 * 24);
schedDate.setHours(15, 0, 0, 0); //tomorrow at 3pm
return scheduler
.createOnetimeJob("onetimer1", schedDate)
// every 5 seconds
return scheduler
.createRecurringJob("recurring-emit", "*/5 * * * * *")
By default the scheduler emits all the events, for all the jobs.
scheduler.on("jobs", (eventData: any) => {
//call your function here.
});
The string literal "jobs" is the default channel name for events. This default can be changed using the options passed into the scheduler.
The channel for a given job can also be changed using the options passed into the job creation method.
//create a job on the `myemail` channel and setup a listener
return scheduler
.createOnetimeJob("onetimer1", schedDate, {channel:'myemail'})
scheduler.on("myemail", (eventData: any) => {
//call your function here.
});
You can configure the scheduler to only emit jobs for one or a few channels. This facilitates the case where you have some jobs that consume a large amount of resources, or need to be executed in a seperate environment for another reason.
In the example below, only month-end
and and log-archive
events are emitted from that scheduler instance.
const scheduler = new SimpleEventScheduler(adapter, {emittingChannels:['month-end', 'log-archive']});
Simple Event Scheduler is developed and maintained by BinaryOps Software Inc. in Canada.
Generated using TypeDoc


--- layout: default ---
Hay Bales
Cow Bowling
USACO 2010 (Commas)
Contest Timing
Combination Locks
Chilly Willy
Times17
Breed Proximity
Gifts
Escaping The Farm
Content
Code Template
Problem Text
Links


particle cloud server
01 Dec 2015This is not working … as of 12/3/2015 I will just wait for the particle people to update the particle-server with better support for the photon (it is really designed for the particle.
The paticle photon is a great little wifi enabled arduino. The only problem I have is that all read/write using its REST API requires internet acces to a particle.io account. To get around this, you can run a particle cloud server locally.
I am doing all of this on a Debian Jessie server.
install git
sudo apt-get install git
install nodejs (use su to enter su/root)
Following: https://github.com/nodesource/distributions
curl -sL https://deb.nodesource.com/setup_4.x | bash -
apt-get install -y nodejs
Install particle cli
Following: https://github.com/spark/particle-cli
sudo npm install -g particle-cli
Install particle cloud server
Following: https://github.com/spark/spark-server/
git clone https://github.com/spark/spark-server.git
cd spark-server
npm install
node main.js
‘node main.js’ produced
-------
No users exist, you should create some users!
-------
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
Starting server, listening on 8080
static class init!
core keys directory didn't exist, creating... /home/cudmore/spark-server/core_keys
Creating NEW server key
Loading server key from default_key.pem
set server key
server public key is: -----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3oPu+QsNdQaVgk+e4nS
zmTxop7vVamrKdIpio04yoY9pKPmkORAmM0VdFgYKinn094cHERm+LFdDhSAtWtn
TIErdd3o2ntoyZoYLC30Q2Mwvb+AzvGRcrW7jk+72up6YbXMZi2lhRs9M5Qe7use
mXy96PiRP7tYD+Yj+k0t3bDF+lfiWHuuG/yV2/hQaQ8ADfqtWvX4XyLMC9XS2m94
HhFy83sWPcRcB7BZUr1A8w503vB+gZWlt8W+uPlbUmbF+P8LzZmE4Twn87EcMeTB
qGvBxjWypHF95jDzZCie5/glZtunmH905Lb12y1eWLY29KPPk8BcpIzPJ5xc8mKk
gQIDAQAB
-----END PUBLIC KEY-----
Your server IP address is: <IP_ADDRESS>
server started { host: 'localhost', port: 5683 }
Continue setting up particle server
Install dfu-utils
# git clone git://git.code.sf.net/p/dfu-util/dfu-util
sudo apt-get build-dep dfu-util
sudo apt-get install libusb-1.0-0-dev
But that did not work so i did
sudo apt-get upgrade dfu-util
This updated a boat load of things including jre and owncloud (leaving it in maintenance mode). To turn owncloud maintenance mode off, follow this and edit /var/www/owncloud/config/config.php and set ‘maintenance’ => false,’. The next time I logged into my owncloud server it triggered an update to 8.2.1
Try again with particle photon plugged in via usb
Still following: https://github.com/spark/spark-server/
particle keys server default_key.pub.pem <IP_ADDRESS>
gave
cudmore@debian:~/spark-server$ sudo particle keys server default_key.pub.pem <IP_ADDRESS>
running dfu-util -l
Found DFU device 2b04:d006
checking file default_key.pub192_168_1_200.der
spawning dfu-util -d 2b04:d006 -a 1 -i 0 -s 2082 -D default_key.pub192_168_1_200.der
dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to<EMAIL_ADDRESS>dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting # 1 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "DCT Flash "
Downloading to address = 0x00000822, size = 1024
Download [=========================] 100% 1024 bytes
Download done.
File downloaded successfully
Okay! New keys in place, your device will not restart.


Helping my 8 year old son clean his room. Slowly. With tongs. Pretending we’re robots. As you do. 4/21/2019, 9:52:26 AM Favs: 5 Retweets: 0 link
Sources inform me we may have been lobsters rather than robots. Stay tuned. 🤖 🦞 4/21/2019, 9:54:40 AM Favs: 4 Retweets: 0 link


Id: 393
Name: Roy
Status: Alive
Species: Human
Type: Game
Gender: Male
OriginName: Roy: A Life Well Lived
OriginUrl: https://rickandmortyapi.com/api/location/32
LocationName: Roy: A Life Well Lived
LocationUrl: https://rickandmortyapi.com/api/location/32
Image: https://rickandmortyapi.com/api/character/avatar/393.jpeg
Episode: ['https://rickandmortyapi.com/api/episode/13']
Url: https://rickandmortyapi.com/api/character/393
Created: 2018-01-20T19:15:27.239Z


EVENTLOGADM(8) System Administration tools EVENTLOGADM(8) NAME eventlogadm - push records into the Samba event log store SYNOPSIS eventlogadm [-s] [-d] [-h] -o addsource EVENTLOG SOURCENAME MSGFILE eventlogadm [-s] [-d] [-h] -o write EVENTLOG eventlogadm [-s] [-d] [-h] -o dump EVENTLOG RECORD_NUMBER DESCRIPTION This tool is part of the samba(1) suite. eventlogadm is a filter that accepts formatted event log records on standard input and writes them to the Samba event log store. Windows client can then manipulate these record using the usual administration tools. OPTIONS -s FILENAME The -s option causes eventlogadm to load the configuration file given as FILENAME instead of the default one used by Samba. -d The -d option causes eventlogadm to emit debugging information. -o addsource EVENTLOG SOURCENAME MSGFILE The -o addsource option creates a new event log source. -o write EVENTLOG The -o write reads event log records from standard input and writes them to the Samba event log store named by EVENTLOG. -o dump EVENTLOG RECORD_NUMBER The -o dump reads event log records from a EVENTLOG tdb and dumps them to standard output on screen. -h Print usage information. EVENTLOG RECORD FORMAT For the write operation, eventlogadm expects to be able to read structured records from standard input. These records are a sequence of lines, with the record key and data separated by a colon character. Records are separated by at least one or more blank line. The event log record field are: · LEN - This field should be 0, since eventlogadm will calculate this value. · RS1 - This must be the value<PHONE_NUMBER>. · RCN - This field should be 0. · TMG - The time the eventlog record was generated; format is the number of seconds since 00:00:00 January 1, 1970, UTC. · TMW - The time the eventlog record was written; format is the number of seconds since 00:00:00 January 1, 1970, UTC. · EID - The eventlog ID. · ETP - The event type -- one of "INFO", "ERROR", "WARNING", "AUDIT SUCCESS" or "AUDIT FAILURE". · ECT - The event category; this depends on the message file. It is primarily used as a means of filtering in the eventlog viewer. · RS2 - This field should be 0. · CRN - This field should be 0. · USL - This field should be 0. · SRC - This field contains the source name associated with the event log. If a message file is used with an event log, there will be a registry entry for associating this source name with a message file DLL. · SRN - The name of the machine on which the eventlog was generated. This is typically the host name. · STR - The text associated with the eventlog. There may be more than one string in a record. · DAT - This field should be left unset. EXAMPLES An example of the record format accepted by eventlogadm: LEN: 0 RS1:<PHONE_NUMBER> RCN: 0 TMG:<PHONE_NUMBER> TMW:<PHONE_NUMBER> EID: 1000 ETP: INFO ECT: 0 RS2: 0 CRN: 0 USL: 0 SRC: cron SRN: dmlinux STR: (root) CMD ( rm -f /var/spool/cron/lastrun/cron.hourly) DAT: Set up an eventlog source, specifying a message file DLL: eventlogadm -o addsource Application MyApplication | \\ %SystemRoot%/system32/MyApplication.dll Filter messages from the system log into an event log: tail -f /var/log/messages | \\ my_program_to_parse_into_eventlog_records | \\ eventlogadm SystemLogEvents VERSION This man page is correct for version 3.0.25 of the Samba suite. AUTHOR The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. Samba 3.6 06/22/2012 EVENTLOGADM(8)


$ ./program1
$ ./program2 --param1=1
$ ./program3
$ ./program1 | ./program2 --param1=1 | ./program3
Calculate partially invalid string with operations: "28+32+++32++39"
Imperative style = actions that change state from initial state to result
expr, res = "28+32+++32++39", 0
for t in expr.split("+"):
if t != "":
res += int(t)
print res
"28+32+++32++39", 0
"28", 0
"32", 28
"", 60
"", 60
"32", 60
"", 92
"39", 92
131
Functional style = apply transformation (and compositions)
from operator import add
expr = "28+32+++32++39"
print reduce(add, map(int, filter(bool, expr.split("+"))))
"28+32+++32++39"
["28","32","","","32","","39"]
["28","32","32","39"]
[28,32,32,39]
131
>>> operator.add(1,2)
3
>>> operator.mul(3,10)
30
>>> operator.pow(2,3)
8
>>> operator.itemgetter(1)([1,2,3])
2
>>> list(itertools.chain([1,2,3], [10,20,30]))
[1, 2, 3, 10, 20, 30]
>>> list(itertools.chain(*(map(xrange, range(5)))))
[0, 0, 1, 0, 1, 2, 0, 1, 2, 3]
>>> list(itertools.starmap(lambda k,v: "%s => %s" % (k,v),
... {"a": 1, "b": 2}.items()))
['a => 1', 'b => 2']
>>> list(itertools.imap(pow, (2,3,10), (5,2,3)))
[32, 9, 1000]
>>> dict(itertools.izip("ABCD", [1,2,3,4]))
{'A': 1, 'C': 3, 'B': 2, 'D': 4}
>>> name = None
>>> while name is None:
... name = raw_input()
... if len(name) < 2:
... name = None
def get_name():
name = raw_input()
return name if len(name) >= 2 else get_name()
fib(N) -> fib(0,1,N).
fib(_,S,1) -> S;
fib(F,S,N) -> fib(S,F+S,N-1).
sorry...
def add(a, b):
return a + b
add = lambda a,b: a + b
def calculations(a, b):
def add():
return a + b
return a, b, add
Pass function as argument
map(lambda x: x^2, [1,2,3,4,5])
Function returns function as result
def speak(topic):
print "My speach is " + topic
def timer(fn):
def inner(*args, **kwargs):
t = time()
fn(*args, **kwargs)
print "took {time}".format(time=time()-t)
return inner
speaker = timer(speak)
speaker("FP with Python")
I've already saw this...
@timer
def speak(topic):
print "My speach is " + topic
speak("FP with Python")
The process of fixing a number of arguments to a function, producing another function of smaller arity
papply : (((a × b) → c) × a) → (b → c) = λ(f, x). λy. f (x, y)
Oh, never mind...
def log(level, message):
print "[{level}]: {msg}".format(level=level, msg=message)
log("debug", "Start doing something")
log("debug", "Continue with something else")
log("debug", "Finished. Profit?")
def debug(message):
log("debug", message)
Simplify...
def log(level, message):
print "[{level}]: {msg}".format(level=level, msg=message)
from functools import partial
debug = partial(log, "debug")
debug("Start doing something")
debug("Continue with something else")
debug("Finished. Profit?")
The technique of transforming a function that takes multiple arguments in such a way that it can be called as a chain of functions each with a single argument
curry: ((a × b) → c) → (a → (b → c)) = λf. λx. λy. f (x, y)
Oh, never mind...
Segment sum
def simple_sum(a, b):
return sum(range(a, b+1))
>>> simple_sum(1, 10)
55
Squares
def square_sum(a, b):
return sum(map(lambda x: x**2, range(a,b+1)))
>>> square_sum(1,10)
385
Logarithms
def log_sum(a, b):
return sum(map(math.log, range(a,b+1)))
>>> log_sum(1,10)
15.104412573075518
In general...
def fsum(f):
def apply(a, b):
return sum(map(f, range(a,b+1)))
return apply
log_sum = fsum(math.log)
square_sum = fsum(lambda x: x**2)
simple_sum = fsum(int) ## fsum(lambda x: x)
>>> fsum(lambda x: x*2)(1, 10)
110
>>> import functools
>>> fsum(functools.partial(operator.mul, 2))(1, 10)
110
>>> from operator import itemgetter
>>> itemgetter(3)([1,2,3,4,5])
4
>>> from operator import attrgetter as attr
>>> class Speaker(object):
... def __init__(self, name):
... self.name = "[name] " + name
...
>>> alexey = Speaker("Alexey")
>>> attr("name")(alexey)
'[name] Alexey'
>>> from operator import methodcaller
>>> methodcaller("__str__")([1,2,3,4,5])
'[1, 2, 3, 4, 5]'
>>> methodcaller("keys")(dict(name="Alexey", topic="FP"))
['topic', 'name']
>>> values_extractor = methodcaller("values")
>>> values_extractor(dict(name="Alexey", topic="FP"))
['FP', 'Alexey']
>>> methodcaller("count", 1)([1,1,1,2,2])
>>> # same as [1,1,1,2,2].count(1)
3
>>> ss = ["UA", "PyCon", "2012"]
>>> reduce(lambda acc, s: acc + len(s), ss, 0)
11
>>> ss = ["UA", "PyCon", "2012"]
>>> reduce(lambda l,r: l+r, map(lambda s: len(s), ss))
11
>>> ss = ["UA", "PyCon", "2012"]
>>> reduce(operator.add, map(len, ss))
11
>>> map(str, range(5))
['0', '1', '2', '3', '4']
>>> class Speaker(object):
... def __init__(self, name):
... self.name = name
>>> map(Speaker, ["Alexey", "Andrey", "Vsevolod"])
[<__main__.Speaker>, <__main__.Speaker>, <__main__.Speaker>]
>>> map([1,2,3,4,5].count, [1,2,3,10,11])
[1, 1, 1, 0, 0]
def is_interesting(topic):
return topic.contains("FP")
def speak(topic):
print topic
def set_talk(speaker, topic):
speaker["talk"] = topic
return speaker
and everybody knows why
current_speaker = {name: "Alexey Kachayev", talk: "FP with Python"}
def ask_question(question):
print "{name}, I have question {question} about your {talk}"
def quit(reason):
current_speaker = {name: "Andrey Svetlov"} # <-- this will fail
current_speaker["talk"] = "Oh, boring..." # <-- mutable state
def run_conf():
speaker = {name: "Alexey Kachayev", talk: "FP with Python"}
def ask_question(question):
print "{name}, I have question {question} about {talk}"
def quit(reason):
current_speaker["talk"] = "Oh, boring..." # <- same
name = lambda: speaker["name"]
class Speaker(object):
def __init__(self, name, topic):
self.name = name
self.topic = topic
def ask(self, question):
print "{name}, {q}".format(name=self.name, q=question)
def talk(self):
print "I'm starting {topic}".format(topic=self.topic)
me = Speaker("Alexey", "FP with Python")
me.name = "Andrey" # <- WTF???
# or ....
me.set_name("Vsevolod") # <- guys, are you serious???
def ask(self, question):
print "{name}, {q}?".format(name=self["name"], q=question)
def talk(self):
print "I'm starting {topic}".format(topic=self["topic"])
from functools import partial
def cls(**methods):
def bind(self):
return lambda (name, method): (name, partial(method, self))
return lambda **attrs: dict(
attrs.items() + map(bind(attrs.copy()), methods.items())
)
Speaker = cls(ask=ask, talk=talk)
>>> me = Speaker(name="Alexey", topic="FP with Python")
>>> me["name"]
'Alexey'
>>> me["topic"]
'FP with Python'
>>> me["talk"]
<functools.partial object at 0x109798d60>
>>> me["talk"]()
I'm starting FP with Python
>>> me["ask"]
<functools.partial object at 0x109798c58>
>>> me["ask"]("WTF")
Alexey, WTF?
bindings are immutable
def cls(**methods):
def bind(**attrs):
attrs = attrs.copy()
attrs.update(dict(map(lambda (n,m): n, partial(m, attrs),
methods.items())))
return attrs
return bind
class Greeting(object):
def __init__(self, greeting="hello"):
self.greeting = greeting
def greet(self, name):
return "{greet}! {name}".format(greet=self.greeting, name)
hola = Greeting("hola")
print hola.greet("bob")
>>> "hola! bob"
def greet(greeting, target):
return "{greet}! {name}".format(greet=greeting, name)
hola = functools.partial(greet, "hola")
def dct(*items):
def pair((key, value)):
return lambda k: value if k == key else None
def merge(l, r):
return lambda k: l(k) or r(k)
return reduce(merge, map(pair, items), pair((None, None)))
>>> me = dct(("name", "Alexey"), ("topic", "FP with Python"))
>>> me("name")
'Alexey'
>>> me("topic")
'FP with Python'
## use this for cls function
>>> me("ask")("WTF")
Alexey, WTF?
Sure, I know about complexity...
map(lambda x: x*2, [1,2,3])
List(1,2,3).map(_*2)
(map #(* % 2) '(1 2 3))
map (2*) [1,2,3]
https://github.com/kachayev/talks


{% extends 'server_ui/templates/base.html' %} {% block title %}{{ settings.SITE_TITLE }}{% endblock %} {% block header %}
Helios offers verifiable online elections.
We believe democracy is important, whether it’s your book club, parent-teacher association, student government, workers’ union, or state. So we’ve made truly verifiable elections as easy as everything else on the Web.
Helios elections are:
More than 2,000,000 votes have been cast using Helios.
{% if create_p %} create an election {% endif %} {% else %}{{settings.WELCOME_MESSAGE|safe}}
{% if elections|length %}{% for election in elections %}
Select an election to start voting. You will be asked for your voting credentials after you complete a ballot.
{% endif %} {% endif %}


#include <app.h>
Inheritance diagram for TProgInit::
Public Methods | |
| TProgInit (TStatusLine *(*cStatusLine)(TRect), TMenuBar *(*cMenuBar)(TRect), TDeskTop *(*cDeskTop)(TRect)) | |
Protected Attributes | |
| TStatusLine* (* | createStatusLine )(TRect) |
| TMenuBar* (* | createMenuBar )(TRect) |
| TDeskTop* (* | createDeskTop )(TRect) |
The TProgram constructor calls the TProgInit base constructor, passing to it the addresses of three initialization functions that create the status line, menu bar, and desk top.
Definition at line 439 of file app.h.
|
|
The TProgram constructor calls the TProgInit constructor, passing to it the addresses of three init functions. The TProgInit constructor creates a status line, menu bar, and desk top. If these calls are successful, the three objects are inserted into the TProgram group. Variables TProgram::statusLine, TProgram::menuBar and TProgram::deskTop are set to point at these new objects. The TGroup constructor is also invoked to create a full screen view: the video TGroup::buffer and default palettes are initialized and the following TView::state flags are set:
state = sfVisible | sfSelected | sfFocused | sfModal | sfExposed; |
|
|
Creates the desk top with the given size. |
|
|
Creates the menu bar with the given size. |
|
|
Creates the status line with the given size. |


${generalCss}
${appName} runs in Offline mode!
This means the ${launcherName} was not able to contact
the ${operatorName} on startup, and updates could not be checked.
Automatic and manual update checks are also disabled.
Your ${appName} might be out-dated.
You must restart ${appName} to check for updates.


Friend Finder
Looking to make new friends? Answer a few questions to be matched to someone like you.
Enter Survey
API Friends List
|
GitHub Repo


Before Change
while True:
// Use a blocking get() to ensure there"s at least one chunk of data
chunk = buff.get()
if not chunk:
// A falsey value indicates the stream is closed.
break
data = [chunk]
// Now consume whatever other data"s still buffered.
while True:
After Change
The function will block until at least one data chunk is available.
stop = False
while not stop:
// Use a blocking get() to ensure there"s at least one chunk of data.
chunk = buff.get()
data = [chunk]
// Now consume whatever other data"s still buffered.
while True:
try:
data.append(buff.get(block=False))
except queue.Empty:
break
// If `_fill_buffer` adds `None` to the buffer, the audio stream is
// closed. Yield the final bit of the buffer and exit the loop.
if None in data:
stop = True
data.remove(None)
yield b"".join(data)
def _fill_buffer(audio_stream, buff, chunk, stoprequest):


Use the drop down tab to Select a year's dataset to explore. See the guage to see the average tuition cost of a four year university during the given year.


Returns the factorial of a number. The factorial of a number is equal to 1*2*3*...* number.
Syntax
number!
Number is any valid numeric expression
Remarks
If number is negative, the operator returns an error. If number is not an integer, it is truncated.
Example
| Expression | Description (Result) |
|---|---|
| 3! | Factorial of 3, or 1*2*3 (6) |
| -3! | First te factorial is calculated and then the result is negated (-6) |
| (-3)! | Because the number is negative, an error is returned |
| 1.9! | Factorial of the integer of 1.9 (1) |
| 0! | Factorial of 0 (1) |


Adjectives are words used to describe a noun. They are usually used before a noun to give us more information about a noun. You will find adjectives useful when referring to a specific place, thing or person.
| English | Tulu |
|---|---|
| good | eDDae |
| Beautiful | porlu/shOku |
| Big | malla |
| Very big | mAmalla |
| Large | nElya |
| small | elya |
| very much, a lot | mast |
| much, full | dinja/jAsti |
| a little, a bit | vantae/chUru |
| All/whole | mAta / pUra |
| Full, whole | iDi |
| half | ardha |
| some | kelavu |
| many | pAka |
| dirt | naraka/galEji |
| clean | nirmala / sudda |
| Old | para |
| new | posa |
| round/circular | uruNTu |
| straight | sarta / sIda |
| Crooked | orda |
| square | chouka |
| right/correct | sari/sama |
| wrong | tappu |
| wet | chaNDi |
| heavy | dunna |
| light weight | pUntae |
| Costly | piriya |
| inexpensive | agga |
| hard | gaTTi |
| soft | mettanae |
| Raw/fresh | pajji |
| Raw | kAyi |
| Ripe | par'nd |
| Dry | nungel |
| empty | khAli |
| Empty/Only | baji |
| dark | kattalae |
| sweet | chIpae |
| bitter | kaipae |
| tasteless | chappae |
| spicy | khAra |
| sour | puli |
| salty | uppu |
| Hot / warm | bechcha |
| Cool / cold | chauli |
| Thick / Fat | tOra |
| Thin / Skinny | sapura |
| thin | telpu |
| tall | udda |
| short | kudya |
| height | ettara |
| wide | agala |
| tender | latt |
| (well) grown | bulett |
| Wooden | marata |
| Distant | dUrada |
| Nearby | kaitalda/muTTada |
| Happy | sukhata |
| Sorrowful | dukkhada |
| Painful | bEneda |
| Difficult | kashTada / bangada |
| Easy | sulabada |
| Clever | buddhida |
| Lovely | koNDATada / mOkeda |
| Left | eDatta / datta |
| right | balatta |
Demonstrative Adjective Pronouns:
| English | Tulu |
|---|---|
| That / Those | A |
| This / These | I |
| So much / That much | At |
| So much / This much | It |
| Such (Remote) | anchina / anchitti |
| Such (Proximate) | inchina / inchitti |
Interrogative Adjective Pronouns:
| English | Tulu |
|---|---|
| Which | vA |
| How much / How many | Et |
| What / Which | enchi / enchina / enchitti |
| What | dAda |
Indefinite Adjective Pronouns:
| English | Tulu |
|---|---|
| Some / Several | kelavu |
| All | mAta |
| Whole | pUra |
| A (M) | ori |
| A (F) | orti |
| A (N) | onji |
| another | kuDonji |
| Little / Few | vantae / kammi /kaDamae / chUru |
| Many | pAka |
| Much / Many | mast / dinja /jAsti |


NG Repeaters
We will repeat items from data in a repeater.
{{ invoice.task }}
Add
Tasks:
{{ Invoices }}