File App.lua
Functions
| App.defaultFailureHandler (_false, errMsg) | Failure handler which can be used if nothing better springs to mind. |
| App:alertLogE (fmt, ...) | Log error, and display alert message so user knows it's been logged. |
| App:alertLogW (fmt, ...) | Log warning, and display alert message so user knows it's been logged. |
| App:alertLogWE (opts, fmt, ...) | Mostly private method to do guts of alert W & E. |
| App:assert (c, m, ...) | formatted assertion. |
| App:assurePrefSupportFile (presetName) | Assure pref support file, if managed presets. |
| App:call (op, ...) | Call an operation, with optional variable parameters. |
| App:callingAssert (c, m, ...) | formatted calling assertion. |
| App:callingError (m, ...) | Throw an error in calling context, with built-in formatting. |
| App:changeFileDates (params) | Touch file(s) with current time or specified time. |
| App:checkForUpdate (autoMode) | Checks for new version of plugin to download. |
| App:checkSupport () | Check if platform (OS) is supported, and if version of Lightroom is supported. |
| App:classDebugTrace (name, ...) | Output debug info for class if class enabled for debug. |
| App:classDebugTraceFmt (name, fmt, ...) | Output debug info, formatted, for class if class enabled for debug. |
| App:clearAllPrefs (props) | Clear all preferences for this plugin. |
| App:clearBezel () | Clear bezel. |
| App:clearDebugLog () | Clear debug log by moving to trash. |
| App:clearLogFile () | Clear the contents of the log file and the logged error/warning counts. |
| App:createPreset (props) | Create a new preference preset. |
| App:debugStackTrace () | Logs a rudimentary stack trace (function name, source file, line number). |
| App:debugTrace (...) | Does debug trace action provided supporting object has been created, and master debug is enabled. |
| App:deletePrefPreset (props) | Delete preference preset. |
| App:display (opts, fmt, ...) | Display application info message, with options. |
| App:displayError (params, ...) | Display error in progress scope, and optionally include message for log file. |
| App:displayInfo (fmt, ...) | Display application info message - default options. |
| App:displayWarning (params, ...) | Display warning in progress scope, and optionally include message for log file. |
| App:error (m, ...) | Throw an error in executing context, with built-in formatting. |
| App:executeCommand (command, parameters, targets, output, handling, noQuotes, expectedReturnCode) | Executes a shell command. |
| App:findFrameworkResource (name) | Find framework resource reference. |
| App:findResource (name) | Get find plugin or framework resource reference. |
| App:formatErrorMessage (message) | Returns a single string containing filename, line number, and error message - in a pretty format. |
| App:func (her, spec) | Get name of function or calling function... |
| App:getAltKeySeq (key) | Get control keyboard sequence for running platform. |
| App:getAppName () | Get app name, which in general is a close derivative of the plugin name. |
| App:getAuthor () | Get plugin author's name as specified in info-lua. |
| App:getAuthorsWebsite () | Get plugin author's website as specified in info-lua. |
| App:getCompatibilityString () | Returns string for displaying Platform & Lightroom compatibility. |
| App:getCtrlKeySeq (key) | Get control-modified keystroke string for display purposes only. |
| App:getDisplayDimensions () | Get's both maximum and minimum display dimensions, as table { max = { width=..., height=... |
| App:getErrorCount () | Get number of errors logged since logger was cleared (or app startup). |
| App:getFrameworkResource (name) | Get framework resource reference. |
| App:getGlobalPref (name) | Get global preference. |
| App:getGlobalPrefBinding (name, val) | Get binding that uses the proper key. |
| App:getGlobalPrefKey (name) | Get global preference key for binding. |
| App:getGlobalPrefName (key) | Get global preference name given key. |
| App:getGlobalPrefPairs (sortFunc) | Get global preference iterator. |
| App:getInfo (name) | Get property from info-lua. |
| App:getLogFileContents () | Get log file contents as text string. |
| App:getLogFilePath () | Not usually needed, since show-log-file and send-log-file are both app interfaces. |
| App:getLrCompatibilityString () | Get friendly Lr compatibility display string. |
| App:getLrVerMajor () | Get Lr major version number. |
| App:getLrVersionName () | Get Lightroom version name. |
| App:getPathSep () | Get path separator, appropriate for OS. |
| App:getPlatformName () | Get OS platform name. |
| App:getPlatformString () | Get friendly string for displaying Platform compatibility - depends on platform support array defined in info-lua. |
| App:getPluginId () | Get plugin name as specified in info-lua. |
| App:getPluginName () | Get plugin name as specified in info-lua. |
| App:getPluginUrl () | Get plugin url as specified in info-lua. |
| App:getPref (name, presetName, expectedType, default) | Get the value of the specified preference. |
| App:getPrefBinding (name, presetName, val) | Get binding that uses the proper key. |
| App:getPrefKey (name, presetName) | Get preference key for binding. |
| App:getPrefName (key) | Get preference name given key. |
| App:getPrefPairs (sortFunc) | Get local preference iterator. |
| App:getPresetName () | Get active preset name. |
| App:getPresetNameItems () | Get preset names in popup-menu-compatible items format. |
| App:getPresetNames (exclDefault) | Get array of preset names, sorted alphabetically, except Default first. |
| App:getResource (name) | Get plugin or framework resource reference. |
| App:getRunCount () | Get number of times this plugin has been reloaded, or number times Lr has been restarted since prefs were reset. |
| App:getSettingsKey (name) | Get (root) settings key, format undefined, and name. |
| App:getShellName () | Get name of explorer or finder. |
| App:getShortAppName () | Get short version of app-name, for use in cramped spaces (e.g. |
| App:getUserName () | Get name of user. |
| App:getVersionString () | Get plugin version number as a string. |
| App:getWarningCount () | Get number of warnings logged since logger was cleared (or app startup). |
| App:init () | Synchronous initialization |
| App:initDone (s, m) | Asserts (synchronous) initialization is complete. |
| App:initGlobalPref (name, dflt) | Init global preference. |
| App:initPref (name, default, presetName, values) | Make sure support preference is initialized. |
| App:isAdvDbgEna () | Determines if advanced debug functionality is present and enabled. |
| App:isAdvDbgLogOk () | Determine if advanced debug support and logger enabled to go with. |
| App:isClassDebugEnabled (name) | Determine if class-filtered debug mode is in effect, and class of executing method is specifically enabled. |
| App:isDebugEnabled () | Determine if basic app-wide debug mode is in effect. |
| App:isFirstRun () | Determine if this is the first time the plugin has been run, since init, or since prefs cleared. |
| App:isLoggerEnabled () | Determine if app has a logger that can be used. |
| App:isLr3 () | Determines if plugin can support Lr3 functionality. |
| App:isLr4 () | Determines if plugin can support new Lr4 functionality. |
| App:isLrVersionSupported () | Determine if plugin supports current Lightroom version. |
| App:isMacSupported () | Determine if plugin supports Mac OS. |
| App:isPlatformSupported () | Determine if plugin supports current platform. |
| App:isPluginEnabled (name, photo) | Determine if metadata-supporting plugin is enabled. |
| App:isRealMode () | Real mode detection. |
| App:isRelease () | Determines if plugin is in release state. |
| App:isTestMode () | Test mode detection. |
| App:isUser () | Determine if non-anonymous user. |
| App:isVerbose () | Is app operating in verbose/debug mode, or normal. |
| App:isWindowsSupported () | Determine if plugin supports Windows OS. |
| App:loadPrefSupportFile (presetName) | Load default or specified preference support file, or throw error. |
| App:loadProps (props) | Loads (plugin manager) properties from named set or unnamed. |
| App:log (message, ...) | Log info, if more than one param, first is assumed to be a format string. |
| App:logError (message, ...) | Count error and log it with number - supports LOC-based formatting. |
| App:logInfo (message, verbose) | Log info (will append to whatever was "to-be-continued"). |
| App:logInfoToBeContinued (message, ...) | Start or continue log entry, without terminating it. |
| App:logObject (t) | Log any lua variable, including complex tables with cross links. |
| App:logPropertyTable (t, name) | Log an observable property table. |
| App:logStat (fmt, stat, nItemsString) | Log statistical value, but only if non zero. |
| App:logTable (t) | Log a simple key/value table. |
| App:logVerbose (message, ...) | Log verbose info, if more than one param, first is assumed to be a format string. |
| App:logWarning (message, ...) | Count warning and log it with number - supports LOC-based formatting. |
| App:makeFileLink (linkPath, folderPath) | Make file link. |
| App:makeFolderLink (linkPath, folderPath) | Make folder link. |
| App:new (t) | Constructor for new instance object. |
| App:newClass (t) | Constructor for extending class. |
| App:openFileInDefaultApp (file, prompt) | Open file in OS default app. |
| App:parseErrorMessage (message) | Attempts to break an error message (obtained via lua debug object) into pure text message component, filename, and line number as string. |
| App:parseToolkitId (pluginId) | Parse Lr toolkit identifier and return components. |
| App:pcall (t) | Shortcut app pcall |
| App:registerPreset (name, ord) | Register preset. |
| App:resetWarningDialogs () | Reset Lightroom warning dialogs and custom warning dialogs. |
| App:saveProps (props) | Save properties in preferences. |
| App:sendKeys (text, noYield) | Send unmodified keystrokes to lightroom. |
| App:sendMacEncKeys (keys, yieldSpec) | Send mac modified keystrokes to lightroom, in proprietary encoded format as follows: |
| App:sendWinAhkKeys (keys, yieldSpec) | Send windows modified keystrokes to lightroom in AHK encoded format. |
| App:service (t) | Shortcut app pcall |
| App:setGlobalPref (name, val) | Set global preference. |
| App:setPref (name, value, presetName) | Set the specified preference to the specified value. |
| App:setVerbose (verbose) | To support turning verbosity on/off when plugin manager dialog box is not being displayed. |
| App:show (message, ...) | Show info to user - supports formatting. |
| App:showBezel (opts, fmt, ...) | Display momentary message - Like LrDialogs.showBezel, except if called from task, messages are guaranteed to be displayed for at least 1.2 seconds. |
| App:showDebugLog () | Open debug log in default app for viewing. |
| App:showError (info, buttons, cancelButton, otherButton) | Show error to user. |
| App:showInfo (info, actionPrefKey, buttons, cancelButton, otherButton) | Show info to user. |
| App:showLogFile () | Shows log file to user by opening in default app for .log. |
| App:showWarning (info, buttons, cancelButton, otherButton) | Show warning to user. |
| App:sleepTimer (timer, interval) | Sleep until times up, or global shutdown flag set. |
| App:sleepUnlessShutdown (time, incr, doneFunc) | Sleep until times up, or global shutdown flag set. |
| App:switchPreset (props) | Switch to another preference preset. |
| App:touchFile (path, time, justDate) | Touch file(s) with current time or specified time. |
| App:uninstallPlugin () | Updates plugin to new version (must be already downloaded/available). |
| App:updatePlugin () | Updates plugin to new version (must be already downloaded/available). |
| App:waitUnlessShutdown (start, t, incr) | Sleep for a moment if time remaining. |
| App:yield (count, maxCount) | Yield unless too soon. |
| App:yieldIfPossible () | Yield if called from task. |
Functions
- App.defaultFailureHandler (_false, errMsg)
-
Failure handler which can be used if nothing better springs to mind.
Parameters:
-
_false
: First parmameter is always false and can be safely ignored. -
errMsg
: Error message.
Usage:
Generally only used when there is no cleanup handler.
Note: This is NOT a method.
-
- App:alertLogE (fmt, ...)
-
Log error, and display alert message so user knows it's been logged.
Parameters:
-
fmt
: -
...
:
Usage:
Use in contexts when it makes sense for message to stay until user acknowledges it by clicking 'X' in progress scope, namely background process (which actually have their own display method which may be preferred(?) ###1, since it's clearable) or non-modal dialog boxes,
although truth betold, I wonder if it doesn't make more sense to have that stuff built into the UI in that case - hmm... -
- App:alertLogW (fmt, ...)
-
Log warning, and display alert message so user knows it's been logged.
Parameters:
-
fmt
: -
...
:
Usage:
Use in contexts when it makes sense for message to stay until user acknowledges it by clicking 'X' in progress scope, namely background process (which actually have their own display method which may be preferred(?) ###1, since it's clearable) or non-modal dialog boxes,
although truth betold, I wonder if it doesn't make more sense to have that stuff built into the UI in that case - hmm... -
- App:alertLogWE (opts, fmt, ...)
-
Mostly private method to do guts of alert W & E.
Parameters:
-
opts
: (table/structure, required) named options:
we (string, required) either 'w' or 'e' (lower case) to indicate whether warning or error.
holdoff (number, default=1.2) minimum amount of time to block before returning (if called from task).
dur (number, default=3) duration of momentary alert display "prompt". -
fmt
: -
...
:
Usage:
callable directly when non-default options are required.
-
- App:assert (c, m, ...)
-
formatted assertion.
Parameters:
-
c
: -
m
: -
...
:
-
- App:assurePrefSupportFile (presetName)
-
Assure pref support file, if managed presets.
Parameters:
-
presetName
:
-
- App:call (op, ...)
-
Call an operation, with optional variable parameters.
See 'Call' and 'Service' classes for more information.
Parameters:
-
op
: Object encapsulating operation to be performed - must extend the 'Call' class.
Reminder, must include:- name
- main (called as method if object passed)
- (object - if main is a method)
- cleanup (also called as method if object passed).
- async
- guard
-
...
: Passed to main function.
Usage:
Main function call will be wrapped with interactive debug (show-errors) during development,
and regular error handling upon production (finale function or default handler - see Call class).used to return guarded (boolean, default: nil) true iff call did not commence due to guarding.
Return values:
- status (boolean) true means call OK, false means call error, or nil if guarded. (true only means task started if async).
- message (string) nil unless status is false, in which case error message is returned.
-
- App:callingAssert (c, m, ...)
-
formatted calling assertion.
Parameters:
-
c
: -
m
: -
...
:
-
- App:callingError (m, ...)
-
Throw an error in calling context, with built-in formatting.
Parameters:
-
m
: (string, required) error message. -
...
: formating substitutions.
Usage:
Example: if param[1] == nil then app:callingError( "param ^1 must not be nil", paramNumber )
-
- App:changeFileDates (params)
-
Touch file(s) with current time or specified time.
Parameters:
-
params
: (table, required) named parameters:
file (string, required) path to file.
modifiedTime (number) either this or created time is required.
createdTime (number) ditto.
preservePreviousModifiedTime (boolean, default is false)
Usage:
to avoid setting when already set consider checking before calling.
either modifiedTime or createdTime is required, or both.
Examples:
local s, cm, c = app:changeFileDates{ modifiedTime=LrDate.currentTime() } -- touch last-mod. local s, cm, c = app:changeFileDates{ createdTime=LrDate.currentTime() } -- touch created. local s, cm, c = app:changeFileDates{ modifiedTime=now, createdTime=now } -- touch both ('now' set to current time). local s, cm, c = app:changeFileDates{ modifiedTime=LrDate.currentTime() - 86400 } -- set last mod to 24 hours ago. local s, cm, c = app:changeFileDates{ createdTime=LrDate.currentTime() - 86400 } -- set created to 24hours ago. local s, cm, c = app:changeFileDates{ modifiedTime=now, createdTime=LrDate.currentTime() - 86400 } -- created 24 hours ago, modified now.
Return values:
- status
- message
- content
-
- App:checkForUpdate (autoMode)
-
Checks for new version of plugin to download.
Parameters:
-
autoMode
: (boolean) set true if its an auto-check-upon-startup mode, so user isn't bothered by version up-2-date message.
Usage:
Requires global xmlRpc object constructed with xml-rpc service URL.
Does not return anything - presents dialog if appropriate...
-
- App:checkSupport ()
-
Check if platform (OS) is supported, and if version of Lightroom is supported. Offer user opportunity to bail if not.
Usage:
Returns nothing - presents dialog if plugin lacks pre-requisite support, and throws error if user opts not to continue.
It is intended that this be called WITHOUT being wrapped by an error handler, so error causes true abortion.
Init.lua is a good candidate...
- App:classDebugTrace (name, ...)
-
Output debug info for class if class enabled for debug.
Parameters:
-
name
: -
...
:
Usage:
Typically this is not called directly, but instead by way of the Debug.logn function returned by the class constructor or object registrar. Still, it is available to be called directly if desired.
Pre-requisite: advanced debug enabled, and logger enabled (@2010-11-22 - the latter always is).
See advanced-debug class for more information.
-
- App:classDebugTraceFmt (name, fmt, ...)
-
Output debug info, formatted, for class if class enabled for debug.
Parameters:
-
name
: -
fmt
: -
...
:
Usage:
Typically this is not called directly, but instead by way of the Debug.logn function returned by the class constructor or object registrar. Still, it is available to be called directly if desired.
Pre-requisite: advanced debug enabled, and logger enabled (@2010-11-22 - the latter always is).
See advanced-debug class for more information.
-
- App:clearAllPrefs (props)
-
Clear all preferences for this plugin.
Parameters:
-
props
:
Usage:
Generally only called in response to button press when adv-Debug.logn-enabled and prefs are managed.
but could be called in init-lua or wherever if you like - for testing and debug only...Works for managed as well as un-managed preferences.
-
- App:clearBezel ()
- Clear bezel.
- App:clearDebugLog ()
-
Clear debug log by moving to trash.
Usage:
wrapped internally
- App:clearLogFile ()
- Clear the contents of the log file and the logged error/warning counts.
- App:createPreset (props)
-
Create a new preference preset.
Parameters:
-
props
:
-
- App:debugStackTrace ()
-
Logs a rudimentary stack trace (function name, source file, line number).
Usage:
No-op when advanced debugging is disabled.
- App:debugTrace (...)
-
Does debug trace action provided supporting object has been created, and master debug is enabled.
Typically this is not called directly, but instead by way of the Debug.logn function returned by the class constructor or object registrar. Still, it is available to be called directly if desired.
Parameters:
-
...
:
Usage:
Pre-requisite: advanced debug enabled, and logger enabled (@2010-11-22 - the latter always is).
See advanced-debug class for more information.
-
- App:deletePrefPreset (props)
-
Delete preference preset.
Parameters:
-
props
: - get re-loaded from defaults, or if default set is being "deleted" (reset), then they're reloaded from saved default values.
Usage:
which is governed by global preset name pref.
-
- App:display (opts, fmt, ...)
-
Display application info message, with options.
Parameters:
-
opts
: (table/structure, optional) options:
dur (number, default=3) duration in seconds. -
fmt
: -
...
:
Usage:
Info will be displayed in bezel, or pseudo-bezel.
nothing returned, never throws an error (hopefully ;-}).
-
- App:displayError (params, ...)
-
Display error in progress scope, and optionally include message for log file.
Parameters:
-
params
: (table, default={} ) disp/log parameters - see examples. -
...
:
Usage:
Examples:
app:displayError() -- displays generic "see log file" message, but logs nothing. (use only if error message logged in calling context). app:displayError( "trouble - ^1", errm ) -- log error and display truncated version of it. app:displayError{ disp="display me" } -- displays custom message, but log nothing. app:displayError{ log="log me" } -- displays custom log message, and generic disp message: "see log file". app:displayError{ disp="display me", log="log ^1", "me" } -- called using table params instead. Note: varargs are intra-table, and apply to log msg (no fmtx subs for disp msg).@24/May/2013 21:05, this message will be displayed until user acknowledges it (cancels scope), so only appropriate for background tasks, not foreground services.
-
- App:displayInfo (fmt, ...)
-
Display application info message - default options.
Parameters:
-
fmt
: -
...
:
Usage:
Info will be displayed in bezel, or pseudo-bezel.
nothing returned, never throws an error (hopefully ;-}).
-
- App:displayWarning (params, ...)
-
Display warning in progress scope, and optionally include message for log file.
Parameters:
-
params
: (table, default={} ) disp/log parameters - see examples. -
...
:
Usage:
Examples:
app:displayWarning() -- displays generic "see log file" message, but logs nothing. (use only if warning message logged in calling context). app:displayWarning( "potential trouble - ^1", msg ) -- log warning and display truncated version of it. app:displayWarning{ disp="display me" } -- displays custom message, but log nothing. app:displayWarning{ log="log me" } -- displays custom log message, and generic disp message: "see log file". app:displayWarning{ disp="display me", log="log ^1", "me" } -- called using table params instead. Note: varargs are intra-table, and apply to log msg (no fmtx subs for disp msg). -
- App:error (m, ...)
-
Throw an error in executing context, with built-in formatting.
Parameters:
-
m
: (string, required) error message. -
...
: formating substitutions.
Usage:
Example: if var == nil then app:error( "var ^1 must not be nil", varNumber )
-
- App:executeCommand (command, parameters, targets, output, handling, noQuotes, expectedReturnCode)
-
Executes a shell command.
Although the format for command/params... is platform independent, the command itself may not be. For example:
'exiftool' may be all that is needed to reference a pre-installed version of exiftool on Mac. However, full path may be required on windows, since exiftool installer does not automatically add exiftool to path.
Parameters:
-
command
: (string, required) A pathed command name, or absolute path to executable. -
parameters
: (string or array, optional) Example string: '-G -p "asdf qwerty"' or table: { "-p", "-it=me" } -
targets
: (string or array, optional) An array of multiple filenames, or single target string. -
output
: (string, optional) Path to file where command output will be re-directed, or nil for let method decide. -
handling
: (string, optional) nil or '' => do nothing with output, 'get' => retrieve output as string, 'del' => retrieve output as string and delete output file. -
noQuotes
: (boolean, optional) set true to keep from over-wrapping with quotes - do code search to see use cases. -
expectedReturnCode
: (number, optional) if not passed, zero is assumed.
Usage:
Quotes will be added where necessary depending on platform. The only exception to this is when something in parameter string needs to be quoted.
calling context can choose to alter parameters based on user and/or debug mode in order to keep output file(s) for perusal if desired.
Return values:
- status (boolean): true iff successful.
- command-or-error-message(string): command if success, error otherwise.
- content (string): content of output file, if out-handling > 0.
-
- App:findFrameworkResource (name)
-
Find framework resource reference.
Parameters:
-
name
:
Usage:
Only use I know of at present is for displaying a vf-picture.
Supports png - Lr doc says what else...
Assures resource comes from framework and not user plugin resource.
Return value:
- abs path or nil if no resource. If Adobe changes type, so will this function.
-
- App:findResource (name)
-
Get find plugin or framework resource reference.
Parameters:
-
name
:
Usage:
Only use I know of at present is for displaying a vf-picture.
Supports png - Lr doc says what else...
Resource will be searched for in all require-paths, so plugin resources take priority (as long as they are in folder called 'Resource'). but will also return framework resources.
Return value:
- abs path or nil if no resource. If Adobe changes type, so will this function.
-
- App:formatErrorMessage (message)
-
Returns a single string containing filename, line number, and error message - in a pretty format.
Parameters:
-
message
:
-
- App:func (her, spec)
-
Get name of function or calling function...
Parameters:
-
her
: -
spec
: (number or string, default=2) 0 for "this" function, 1 for calling function..., or alternate mnemonic for "this" function.
Usage:
for debug message display.
Return value:
- string - never nil nor empty
-
- App:getAltKeySeq (key)
-
Get control keyboard sequence for running platform.
Purpose is so Mac users don't have to be bothered with Windows syntax, nor vice versa.
Parameters:
-
key
:
Usage:
Not for issuing keystrokes but for prompting user.
For example: str:format( 'Press ^1 to save metadata first...', app:getCtrlKeySeq( 's' ) )
Sorry about the Windows bias to the method name.
-
- App:getAppName ()
-
Get app name, which in general is a close derivative of the plugin name.
Usage:
I use different plugin names for distinguishing test/dev version and release version, but same appname for both.
- App:getAuthor ()
-
Get plugin author's name as specified in info-lua.
Return value:
- string: never nil, blank only if explicitly set to blank in info-lua, otherwise something like "unknown".
- App:getAuthorsWebsite ()
-
Get plugin author's website as specified in info-lua.
Return value:
- string: never nil, blank only if explicitly set to blank in info-lua, otherwise something like "unknown".
- App:getCompatibilityString ()
-
Returns string for displaying Platform & Lightroom compatibility.
Typically this is used in the plugin manager for informational purposes only. Info for program logic best obtained using other methods, since format returned by this function is not guaranteed.
Return value:
- string: e.g. "Windows+Mac, Lr2 to Lr3"
- App:getCtrlKeySeq (key)
-
Get control-modified keystroke string for display purposes only.
Purpose is so Mac users don't have to be bothered with Windows syntax, nor vice versa.
Parameters:
-
key
:
Usage:
Not for issuing keystrokes but for prompting user.
For example: str:format( 'Press ^1 to save metadata first...', app:getCtrlKeySeq( 's' ) )
Sorry about the Windows bias to the method name.
-
- App:getDisplayDimensions ()
- Get's both maximum and minimum display dimensions, as table { max = { width=..., height=... }, min = { width=..., height=... } }
- App:getErrorCount ()
- Get number of errors logged since logger was cleared (or app startup).
- App:getFrameworkResource (name)
-
Get framework resource reference.
Parameters:
-
name
:
Usage:
Only use I know of at present is for displaying a vf-picture.
Supports png - Lr doc says what else...
Assures resource comes from framework and not user plugin resource.
Return value:
- abs path or nil if no resource. If Adobe changes type, so will this function.
-
- App:getGlobalPref (name)
-
Get global preference.
Parameters:
-
name
: pref name
Usage:
use this instead of setting directly, to make sure the proper key is used.
-
- App:getGlobalPrefBinding (name, val)
-
Get binding that uses the proper key.
UI convenience function that combines getting a proper global preference key, with creating the binding...>/p>
Parameters:
-
name
: pref name -
val
: pref value
Usage:
use this for convenience, or bind directly to get-global-pref-key if you prefer.
-
- App:getGlobalPrefKey (name)
-
Get global preference key for binding.
Parameters:
-
name
: global pref name.
Usage:
not usually needed since there's get-global-pref-binding function,
but this is still needed for binding section synopsis's. -
- App:getGlobalPrefName (key)
-
Get global preference name given key.
Parameters:
-
key
: global pref key.
Usage:
not usually needed, but useful for pref change handler functions when handling arrays of keys.
-
- App:getGlobalPrefPairs (sortFunc)
-
Get global preference iterator.
Parameters:
-
sortFunc
: (boolean or function, default false) pass true for default name sort, or function for custom name sort.
Usage:
for iterating global preferences, without having to wade through non-globals.
Return value:
- iterator function that returns name, value pairs, in preferred name sort order.
Note: the name returned is not a key. to translate to a key, call get-global-pref-key and pass the name. -
- App:getInfo (name)
-
Get property from info-lua.
Parameters:
-
name
: The name of the property to get.
-
- App:getLogFileContents ()
-
Get log file contents as text string.
Invented to support Dialog function (kluge) to copy log contents to clipboard.
- App:getLogFilePath ()
- Not usually needed, since show-log-file and send-log-file are both app interfaces. In any case, it may be handy...
- App:getLrCompatibilityString ()
-
Get friendly Lr compatibility display string.
Return value:
- string: e.g. Lr2+Lr3
- App:getLrVerMajor ()
-
Get Lr major version number.
Usage:
Use this if you need to know exact Lr (major) version.
- App:getLrVersionName ()
-
Get Lightroom version name.
Return value:
- e.g. Lightroom 3
- App:getPathSep ()
- Get path separator, appropriate for OS.
- App:getPlatformName ()
-
Get OS platform name.
Return value:
- 'Windows' or 'Mac'.
- App:getPlatformString ()
-
Get friendly string for displaying Platform compatibility - depends on platform support array defined in info-lua.
Return value:
- string: never nil. e.g. Windows+Mac
- App:getPluginId ()
-
Get plugin name as specified in info-lua.
Return value:
- string: required by Lightroom.
- App:getPluginName ()
-
Get plugin name as specified in info-lua.
Return value:
- string: required by Lightroom.
- App:getPluginUrl ()
-
Get plugin url as specified in info-lua.
Return value:
- string: never nil, blank only if explicitly set to blank in info-lua, otherwise something like "unknown".
- App:getPref (name, presetName, expectedType, default)
-
Get the value of the specified preference.
Parameters:
-
name
: Preference property name (format: string without dots). -
presetName
: -
expectedType
: -
default
:
Usage:
Preference may be a member of a named set, or the un-named set.
See Preferences class for more info.
Return value:
- preference value corresponding to name.
-
- App:getPrefBinding (name, presetName, val)
-
Get binding that uses the proper key.
UI convenience function that combines getting a proper preference key, with creating the binding...>/p>
Parameters:
-
name
: pref name -
presetName
: -
val
: pref value
Usage:
*** One can bind directly to props in plugin manager, since set-pref is wired to prop change
this is for prompts outside plugin manager, that will change plugin manager preset pref too.use this for convenience, or bind directly to get-pref-key if you prefer.
-
- App:getPrefKey (name, presetName)
-
Get preference key for binding.
Parameters:
-
name
: pref name. -
presetName
:
Usage:
not usually needed since most preset prefs are defined in plugin manager via binding to props wired to set-pref
and also there's the get-pref-binding function, but this could be used in unusual circumstances maybe - say if local pref being used in section synopsis. -
- App:getPrefName (key)
-
Get preference name given key.
Parameters:
-
key
: pref key.
Usage:
not usually needed, but useful for pref change handler functions when handling arrays of keys.
-
- App:getPrefPairs (sortFunc)
-
Get local preference iterator.
Parameters:
-
sortFunc
: (boolean or function, default false) pass true for default name sort, or function for custom name sort.
Usage:
for iterating local preferences, without having to wade through globals.
Return value:
- iterator function that returns name, value pairs, in preferred name sort order.
Note: the name returned is not a key. to translate to a key, call get-global-pref-key and pass the name. -
- App:getPresetName ()
- Get active preset name.
- App:getPresetNameItems ()
- Get preset names in popup-menu-compatible items format.
- App:getPresetNames (exclDefault)
-
Get array of preset names, sorted alphabetically, except Default first.
Parameters:
-
exclDefault
:
-
- App:getResource (name)
-
Get plugin or framework resource reference.
Parameters:
-
name
:
Usage:
Only use I know of at present is for displaying a vf-picture.
Supports png - Lr doc says what else...
Resource will be searched for in all require-paths, so plugin resources take priority (as long as they are in folder called 'Resource'). but will also return framework resources.
Return value:
- abs path or nil if no resource. If Adobe changes type, so will this function.
-
- App:getRunCount ()
- Get number of times this plugin has been reloaded, or number times Lr has been restarted since prefs were reset.
- App:getSettingsKey (name)
-
Get (root) settings key, format undefined, and name.
Parameters:
-
name
:
-
- App:getShellName ()
- Get name of explorer or finder.
- App:getShortAppName ()
- Get short version of app-name, for use in cramped spaces (e.g. progress scope).
- App:getUserName ()
-
Get name of user.
Note: There is no API for entering a user name, however it will be read from shared properties when available.
It used to be critical before named preferences came along, now its just there in case you want to alter logic slightly depending on user name - I sometimes customize behavior for myself, that other users will never see...
You could make custom versions for a friend or client that does not require a separate plugin nor named preference set.
Return value:
- user's name: typically "_Anonymous_" if none.
- App:getVersionString ()
-
Get plugin version number as a string.
Preferrably without the build suffix, but manageable even with...
Usage:
Correct functioning depends on compatible VERSION format, which is either:
- major/minor/revision, or
- {version-number-string}{white-space}{build-info}Plugin generator & releasor generate compatible version numbers / string format.
If you are using an other build/release tool, just make sure the xml-rpc-server recognizes
the value returned by this method and all should be well.Even if build is tossed in with version number due to omission of expected white-space
it will still work as long as xml-rpc-server understands this...It is up to the xml-rpc-server implementation to make sure if there is a version mismatch between client version and server version, that the server version is always considered "newest".
In other words, a string equality comparison is done, rather than a numerical version comparison,
to determine whether the server version shall be considered "newer".
Return value:
- Unlike some similarly named app methods, the value returned by this one is used
not only for UI display but for checking version number on server via xml-rpc.Returns "unknown" if not parseable from info-lua-VERSION...
- App:getWarningCount ()
- Get number of warnings logged since logger was cleared (or app startup).
- App:init ()
-
Synchronous initialization
Usage:
Called from Init.lua - initialization done here should be relatively quick and not yield or sleep, to eliminate race conditions between startup and intiation of asynchronous services. Use background task for asynchronous initialization ( with post-init termination if nothing periodic/in-the-background to do ).
- App:initDone (s, m)
-
Asserts (synchronous) initialization is complete.
Parameters:
-
s
: -
m
:
Usage:
Call at end of plugin's Init.lua module.
Dumps declared globals to debug log, if advanced debug enabled.
-
- App:initGlobalPref (name, dflt)
-
Init global preference.
Parameters:
-
name
: global pref name. -
dflt
: global pref default value.
Usage:
a-kin to init-pref reglar, cept for global prefs...
-
- App:initPref (name, default, presetName, values)
-
Make sure support preference is initialized.
Because of the way all this pref/prop stuff works, uninitialized prefs can be a problem, since they are saved into props via pairs() function that won't recognize nil items, thus items that should be blanked, may retain bogus values.
Parameters:
-
name
: -
default
: -
presetName
: -
values
:
Usage:
Pref value set to default only if nil.
Make sure init-props is being called to init the props from the prefs afterward.
-
- App:isAdvDbgEna ()
- Determines if advanced debug functionality is present and enabled. May be useful externally before embarking in time consuming loops that are no-op if not enabled.
- App:isAdvDbgLogOk ()
-
Determine if advanced debug support and logger enabled to go with.
Usage:
Typical use for determining whether its worthwhile to embark on some advanced debug support activity.
Consider using Debug proper instead.
Return value:
- boolean: true iff advanced debug functionality is "all-systems-go".
- App:isClassDebugEnabled (name)
-
Determine if class-filtered debug mode is in effect, and class of executing method is specifically enabled.
Typically not called directly, but indirectly by Debug.logn function, although it can be called directly if desired...
Parameters:
-
name
: Full-class-name, or pseudo-class-name(if not a true class) as registered.
-
- App:isDebugEnabled ()
-
Determine if basic app-wide debug mode is in effect.
Synonymous with log-verbose.
- App:isFirstRun ()
- Determine if this is the first time the plugin has been run, since init, or since prefs cleared.
- App:isLoggerEnabled ()
-
Determine if app has a logger that can be used.
Purpose is to circumvent log loops or other functionality that only makes sense if there is a logger.
Presently it does not indicate if the logger is enabled for logging or not, however, if there is a logger, then it is enabled - for now. - Non-logging plugins are not even supported. But they don't have to log anything they don't want to, so it does not have to slow them down much - still the future may change this.
- App:isLr3 ()
-
Determines if plugin can support Lr3 functionality.
Usage:
Returns false in Lr1 & Lr2, true in Lr3, will still return true in Lr4 (assuming deprecated items persist for one & only one version), false in Lr5.
- App:isLr4 ()
-
Determines if plugin can support new Lr4 functionality.
Usage:
Returns false in Lr1, Lr2, & Lr3, true in Lr4, and will still return true in Lr5 (assuming deprecated items persist for one & only one version), false in Lr6.
- App:isLrVersionSupported ()
-
Determine if plugin supports current Lightroom version.
Return value:
- true iff definitely yes.
- App:isMacSupported ()
-
Determine if plugin supports Mac OS.
Return value:
- true if definitely yes, false if definitely no, nil if unspecified.
- App:isPlatformSupported ()
-
Determine if plugin supports current platform.
Return value:
- true if definitely yes, false if definitely no, nil if unspecified.
- App:isPluginEnabled (name, photo)
-
Determine if metadata-supporting plugin is enabled.
Parameters:
-
name
: (string, default dummy_) name of alternative plugin metadata item (property) to be used. -
photo
: (lr-photo, default 1st photo of all) photo to use to check.
Usage:
This method presently only works when a metadata item is defined. Maybe one day it will also work even with no plugin metadata defined.
Only works from an async task.
Return values:
- enabled (boolean) true iff valid property name and plugin is enabled. Throws error if not called from async task.
- error message indicating property name was bad or plugin is disabled.
-
- App:isRealMode ()
-
Real mode detection.
Convenience function for readability: opposite of test mode.
See also:
- App:isRelease ()
-
Determines if plugin is in release state.
Usage:
Its considered a release state if plugin extension is "lrplugin".
- App:isTestMode ()
-
Test mode detection.
Test mode was invented to support test-mode plugin operation, and especially file-ops (rc-common-modules), which were guaranteed not to modify any files unless real mode. For better or for worse, this functionality has been dropped from disk file-system class, but could still be used on an app-by-app basis.
Usage:
If test-mode functionality is desired, then set up a UI and bind to test-mode as global pref.
- App:isUser ()
-
Determine if non-anonymous user.
Return value:
- boolean
- App:isVerbose ()
- Is app operating in verbose/debug mode, or normal.
- App:isWindowsSupported ()
-
Determine if plugin supports Windows OS.
Return value:
- true if definitely yes, false if definitely no, nil if unspecified.
- App:loadPrefSupportFile (presetName)
-
Load default or specified preference support file, or throw error.
Parameters:
-
presetName
:
Usage:
Typically NOT called, since "assure..." is preferred to keep from over-doing it..
-
- App:loadProps (props)
-
Loads (plugin manager) properties from named set or unnamed.
Parameters:
-
props
: The properties to load.
Usage:
Handles case when preference preset manager is installed, or not.
-
- App:log (message, ...)
-
Log info, if more than one param, first is assumed to be a format string.
Parameters:
-
message
: -
...
:
-
- App:logError (message, ...)
-
Count error and log it with number - supports LOC-based formatting.
Parameters:
-
message
: -
...
:
-
- App:logInfo (message, verbose)
-
Log info (will append to whatever was "to-be-continued").
Parameters:
-
message
: informational message -
verbose
: set to App.verbose if the message should only be emitted if verbose logging is enabled.
-
- App:logInfoToBeContinued (message, ...)
-
Start or continue log entry, without terminating it.
Parameters:
-
message
: -
...
:
Usage:
Useful for starting a log line at the entrance to some code block, then finishing it upon exit, depending on status...
-
- App:logObject (t)
-
Log any lua variable, including complex tables with cross links. - debug only
It could use a little primping, but it has served my purpose so I'm moving on.
Parameters:
-
t
:
Usage:
*** Deprecated - please use Debug function instead.
Can not be used to log _G, everything else thrown at it so far has worked.
Example: app:logObject( someTable )
-
- App:logPropertyTable (t, name)
-
Log an observable property table. - debug only
Parameters:
-
t
: -
name
:
Usage:
No-op unless advanced debug logging is enabled.
-
- App:logStat (fmt, stat, nItemsString)
-
Log statistical value, but only if non zero.
Parameters:
-
fmt
: -
stat
: -
nItemsString
:
-
- App:logTable (t)
-
Log a simple key/value table.
Parameters:
-
t
:
Usage:
*** Deprecated - use Debug function instead.
No-op unless advanced debug enabled.
Does not re-curse.
-
- App:logVerbose (message, ...)
-
Log verbose info, if more than one param, first is assumed to be a format string.
Parameters:
-
message
: -
...
:
-
- App:logWarning (message, ...)
-
Count warning and log it with number - supports LOC-based formatting.
Parameters:
-
message
: -
...
:
-
- App:makeFileLink (linkPath, folderPath)
-
Make file link.
Parameters:
-
linkPath
: -
folderPath
:
-
- App:makeFolderLink (linkPath, folderPath)
-
Make folder link.
Parameters:
-
linkPath
: -
folderPath
:
-
- App:new (t)
-
Constructor for new instance object.
Parameters:
-
t
: initial table - optional.
Usage:
Called from init-lua once all globals have been initialized.
Reads info-lua and creates encapsulated worker-bee objects.
-
- App:newClass (t)
-
Constructor for extending class.
Parameters:
-
t
: initial table - optional.
-
- App:openFileInDefaultApp (file, prompt)
-
Open file in OS default app.
Parameters:
-
file
: The file to open. -
prompt
:
Usage:
Presently supports just one file, but could be enhanced to support multiple files.
throws error if attempt fails.
does NOT pre-check for file existence so do so before calling.
Return values:
- status true iff worked (false means user canceled).
- message non-nil iff didn't work.
-
- App:parseErrorMessage (message)
-
Attempts to break an error message (obtained via lua debug object) into pure text message component, filename, and line number as string.
Parameters:
-
message
: (string, required) original error message
Return values:
- error-message sans filename/line-no
- filename or nil
- line number string or nil
-
- App:parseToolkitId (pluginId)
-
Parse Lr toolkit identifier and return components.
Parameters:
-
pluginId
:
-
- App:pcall (t)
-
Shortcut app pcall
Parameters:
-
t
:
-
- App:registerPreset (name, ord)
-
Register preset.
Parameters:
-
name
: -
ord
:
-
- App:resetWarningDialogs ()
-
Reset Lightroom warning dialogs and custom warning dialogs.
Usage:
Be sure to call this instead of the lr-dialogs one.
- App:saveProps (props)
-
Save properties in preferences.
Parameters:
-
props
: The properties to save.
Usage:
file-backing is read-only.
As coded, this only applies to named presets when preset-name property changes.
-
- App:sendKeys (text, noYield)
-
Send unmodified keystrokes to lightroom.
Unmodified meaning not enhanced by Ctrl/Cmd/Option/Alt/Shift...
Parameters:
-
text
: (string or table, required) if string: e.g. "p" or "u", maybe "g"...
if table, text.win and/or text.mac keystroke sequences, and maybe a hint: text.mod.
noYield can be passed as text member or separate parameter. -
noYield
: (boolean or number, default is true) -- yield or msec to sleep after sending keys.
Usage:
Platform agnostic (os specific object does the right thing).
Direct keystrokes at Lightroom proper, NOT dialog boxes, nor metadata fields, ...
Return values:
- status(boolean): true iff command to send keys executed without an error.
- message(string): if status successful: the command issued, else error message (which includes command issued).
-
- App:sendMacEncKeys (keys, yieldSpec)
-
Send mac modified keystrokes to lightroom, in proprietary encoded format as follows:
Parameters:
-
keys
: i.e. mash the modifiers together (any order, case sensitive), followed by a dash, followed by the keystrokes mashed together (order matters, but case does not). -
yieldSpec
: I've found, more times than not, a yield helps the keystrokes take effect. If yielding after sending the keys is causing more harm than good, set this arg to true.
Set to numeric value for sleep before returning.
Usage:
e.g. 'CmdOptionCtrlShift-FS'
Direct keystrokes at Lightroom proper, NOT dialog boxes, nor metadata fields, ...
Return values:
- status(boolean): true iff command to send keys executed without an error.
- message(string): if status successful: the command issued, else error message (which includes command issued).
-
- App:sendWinAhkKeys (keys, yieldSpec)
-
Send windows modified keystrokes to lightroom in AHK encoded format.
Parameters:
-
keys
: i.e. mash the modifiers together (any order, case sensitive), followed by a dash, followed by the keystrokes mashed together (order matters, but case does not). -
yieldSpec
: I've found, more times than not, a yield helps the keystrokes take effect. If yielding after sending the keys is causing more harm than good, set this arg to true.
Set to numeric value for sleep before returning.
Usage:
e.g. '{Ctrl Down}s{Ctrl Up}' - note: {Ctrl}s doesn't cut it - probably whats wrong with vbs/powershell versions.
Direct keystrokes at Lightroom proper, NOT dialog boxes, nor metadata fields, ...
Return values:
- status(boolean): true iff command to send keys executed without an error.
- message(string): if status successful: the command issued, else error message (which includes command issued).
-
- App:service (t)
-
Shortcut app pcall
Parameters:
-
t
:
-
- App:setGlobalPref (name, val)
-
Set global preference.
Parameters:
-
name
: pref name -
val
: pref value
Usage:
use this instead of setting directly, to make sure the proper key is used.
-
- App:setPref (name, value, presetName)
-
Set the specified preference to the specified value.
Parameters:
-
name
: Preference property name (format: string without dots). -
value
: Preference property value (type: simple - string, number, or boolean). -
presetName
:
Usage:
Preference may be a member of a named set, or the un-named set.
See Preferences class for more info.
-
- App:setVerbose (verbose)
-
To support turning verbosity on/off when plugin manager dialog box is not being displayed.
Parameters:
-
verbose
:
-
- App:show (message, ...)
-
Show info to user - supports formatting.
Parameters:
-
message
: -
...
:
Usage:
See Dialog class for param descriptions.
New calling option (info as table): local answer = app:show({ info="^1 is a ^2", actionPrefKey="promptOrNot", buttons={ { label="My OK Button", verb="ok" }, { label="3rd Button", verb='othered' } } }, "Jane", "Doe" ) -- note: buttons still need to be in a table when there's an action-pref. answer = app:show({ info="^1 is a ^2", okButton="My OK Button", cancelButton="Please Dont Cancel", otherButton="3rd Button" }, "John", "Buck" ) -- note: buttons are just strings, returns are fixed.
-
- App:showBezel (opts, fmt, ...)
-
Display momentary message - Like LrDialogs.showBezel, except if called from task, messages are guaranteed to be displayed for at least 1.2 seconds.
Parameters:
-
opts
: (table/structure, optional) named options..
dur (number, default=3) will be clipped into range 1.2-10. If you need greater duration, call multiple times before bezel-time expires.
holdoff (number, default=1.2) If called from task, will return in this many seconds - bezel may continue to be displayed after return;
if not called from task, holdoff is ignored.
unlike it's successor which interpreted negative holdoff to mean (no yield), this method always yields, because it may be required to avoid anamolous duplicate bezel/scope.
It's my hope that "no yield" will never be needed. -
fmt
: (string, required) loc-compatible message to be displayed, with optional ^subs. -
...
: (any, optional) subs - converted to string prior to substitution.
Usage:
Works in all Lr versions - 3 and up; if Lr5+, bezel is used, else modal progress dialog.
Does not need to be called from a task, but such is recommended if possible.
Usually returns in 1.2 seconds, but could be up to 12 seconds if the full 10 simultaneous tasks are in line for the bezel.
Worth noting: bezel display will be unconditionally overwritten by other plugins or Lr itself, thus one can not assume messages displayed in bezel have been or will be seen..
-
- App:showDebugLog ()
-
Open debug log in default app for viewing.
Usage:
wrapped internally
- App:showError (info, buttons, cancelButton, otherButton)
-
Show error to user.
Parameters:
-
info
: -
buttons
: -
cancelButton
: -
otherButton
:
Usage:
See Dialog class for param descriptions.
-
- App:showInfo (info, actionPrefKey, buttons, cancelButton, otherButton)
-
Show info to user.
Parameters:
-
info
: -
actionPrefKey
: -
buttons
: -
cancelButton
: -
otherButton
:
Usage:
See Dialog class for param descriptions.
-
- App:showLogFile ()
-
Shows log file to user by opening in default app for .log.
Usage:
I assume if no default set up, the OS will prompt user to do so(?)
Non-blocking.
- App:showWarning (info, buttons, cancelButton, otherButton)
-
Show warning to user.
Parameters:
-
info
: -
buttons
: -
cancelButton
: -
otherButton
:
Usage:
See Dialog class for param descriptions.
-
- App:sleepTimer (timer, interval)
-
Sleep until times up, or global shutdown flag set.
Parameters:
-
timer
: (App.Timer, required) will be auto-started. -
interval
:
Usage:
Called by background tasks primarily, to sleep in 100 msec (or specified increments up to 1 second), checking shutdown flag each increment.
Returns when time elapsed or shutdown flag set. -
- App:sleepUnlessShutdown (time, incr, doneFunc)
-
Sleep until times up, or global shutdown flag set.
Parameters:
-
time
: (incr, default = .1) amount of time to sleep before calling done-func or checking return time. -
incr
: -
doneFunc
: (function, optional) function which returns true or non-nil to wake "pre-maturely".
Usage:
Called by background tasks primarily, to sleep in 100 msec (or specified increments up to 1 second), checking shutdown flag each increment.
Returns when time elapsed or shutdown flag set. -
- App:switchPreset (props)
-
Switch to another preference preset.
Parameters:
-
props
:
-
- App:touchFile (path, time, justDate)
-
Touch file(s) with current time or specified time.
Parameters:
-
path
: (string, required) file or file-mask. -
time
: (number, default is current time) -
justDate
: (boolean, default is false) -- if true, sets the date only, time will be 12:00Am I assume.
Return values:
- status
- message
- content
-
- App:uninstallPlugin ()
- Updates plugin to new version (must be already downloaded/available).
- App:updatePlugin ()
- Updates plugin to new version (must be already downloaded/available).
- App:waitUnlessShutdown (start, t, incr)
-
Sleep for a moment if time remaining.
Parameters:
-
start
: -
t
: -
incr
:
-
- App:yield (count, maxCount)
-
Yield unless too soon.
Parameters:
-
count
: (number, required) initialize to zero before loop, then pass return value back in, in loop. -
maxCount
: (number, default 20 ) number of calls to burn before actually yielding
Usage:
Use instead of lr-tasks-yield in potentially lengthy loops, to avoid poor performance.
Return value:
- count to be passed back in next call.
-
- App:yieldIfPossible ()
- Yield if called from task.


[gecode-users] staged search
Mikael Zayenz Lagerkvist
zayenz at gmail.com
Thu Oct 9 11:11:32 CEST 2008
On Thu, Oct 9, 2008 at 8:05 AM, Mikael Zayenz Lagerkvist
<zayenz at gmail.com> wrote:
> I tried it (code below), and it works just as you wanted.
Hi again,
Christian pointed out to me that I had a small problem in my posted
code - if the member-function called gave a failure, then things could
go bad. Thus I've modified the code (see below) so that the
member-function returns an ExecStatus that the MemberFunctionBranching
can return.
Cheers,
Mikael
<code>
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Mikael Lagerkvist <lagerkvist at gecode.org>
*
* Copyright:
* Mikael Lagerkvist, 2008
*
* Last modified:
* $Date: 2008-10-09 07:48:15 +0200 (Wed, 09 Oct 2008) $ by
$Author: zayenz $
* $Revision: 7912 $
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#include "examples/support.hh"
#include <gecode/minimodel.hh>
/** \brief Branching for calling a space member function.
*/
template <class Model>
class MemberFunctionBranch : Branching {
public:
/// Type of the member-function to call
typedef ExecStatus (Model::*MemberFunction)();
private:
/// Member function to call
MemberFunction mf;
/// Call member function just once
bool done;
/// Minimal branching description storing no information
struct Description : public BranchingDesc {
/// Initialize description for branching \a b, number of alternatives \a a.
Description(const Branching* b, unsigned int a) : BranchingDesc(b,a) {}
/// Report size occupied
virtual size_t size(void) const { return sizeof(Description); }
};
/// Construct branching
MemberFunctionBranch(Space* home, MemberFunction mf0)
: Branching(home), mf(mf0), done(false) {}
/// Copy constructor
MemberFunctionBranch(Space* home, bool share,
MemberFunctionBranch<Model>& b)
: Branching(home, share, b), mf(b.mf), done(b.done) {}
public:
/// Check status of branching, return true if alternatives left.
virtual bool status(const Space*) const {
return !done;
}
/// Return branching description
virtual BranchingDesc* description(const Space*) const {
assert(!done);
return new Description(this, 1);
}
/// Perform commit
virtual ExecStatus commit(Space* home, const BranchingDesc*, unsigned int) {
done = true;
Model* model = static_cast<Model*>(home);
return (model->*mf)();
}
/// Copy branching
virtual Actor* copy(Space* home, bool share) {
return new (home) MemberFunctionBranch(home, share, *this);
}
/// Reflection name
virtual const char* name(void) const {
return "MemberFunctionBranch";
}
/// Post branching
static void post(Space* home, MemberFunction mf) {
(void) new (home) MemberFunctionBranch<Model>(home,mf);
}
};
/**
* \brief %Example: n-%Queens puzzle with member function branchings
*
* \ingroup ExProblem
*/
class QueensMF : public Example {
protected:
/// Position of queens on boards
IntVarArray q;
public:
ExecStatus addbranch(void) {
branch(this, q, INT_VAR_SIZE_MIN, INT_VAL_MIN);
MemberFunctionBranch<QueensMF>::post(this, &QueensMF::addprop);
return failed() ? ES_FAILED : ES_OK;
}
ExecStatus addprop(void) {
const int n = q.size();
for (int i = 0; i<n; i++)
for (int j = i+1; j<n; j++) {
post(this, q[i] != q[j]);
post(this, q[i]+i != q[j]+j);
post(this, q[i]-i != q[j]-j);
}
return failed() ? ES_FAILED : ES_OK;
}
/// The actual problem
QueensMF(const SizeOptions& opt)
: q(this,opt.size(),0,opt.size()-1) {
MemberFunctionBranch<QueensMF>::post(this, &QueensMF::addbranch);
}
/// Constructor for cloning \a s
QueensMF(bool share, QueensMF& s) : Example(share,s) {
q.update(this, share, s.q);
}
/// Perform copying during cloning
virtual Space*
copy(bool share) {
return new QueensMF(share,*this);
}
/// Print solution
virtual void
print(std::ostream& os) {
os << "\t";
for (int i = 0; i < q.size(); i++) {
os << q[i] << ", ";
if ((i+1) % 10 == 0)
os << std::endl << "\t";
}
os << std::endl;
}
/// Make variables available for visualisation
virtual void
getVars(Gecode::Reflection::VarMap& vm, bool registerOnly) {
vm.putArray(this,q,"q", registerOnly);
}
};
/** \brief Main-function
* \relates QueensMF
*/
int
main(int argc, char* argv[]) {
SizeOptions opt("QueensMF");
opt.iterations(500);
opt.size(6);
opt.parse(argc,argv);
Example::run<QueensMF,DFS,SizeOptions>(opt);
return 0;
}
// STATISTICS: example-any
</code>
--
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
More information about the gecode-users
mailing list


Previous: cpg - Codepage, Up: Shapefile [Contents][Index]
Module (shapefile dbf)
.
Contains auxiliary information about the shapes in the shp file. With one record per shape.
Wikipedia claims that the DBase files should be Version IV 3. The files I have however all use DBase version 3, therefor that is what is supported in the code.
port is an open input port which the data will be read from.
transcoder is an (rnrs io base)
transcoder, which
signifies which charset the data has.
Returns two values. A list of field descriptors See field-descriptor-v3, and a vector of records.
Each record is a list list on the form (bool data ...)
, where
bool is whether or not the record is removed (#t
for
removed, #f
if still there). The remaining data fields
corresponds directly to the fields in the field descriptor list.
However, usually you don’t want to deal with the data that way.
Takes the headers and data returned by load-dbase-file
, and
instead returns a list of association lists. One assoc list per
record (leading boolean removed), with the car
s being the field
names as symbols, and the cdr
s being the values.
Example:
(call-with-values (λ () (load-dbase-file port transcoder)) dbase-build-assoc-list)
Dynamically defining record types, and returning instances would be fancier. However, the utilities for record introspection are lacking, leading to the programmer needing to know the form of the generated records beforehand, defeating the point.
name is the name of the field. type signifies the type of the field, usually unneeded since the values are converted to proper scheme types when reading. See some official reference for proper information.
Previous: cpg - Codepage, Up: Shapefile [Contents][Index]


Vancouver Modern: on the limits of portraiture was made possible by recovering and scanning old photographic slides. Little remains of the pictures exhibited here except where an institution or collector holds a final print.
The author intends this to be the first of two online exhibitions. While Vancouver Modern focuses on works created between 1990 and 2000, Vancouver Modern: part II will pick up where the first left off at the end of the century. The hope is to complete the second by 2024.


“[Mr Jones] wrote that he had never seen wild hazels with worms in them and would like to learn more about them. I sent him both good and wormy nuts from the wild hazel bush to which I had referred. He was so impressed by them that he wished me to dig up the plant and ship it to him, writing that he wished to cross it with filbert pollen as an experiment. I sent it as he asked but before he was able to make the cross he intended, his death occurred. Several years later, his daughter Mildred wrote to me about this hazel bush, asking if I knew where her father had planted it.” — Carl Weschcke, Growing Nuts In the North


The average price based algorithm , namely TWAP and VWAP, represent the first generation of impact-driven algorithms.
These algorithms aim to reduce the effect that buynig/ or selling an stock has on the traded securitys price.
Remember : Buying a large quantity of one stock signals an increase in the demand for the stock. An increase in the demand means that sellers can raise the price.
And Vice Versa !
These Algorithms aim to hide the effect of buying or selling large quantities of stock has on the assests price by hiding the purchase over a certain time frame.


Get Involved
Thanks for your interest in helping out with the EvalAI project! We're a team of volunteers around the world who want to reduce the barrier to entry for doing AI research and make it easier for researchers, students and developers to develop and use state-of-the-art algorithms as a service. We are always listening for suggestions to improve our platform, including identifying bugs and discussing enhancements. Here are different ways in which how you can help:
Report issues
If you identify a bug or run into issues while using the website, or you'd like to suggest some new features or want to get in touch with us, feel free to reach out via our EvalAI Google Group, or contact us at<EMAIL_ADDRESS>Improving and maintaining the site
The EvalAI project is fully open source, and is maintained by a large community of volunteers on GitHub. We are in need of coders and designers so if you would like to help out, please drop us a line! The best way to get started is to write us at<EMAIL_ADDRESS>or ping us on our Gitter Channel.
Press
If you're a journalist who would like to help spread the word about EvalAI or CloudCV, please email<EMAIL_ADDRESS>Partnership
If you are interested in partnering with us to make a bigger impact on the research community, or want to host a challenge of your own, please email admin@cloudcv.org.


Hello!
Welcome to Home Automation 2017.
This is our
CSE1003
project written in node.js!
Log in to use awesomeness!
Login


Azi's favorite places
By the Window
Under the bed
On the cardboard scratchy post
In the kitchen waiting for dinner
Azi is a mellow fellow. Just look at him


API creation made simple, secure and fast.
Building performant, secure and scalable production-ready API has never been faster.
Contributing with Konf.
Join our active community to share, learn, and discover how others are using WeDeploy.
Features
Building performant, secure and scalable landing pages.
Simple commands
Elegant, entirely customizable and fully extensible admin panel with headless CMS capabilities. Configure and manage your API within a few clicks.
Generate static files
Deploy using one command with our intelligent code detection or utilize our services to augment your app with realtime data streaming and search, user authentication, transactional emails and much more.
Data files (.yml)
Check usage metrics, collaborator activities and application logs to troubleshoot bugs. Allow secure communication between services via private network hostname, facilitating database usage.
Schedule, Speakers, Sponsors
Deploy using one command with our intelligent code detection or utilize our services to augment your app with realtime data streaming and search, user authentication, transactional emails and much more.
No dependencies
Check usage metrics, collaborator activities and application logs to troubleshoot bugs. Allow secure communication between services via private network hostname, facilitating database usage.
Themes
Elegant, entirely customizable and fully extensible admin panel with headless CMS capabilities. Configure and manage your API within a few clicks.
$ npm install -g @konf/konf
$ npm install -g konf
$ konf init
select your theme:
- Theme 1
- Theme 2
$ konf init
select your theme:
- Theme 1
- Theme 2
$ npm install -g konf
$ konf init
select your theme:
- Theme 1
- Theme 2
$ konf init
select your theme:
- Theme 1
- Theme 2
$ konf init
select your theme:
- Theme 1
- Theme 2
Getting started
Foolow the steps.
-
1Installing Konf CLI
-
2A powerful and innovative feature set.
-
3A powerful and innovative feature set.


What the papers say – November 16
The Duke of York’s TV interview is the major story on the nation’s front pages on Saturday.
Prince Andrew’s regret over his friendship with convicted paedophile Jeffrey Epstein dominates the papers on Saturday.
The Daily Telegraph, The Times, The Sun and the Daily Mirror focus on the Duke saying he’d “let the side down”.
The Daily Express reports that Prince Andrew faced a grilling.
The i cites Andrew saying he’d let his family down.
Whereas the Daily Mail takes the line that Andrew let the Queen down.
A few papers have steered away from the Duke, with The Guardian and the Financial Times saying Labour is facing a backlash from the business sector over its plan for free broadband across the country.
The Independent says Labour is headed for an internal row over its immigration policies.
And the Daily Star reports on Ian Wright’s fears for his appearance on I’m A Celebrity.


Introduction to the Tydoc documentation system
Authors
Tydoc overview
Bugs
Copyright © 1996-, The Regents of the University of California. All rights reserved.
Last updated: 05/07/98 comments to:
tycho@eecs.berkeley.edu


It is my first time dive deeper into NLP with Python with TextBlob, which is built on the shoulder of NLTK and Pattern. It is very easy to learn and offers a lot of features like sentiment analysis, pos-tagging, tranlation etc.
TextBlob calculates the sentiment of text and returns two properties, polarity, and subjecivity.
Polarity is float which lies in the range of [-1,1] where 1 means positive statement and -1 means a negative statement. Subjective sentences generally refer to personal opinion, emotion or judgment whereas objective refers to factual information. Subjectivity is also a float which lies in the range of [0,1].
Let's check it out by typing some comments you/others made!
{{summary["text"] if summary["text"]!=None }}


WHATSMYFOOD
Personal food review tracking made easy
Over the years, Jon would have chanced upon various dishes in various restaurants.
Jon revisits the restaurant, but couldn't recall the best and terrible dishes that he had there.
Catalogue them using WhatsMyFood and refer them when you revisit the restaurant.


Priti Patel arrogantly says poverty 'isn't the Tory government's fault'
The Social Metrics Commission found there are 14.3million people in poverty in Britain, and councils have suffered years of cuts - but Home Secretary Priti Patel tried to pass the buck to local authorities
by Dan Bloom, Matthew Dresch, https://www.facebook.com/mirrordanbloom, https://www.mirror.co.uk/authors/matthew-dresch/Home Secretary Priti Patel has arrogantly denied poverty is the Government's fault.
The top Tory deflected blame onto councils and others as she tried to absolve her party of responsibility after nearly a decade of cruel austerity.
When told that four in 10 children in parts of Barrow, Cumbria, are born into poverty, she told BBC North West Tonight: “Well it’s appalling.
"But of course everybody, and it’s not just people in Westminster, it’s not just at a national level it’s at a local level.”
Responding to the suggestion that nine years of Tory rule were responsible, she said: “Well it’s not the Government though is it?

Asked if she was saying the Government was not responsible for poverty, she replied: “Well, it’s not.
“Because it’s all parts of society and the structures.
“Local authorities have a role to play, education and public services, which are locally led and locally run.”
It hasn't stopped her husband blaming the Tories for homelessness though.
Bexley councillor Alex Sawyer said in April: "Successive governments have made a pig's ear of the issue of homelessness and house buildings."
Mrs Patel made the comments despite years of swingeing councils cuts under the Tories that have forced town halls to cut jobs and vital services.
In the decade to 2020, councils will have suffered cuts in core funding from the Government of £16billion.
And authorities face an alarming funding gap of £7.8billion by 2025, it was warned last year.
The Mirror previously revealed how foodbank demand has rocketed by 3,772 per cent under a decade of Tory rule.
Bombshell figures show a surge in need from hungry families after nine years of gruelling austerity.
Britain’s biggest foodbank network had 57 outlets open in the final year of the Labour government in 2009/10.
They provided 40,898 aid packages – the equivalent of 368,082 meals. Of those parcels, 13,959 went to children.
By the end of March the network had 425 foodbanks – a 646% increase.
Their volunteers gave away 1,583,668 packages – 14,253,012 meals – in 2018/19. Some 577,618 parcels went to children.
The Social Metrics Commission found there are 14.3million people in poverty in Britain.


Alice's Adventures in Wonderland
by Lewis Carroll
CHAPTER VI
Pig and Pepper
For a minute or two she stood looking at the house, and wondering what to do next, when suddenly a footman in livery came running out of the wood--(she considered him to be a footman because he was in livery: otherwise, judging by his face only, she would have called him a fish)--and rapped loudly at the door with his knuckles. It was opened by another footman in livery, with a round face, and large eyes like a frog; and both footmen, Alice noticed, had powdered hair that curled all over their heads. She felt very curious to know what it was all about, and crept a little way out of the wood to listen.
The Fish-Footman began by producing from under his arm a great letter, nearly as large as himself, and this he handed over to the other, saying, in a solemn tone, 'For the Duchess. An invitation from the Queen to play croquet.' The Frog-Footman repeated, in the same solemn tone, only changing the order of the words a little, 'From the Queen. An invitation for the Duchess to play croquet.'
Then they both bowed low, and their curls got entangled together.
Alice laughed so much at this, that she had to run back into the wood for fear of their hearing her; and when she next peeped out the Fish-Footman was gone, and the other was sitting on the ground near the door, staring stupidly up into the sky.
Alice went timidly up to the door, and knocked.
'There's no sort of use in knocking,' said the Footman, 'and that for two reasons. First, because I'm on the same side of the door as you are; secondly, because they're making such a noise inside, no one could possibly hear you.' And certainly there was a most extraordinary noise going on within--a constant howling and sneezing, and every now and then a great crash, as if a dish or kettle had been broken to pieces.
'Please, then,' said Alice, 'how am I to get in?'
'There might be some sense in your knocking,' the Footman went on without attending to her, 'if we had the door between us.  He was looking up into the sky all the time he was speaking, and this Alice thought decidedly uncivil. 'But perhaps he can't help it,' she said to herself; 'his eyes are so very nearly at the top of his head. But at any rate he might answer questions.--How am I to get in?' she repeated, aloud.
'I shall sit here,' the Footman remarked, 'till tomorrow--'
At this moment the door of the house opened, and a large plate came skimming out, straight at the Footman's head: it just grazed his nose, and broke to pieces against one of the trees behind him.
'--or next day, maybe,' the Footman continued in the same tone, exactly as if nothing had happened.
'How am I to get in?' asked Alice again, in a louder tone.
'Are you to get in at all?' said the Footman. 'That's the first question, you know.'
It was, no doubt: only Alice did not like to be told so. 'It's really dreadful,' she muttered to herself, 'the way all the creatures argue. It's enough to drive one crazy!'
The Footman seemed to think this a good opportunity for repeating his remark, with variations. 'I shall sit here,' he said, 'on and off, for days and days.'
'But what am I to do?' said Alice.
'Anything you like,' said the Footman, and began whistling.
'Oh, there's no use in talking to him,' said Alice desperately: 'he's perfectly idiotic!' And she opened the door and went in.

'There's certainly too much pepper in that soup!' Alice said to herself, as well as she could for sneezing.
There was certainly too much of it in the air. Even the Duchess sneezed occasionally; and as for the baby, it was sneezing and howling alternately without a moment's pause. The only things in the kitchen that did not sneeze, were the cook, and a large cat which was sitting on the hearth and grinning from ear to ear.
'Please would you tell me,' said Alice, a little timidly, for she was not quite sure whether it was good manners for her to speak first, 'why your cat grins like that?'
'It's a Cheshire cat,' said the Duchess, 'and that's why. Pig!'
She said the last word with such sudden violence that Alice quite jumped; but she saw in another moment that it was addressed to the baby, and not to her, so she took courage, and went on again:--
'I didn't know that Cheshire cats always grinned; in fact, I didn't know that cats could grin.'
'They all can,' said the Duchess; 'and most of 'em do.'
'I don't know of any that do,' Alice said very politely, feeling quite pleased to have got into a conversation.
'You don't know much,' said the Duchess; 'and that's a fact.'
Alice did not at all like the tone of this remark, and thought it would be as well to introduce some other subject of conversation. While she was trying to fix on one, the cook took the cauldron of soup off the fire, and at once set to work throwing everything within her reach at the Duchess and the baby --the fire-irons came first; then followed a shower of saucepans, plates, and dishes. The Duchess took no notice of them even when they hit her; and the baby was howling so much already, that it was quite impossible to say whether the blows hurt it or not.
'Oh, please mind what you're doing!' cried Alice, jumping up and down in an agony of terror. 'Oh, there goes his precious nose'; as an unusually large saucepan flew close by it, and very nearly carried it off.
'If everybody minded their own business,' the Duchess said in a hoarse growl, 'the world would go round a deal faster than it does.'
'Which would not be an advantage,' said Alice, who felt very glad to get an opportunity of showing off a little of her knowledge. 'Just think of what work it would make with the day and night! You see the earth takes twenty-four hours to turn round on its axis--'
'Talking of axes,' said the Duchess, 'chop off her head!'
Alice glanced rather anxiously at the cook, to see if she meant to take the hint; but the cook was busily stirring the soup, and seemed not to be listening, so she went on again: 'Twenty-four hours, I think; or is it twelve? I--'
'Oh, don't bother me,' said the Duchess; 'I never could abide figures!'
CHORUS
(In which the cook and the baby joined):--
'Wow! wow! wow!'
While the Duchess sang the second verse of the song, she kept tossing the baby violently up and down, and the poor little thing howled so, that Alice could hardly hear the words:--
'I speak severely to my boy,
I beat him when he sneezes;
For he can thoroughly enjoy
The pepper when he pleases!'
CHORUS
'Wow! wow! wow!'
'Here! you may nurse it a bit, if you like!' the Duchess said to Alice, flinging the baby at her as she spoke. 'I must go and get ready to play croquet with the Queen,' and she hurried out of the room. The cook threw a frying-pan after her as she went out, but it just missed her.
Alice caught the baby with some difficulty, as it was a queer- shaped little creature, and held out its arms and legs in all directions, 'just like a star-fish,' thought Alice. The poor little thing was snorting like a steam-engine when she caught it, and kept doubling itself up and straightening itself out again, so that altogether, for the first minute or two, it was as much as she could do to hold it.


Editing sign up for {{currentMember.name}} {{currentMember.lastName}} ( {{ currentMember.emailAddress}} )


User Login
LogIn
Login With
Registration
Gender
Male
Female
I`m Not Robot
Register
Toggle navigation
Home
Matches
Find Matches
Requests
My Matches
Search
Plans
My Profile
About us
Contact us
Log Out
English
Bangla
English
Bangla
Friends
Home
Friends


At least 15 masked attackers have been killed and four others captured after a group of fighters attacked a border checkpoint in Tajikistan, killing a border guard and a policeman, according to authorities.
The border guard service, in a statement on Wednesday, blamed the Islamic State of Iraq and the Levant (ISIL, or ISIS) armed group for the attack. There was no immediate announcement from ISIL, which has claimed responsibility for previous attacks in Tajikistan, including the killing of foreign cyclists last year.
More:
Tajikistan's National Security Committee said the incident took place overnight on Wednesday on the border with Uzbekistan, some 50km (30 miles) southwest of the capital, Dushanbe.
"As a result of an operation conducted by law enforcement forces, 15 members of an armed criminal group were neutralised and four more attackers detained," the country's interior ministry said.
The committee and interior ministry released photographs, showing badly burned bodies in black military-style outfits, lying on the ground next to wrecked cars.
The attackers crossed into Tajikistan's southern Qabodiyon district from Afghanistan overnight on Sunday and scouted possible targets for the assault, officials said, citing intelligence obtained from the interrogation of detainees.
The committee said the fighters seized five assault rifles during the attack. The interior ministry said four of the attackers' vehicles were destroyed in the shoot-out.
The authorities did not elaborate on the identities of those killed or detained.
The Central Asian country has been on the front line of the global war on illegal drugs as tonnes of heroin, opium and cannabis are smuggled from neighbouring Afghanistan every year.
Drug smuggling accounts for almost a third of Tajikistan's economy, some international reports estimate.


--- layout: page title: Sample blog tagline: Supporting tagline --- {% include JB/setup %}
{{ post.excerpt | markdownify}} » continue reading


It seems like you don't have internet connection. Unfortunately, I cannot show the departures without internet connection.
😔


{{ define "main" }}
The American Red Cross offers training for individuals and teams, and courses that are held entirely in person, or through our blended Simulation Learning experience, which combines online classwork with in-person skills sessions. This way, you can learn on your schedule – and in the way that suits you best. Regardless of which type of course you choose, you'll receive instruction from world-class professionals, as well as science-based information that includes the latest protocols, so you can deliver care to those in need and help improve patient outcomes.
Learning something new only works if it fits into your busy schedule. That's why we use the best methods to teach you the skills you need, when it's most convenient for you.
American Red Cross Basic Life Support for Healthcare Providers (BLS) uses a scenario-based approach to develop the critical thinking and problem-solving skills that drive better patient outcomes. It is consistent with AHA Guidelines for CPR/ECC, and covers breathing and cardiac emergencies – including CPR, AED, and obstructed airway – for adult, child, and infant patients. Courses are delivered by expert instructors and give you the flexibility to complete part of your training online through our dynamic Simulation Learning experience, which combines online coursework with in-person skills sessions, so you can earn your American Red Cross BLS certification your way.
Upon successful completion of this course you will receive a digital certificate for Basic Life Support for Healthcare Providers (BLS) that is valid for two years.
First Aid/CPR/AED training will prepare you to recognize and care for a variety of first aid, breathing, and cardiac emergencies involving adults, children, and infants.
This course meets OSHA/workplace requirements.
The class can be taught in two formats (100% Instructor-Led or Blended-Learning).
Please note: Blended-Learning includes an online portion and an instructor-led classroom skill session. The online portion must be completed prior to attending the in-class portion and must be taken on a PC or tablet with a high-speed Internet connection.
Upon successful completion of this course you will receive a digital certificate for Adult and Pediatric First Aid/CPR/AED that is valid for two years.
Advanced Life Support courses are designed for professional healthcare providers who participate in the assessment and management of critical patients, including those working in in-hospital, pre-hospital, and out-of-hospital medical facilities.
Throughout the ALS course, you will learn how to provide high-quality patient care by integrating rhythm interpretation, electrical interventions, and pharmacologic knowledge with critical thinking, problem-solving, and in-person psychomotor skills practice to achieve the best possible patient outcomes. In the ALS course, you will also learn advanced life support assessment, as well as how to best manage respiratory emergencies, and Advanced Cardiac Life Support (ACLS) protocols for acute arrhythmias, cardiac arrest (including post-cardiac arrest care), acute coronary syndromes and acute stroke within or outside of a medical facility setting.
The only prerequisite for enrollment is that you must be proficient in Adult Basic Life Support (BLS) skills.
PALS courses are designed for professional healthcare providers who participate in the assessment and management of critical patients, including those working in in-hospital, pre-hospital, and out-of-hospital medical facilities.
Throughout the PALS course, you will learn to assess, recognize and provide high-quality care to pediatric patients experiencing life-threatening medical emergencies, including shock, cardiac and respiratory events, as well as how to provide care after the return of spontaneous circulation (ROSC) during a resuscitation effort. In addition, our course will challenge your critical-thinking and problem-solving skills and help improve your teamwork skills to provide better patient care.
The only prerequisite for enrollment is that you must be proficient in Pediatric Basic Life Support (BLS) skills.
Noble Nurses offers the following Instructor Training courses:
If you are interested in becoming a certified American Red Cross Instructor, please contact us. Be sure to include the course or courses you are interested in becoming an instructor for. We will get in contact with you within 24 hours of your submission.


CSS - Position
Div-1: Relative...
Span-1: Absolute - has an ancestoral parent Div-1 with position:Relative, thus postioned based on Div-1 by top: [16px] and left: [10px]
Div-2: Static...
Span-2: Absolute - has no ancestoral parent with position other than static, thus instead of appearing inside Div-2, Span-2 appears based on HTML block, by top: [0px] and left: [60px]
Div-3: Static...
Span-3: Fixed - positioned based on window position by top: [140px] and right: [5px]
Div-4: Static...
Span-4: Relative - moved from its normal position by top: [-10px]and left: [20px]


Uses of Package
org.drip.measure.continuous
| Package | Description |
|---|---|
| org.drip.dynamics.process |
Ito-Dynamics Based Stochastic Process
|
| org.drip.execution.bayesian |
Bayesian Price Based Optimal Execution
|
| org.drip.execution.discrete |
Trajectory Slice Execution Cost Distribution
|
| org.drip.graph.mst |
Agnostic Minimum Spanning Tree Properties
|
| org.drip.learning.kernel |
Statistical Learning Banach Mercer Kernels
|
| org.drip.learning.regularization |
Statistical Learning Empirical Loss Regularizer
|
| org.drip.learning.rxtor1 |
Statistical Learning Empirical Loss Penalizer
|
| org.drip.measure.bayesian |
Prior, Conditional, Posterior Theil Bayesian
|
| org.drip.measure.chisquare |
Chi-Square Distribution Implementation/Properties
|
| org.drip.measure.continuous |
R1 Rd Continuous Random Measure
|
| org.drip.measure.discrete |
Antithetic, Quadratically Re-sampled, De-biased Distribution
|
| org.drip.measure.gamma |
R1 Gamma Distribution Implementation/Properties
|
| org.drip.measure.gaussian |
R1 Rd Covariant Gaussian Quadrature
|
| org.drip.measure.lebesgue |
Uniform Piece-wise Lebesgue Measure
|
| org.drip.portfolioconstruction.asset |
Asset Characteristics, Bounds, Portfolio Benchmarks
|
| org.drip.sequence.functional |
Efron Stein Functional Supremum Bounds
|
| org.drip.sequence.metrics |
Sequence Bounds Agnostic Metrics Estimators
|
| org.drip.sequence.random |
Correlated Multi-Factor Sequence Generator
|
| org.drip.spaces.metric |
Hilbert/Banach Normed Metric Spaces
|
| org.drip.validation.distance |
Hypothesis Target Distance Test Builders
|
-
Classes in org.drip.measure.continuous used by org.drip.dynamics.process Class Description R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.execution.bayesian Class Description R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.execution.discrete Class Description R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.graph.mst Class Description R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.learning.kernel Class Description Rd Rd implements the Base Abstract Class behind Rd Distributions. -
Classes in org.drip.measure.continuous used by org.drip.learning.regularization Class Description R1R1 R1R1 implements the Base Abstract Class behind Bivariate R1 Distributions.RdR1 RdR1 implements the Base Abstract Class behind Rd X R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.learning.rxtor1 Class Description R1R1 R1R1 implements the Base Abstract Class behind Bivariate R1 Distributions.RdR1 RdR1 implements the Base Abstract Class behind Rd X R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.measure.bayesian Class Description MultivariateMeta MultivariateMeta holds a Group of Variable Names - each of which separately is a Valid Single R1/Rd Variable.R1Multivariate R1Multivariate contains the Generalized R1 Multivariate Distributions.R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.measure.chisquare Class Description R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.measure.continuous Class Description MultivariateMeta MultivariateMeta holds a Group of Variable Names - each of which separately is a Valid Single R1/Rd Variable.R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions.R1UnivariateExponential R1UnivariateExponential implements the Univariate R1 Exponential Distribution.R1UnivariateUniform R1UnivariateUniform implements the Univariate R1 Uniform Distribution. -
Classes in org.drip.measure.continuous used by org.drip.measure.discrete Class Description R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.measure.gamma Class Description R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.measure.gaussian Class Description MultivariateMeta MultivariateMeta holds a Group of Variable Names - each of which separately is a Valid Single R1/Rd Variable.R1Multivariate R1Multivariate contains the Generalized R1 Multivariate Distributions.R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.measure.lebesgue Class Description R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions.Rd Rd implements the Base Abstract Class behind Rd Distributions. -
Classes in org.drip.measure.continuous used by org.drip.portfolioconstruction.asset Class Description MultivariateMeta MultivariateMeta holds a Group of Variable Names - each of which separately is a Valid Single R1/Rd Variable. -
Classes in org.drip.measure.continuous used by org.drip.sequence.functional Class Description R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.sequence.metrics Class Description R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.sequence.random Class Description R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions. -
Classes in org.drip.measure.continuous used by org.drip.spaces.metric Class Description R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions.Rd Rd implements the Base Abstract Class behind Rd Distributions. -
Classes in org.drip.measure.continuous used by org.drip.validation.distance Class Description R1Univariate R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions.


'use strict'
const diffOp = require('../operations/diff')
const { omit } = require('lodash')
const { JoiRG, validate, checkValidation } = require('../routes/helpers')
const { PATH_SCHEMA } = require('../routes/schemas')
const optionsSchema = JoiRG.object().keys({
since: JoiRG.number(),
until: JoiRG.number(),
sort: JoiRG.string().valid('asc', 'desc'),
skip: JoiRG.number().integer().min(0),
limit: JoiRG.number().integer().min(0),
reverse: JoiRG.boolean(),
postFilter: JoiRG.string().filter().empty('')
})
const providerSchemas = [PATH_SCHEMA, optionsSchema]
function diff (req) {
const path = req.queryParams.path || req.body.path
const options = omit(req.queryParams, 'path', 'postFilter')
options.postFilter = req.queryParams.postFilter || (req.body && req.body.postFilter)
return diffOp(path, options)
}
diffProvider
Returns diffs for nodes matching the given path pattern and the sorting/slicing/post-filter constraints.
Args:
path
- The path pattern to pick nodes whose diffs should be returned.options
- An optional object, containing any combination of the following keys:since
- The unix timestamp (sec) for the earliest matching event from which to start fetching diffs (inclusive). Precision: 0.1μs. Example: since=1581583228.2800217until
- The unix timestamp (sec) for the latest matching event until which to keep fetching diffs (exclusive). Precision: 0.1μs. Example: until=1581583228.2800217sort
- The primary sort order of records in the result set, sorted by node ID. Default:asc
.skip
- The number records to skip/omit from the result set, starting from the first. Falsey implies none.limit
- The number records to keep in the result set, starting fromskip
or0
. Falsey implies all.reverse
- Whether to invert the individual diffs, so that they can be applied in reverse order. This also reverses the order of diffs within a node.postFilter
- The post-filter expression to apply on the diff result.Return:
The contents of the result returned by the method is identical to the contents of the response body of the corresponding HTTP API, invoked with identical input, except when the method throws an error. In the latter case, the error message would be identical to the error response of the HTTP call.
Errors:
Any error that occurs while executing the method is thrown back to the caller.
Examples:


@(loginForm: Form[web.Application.Login]) @main("Timely Essay | For Quality Service")(loginForm){ Essay
Articles are scholarly pieces of writing giving the author's argument. Essay writing can be quite challenging and time-consuming. It requires that not only one knows the format of proper essay writing but also have the necessary content. The writer has to do some exhaustive and extensive research so as to come up with as much content as possible. More to that, the content has to be in the context.
Whether argumentative, expository, persuasive or analytical essays, relax because we are here to give you a hand. Without regard to the level, whether it is high school, college or any level. We are here to make you a top scorer, with no hassle on your side, by giving you quality content for your study. Our content can assist you write essays, which score high and still get time to attend to other activities and tasks away from your studies such as sports and other extracurricular activities.
}


{% extends "base.html" %} {% block title %}Files{% endblock %} {% set active_page = "files_manager" %} {% block content %} Files manager Bucket name: {{ bucket_name }} Files + Upload new file to this bucket {% endblock %}
Bucket name: {{ bucket_name }}


Copy selected multiple texts with:
Line Break
Space
None
Font size of the new text object (px):
Copyright © 2019 Spinners Inc.


| Class and Description |
|---|
| Device |
| Error |
| HCECard |
| PaymentResponse |
| Price |
| Service |
| ServiceDeliveryToken |
| ServiceDetails |
| ServiceMessage |
| TotalPriceResponse |
| Class and Description |
|---|
| Device |
| Device._Fields
The set of fields this struct contains, along with convenience methods for finding and manipulating them.
|
| Error |
| Error._Fields
The set of fields this struct contains, along with convenience methods for finding and manipulating them.
|
| HCECard |
| HCECard._Fields
The set of fields this struct contains, along with convenience methods for finding and manipulating them.
|
| PaymentResponse |
| PaymentResponse._Fields
The set of fields this struct contains, along with convenience methods for finding and manipulating them.
|
| Price |
| Price._Fields
The set of fields this struct contains, along with convenience methods for finding and manipulating them.
|
| PricePerUnit |
| PricePerUnit._Fields
The set of fields this struct contains, along with convenience methods for finding and manipulating them.
|
| Service |
| Service._Fields
The set of fields this struct contains, along with convenience methods for finding and manipulating them.
|
| ServiceDeliveryToken |
| ServiceDeliveryToken._Fields
The set of fields this struct contains, along with convenience methods for finding and manipulating them.
|
| ServiceDetails |
| ServiceDetails._Fields
The set of fields this struct contains, along with convenience methods for finding and manipulating them.
|
| ServiceMessage |
| ServiceMessage._Fields
The set of fields this struct contains, along with convenience methods for finding and manipulating them.
|
| TotalPriceResponse |
| TotalPriceResponse._Fields
The set of fields this struct contains, along with convenience methods for finding and manipulating them.
|
| Class and Description |
|---|
| Device |
| HCECard |
| PaymentResponse |
| Price |
| PricePerUnit |
| Service |
| ServiceDeliveryToken |
| ServiceDetails |
| ServiceMessage |
| TotalPriceResponse |
Copyright © 2017. All rights reserved.


The Beauty Of Yunnan (云南之美)
My Life Of A Programmer (程序员的人生)
My wechat QR Code:(我的微信二维码)
给我发邮件
Contact (联系我)
I have stories (我有故事)
I used to work and live in Beijing, but now in Kunming Yunnan, It's not sure how long I will stay here, maybe when there isn't
anything new for me. I founded this website just to share my experience with you guys. besides , I'd like to help you, If you
want to travel in Yunnan.
曾经我居住生活在大北京，但是现在我生活在云南昆明，我不确定我要在这里生活多久，也许当一切对于我来说没有什么新鲜感的时候吧。我创办这个
网站仅仅是为了分享我的经历，除此之外我很乐意帮你 如过你打算在云南旅行。


I'm an 18 year old from Grand Rapids Michigan. I'm taking the year off between high school and college to travel and work. Part of this year I will spend at Dev Bootcamp an 9 week intesive programing school. I built this blog while going through the prep work, everything on here I learned from them
I love the seasons espcially christmas but I might be baised cause its christmas while I write this. The way to my hear is with a steak queso beiruto from Qudoba. I hope you enjoy the site, if you have any questoins or comments or just want to chat feel free to email me.