WSGIDaemonProcess¶
| Description: | Configure a distinct daemon process for running applications. |
|---|---|
| Syntax: | WSGIDaemonProcess name [ options ] |
| Context: | server config, virtual host |
The WSGIDaemonProcess
directive can be used to specify that distinct
daemon processes should be created to which the running of WSGI
applications can be delegated. Where Apache has been started as the
root
user, the daemon processes can be run as a user different to that
which the Apache child processes would normally be run as.
When distinct daemon processes are enabled and used, the process is dedicated to mod_wsgi and the only thing that the processes do is run the WSGI applications assigned to that process group. Any other Apache modules such as PHP or activities such as serving up static files continue to be run in the standard Apache child processes.
Note that having denoted that daemon processes should be created by
using the WSGIDaemonProcess
directive, the WSGIProcessGroup
directive, or the process-group
option of WSGIScriptAlias
still
needs to be used to delegate specific WSGI applications to execute within
those daemon processes.
Also note that the name of the daemon process group must be unique for the whole server. That is, it is not possible to use the same daemon process group name in different virtual hosts.
Options which can be supplied to the WSGIDaemonProcess
directive are:
- processes=num
Defines the number of daemon processes that should be started in this process group. If not defined then only one process will be run in this process group.
Note that if this option is defined as
processes=1
, then the WSGI environment attribute calledwsgi.multiprocess
will be set to beTrue
whereas not providing the option at all will result in the attribute being set to beFalse
. This distinction is to allow for where some form of load balancing is used across process groups in the same Apache instance, or separate Apache instances. If you need to ensure thatwsgi.multiprocess
isFalse
so that interactive debuggers will work, simply do not specify theprocesses
option and allow the default single daemon process to be created in the process group.- threads=num
Defines the number of threads to be created to handle requests in each daemon process within the process group.
If this option is not defined then the default will be to create 15 threads in each daemon process within the process group.
Do not get carried away and set this to a very large number in the belief that it will somehow magically enable you to handle many more concurrent users. Any sort of increased value would only be appropriate where your code is I/O bound. If you code is CPU bound, you are better of using at most 3 to 5 threads per process and using more processes.
If you set the number of threads to 0 you will enable a special mode intended for using a daemon process to run a managed set of processes. You will need to use
WSGIImportScript
to pre-load a Python script into the main application group specified by%{GLOBAL}
where the script runs a never ending task, or does an exec to run an external program. If the script or external program exits, the process is shutdown and replaced with a new one. For the case of using a Python script to run a never ending task, aSystemExit
exception will be injected when a signal is received to shutdown the process. You can usesignal.signal()
to register a signal handler forSIGTERM
if needing to run special actions before then exiting the process usingsys.exit()
, or to signal your own threads to exit any processing so you can shutdown in an orderly manner.- display-name=value
Defines a different name to show for the daemon process when using the
ps
command to list processes. If the value is%{GROUP}
then the name will be(wsgi:group)
wheregroup
is replaced with the name of the daemon process group.Note that only as many characters of the supplied value can be displayed as were originally taken up by
argv0
of the executing process. Anything in excess of this will be truncated.This feature may not work as described on all platforms. Typically it also requires a
ps
program with BSD heritage. Thus on some versions of Solaris UNIX the/usr/bin/ps
program doesn’t work, but/usr/ucb/ps
does. Other programs which can display this value includehtop
.- home=directory
Defines an absolute path of a directory which should be used as the initial current working directory of the daemon processes within the process group.
If this option is not defined the initial current working directory will be set to be the home directory of the user that the daemon process is configured to run as using the
user
option to theWSGIDaemonProcess
directive. Otherwise the current working directory of Apache when started will be used, which if Apache is being started from system init scripts, would usually be the system root directory.- user=name | user=#uid
Defines the UNIX user name or numeric user uid of the user that the daemon processes should be run as. If this option is not supplied the daemon processes will be run as the same user that Apache would run child processes, as defined by the User directive, and it is not necessary to set this to the Apache user yourself.
Note that this option is ignored if Apache wasn’t started as the root user, in which case no matter what the settings, the daemon processes will be run as the user that Apache was started as.
Also be aware that mod_wsgi will not allow you to run a daemon process group as the root user due to the security risk of running a web application as root.
- group=name | group=#gid
Defines the UNIX group name or numeric group gid of the primary group that the daemon processes should be run as. If this option is not supplied the daemon processes will be run as the same group that Apache would run child processes, as defined by the Group directive, and it is not necessary to set this to the Apache group yourself.
Note that this option is ignored if Apache wasn’t started as the root user, in which case no matter what the settings, the daemon processes will be run as the group that Apache was started as.
- supplementary-groups=group1 | supplementary-groups=group1,group2
- Defines a list of additional UNIX groups that the user the daemon process group runs as, should be added to, in addition to primary UNIX group associated with that user. When specifying more than one group, separate the names of the groups with a comma.
- umask=0nnn
Defines a value to be used for the umask of the daemon processes within the process group. The value must be provided as an octal number.
If this option is not defined then the umask of the user that Apache is initially started as will be inherited by the process. Typically the inherited umask would be ‘0022’.
- lang=locale
Set the current language locale. This is the same as having set the
LANG
environment variable.You will need to set this on many Linux systems where Apache when started up from system init scripts uses the default C locale, meaning that the default system encoding is ASCII. Unless you need a special language locale, set this to
en_US.UTF-8
.Whether the
lang
orlocale
option works best can depend on the system being used. Set both if you aren’t sure which is appropriate.- locale=locale
Set the current language locale. This is the same as having set the
LC_ALL
environment variable.You will need to set this on many Linux systems where Apache when started up from system init scripts uses the default C locale, meaning that the default system encoding is ASCII. Unless you need a special language locale, set this to
en_US.UTF-8
.Whether the
lang
orlocale
option works best can depend on the system being used. Set both if you aren’t sure which is appropriate.- chroot=directory
- Run the daemon process group process within a chroot jail. Use of a chroot jail is now deprecated due to the difficulty in setting up a chroot environment. It is recommended that you use more modern containerisation technologies such as Docker or runC.
- script-user=name | script-user=#uid
Sets the user that must be the owner of any WSGI script file delegated to be run in the daemon process group. If the owner doesn’t match a HTTP Forbidden response will be returned for any request.
Note that this doesn’t change what user the daemon process group runs as at any time. If you want to set the user that the daemon process group runs as, use the
user
option.Only one of
script-user
orscript-group
option can be used at the same time.- script-group=name | scrip-group=#gid
Sets the group that must be the group of any WSGI script file delegated to be run in the daemon process group. If the group doesn’t match a HTTP Forbidden response will be returned for any request.
Note that this doesn’t change what group the daemon process group runs as at any time. If you want to set the group that the daemon process group runs as, use the
group
option.Only one of
script-user
orscript-group
option can be used at the same time.- python-home=directory
Set the location of the Python virtual environment to be used by the daemon processes. The directory to use is that which
sys.prefix
is set to for the Python virtual environment. The virtual environment can have been created byvirtualenv
,pyvenv
orpython -m venv
.Note that the Python virtual environment must have been created using the same base Python version as was used to compile the mod_wsgi module. You can’t use this to force mod_wsgi to somehow use a different Python version than it was compiled for. If you want to use a different version of Python, you will need to reinstall mod_wsgi, compiling it for the version you want. It is not possible for the one mod_wsgi instance to run applications for both Python 2 and 3 at the same time.
- python-path=directory | python-path=directory:directory
List of colon separated directories to add to the Python module search path, ie.,
sys.path
.Note that this is not strictly the same as having set the
PYTHONPATH
environment variable when running normal command line Python. When this option is used, the directories are added by callingsite.addsitedir()
. As well as adding the directory tosys.path
this function has the effect of opening and interpreting any.pth
files located in the specified directories.If using a Python virtual environment, rather than use this option to refer to the
site-packages
directory of the Python virtual environment, you should use thepython-home
option to specify the root of the Python virtual environment instead.In all cases, if the directory contains Python packages which have C extension components, those packages must have been installed using the same base Python version as was used to compile the mod_wsgi module. You should not mix packages from different Python versions or installations.
- python-eggs=directory
Directory to be used as the Python egg cache directory. This is equivalent to having set the
PYTHON_EGG_CACHE
environment variable.Note that the directory specified must exist and be writable by the user that the daemon process run as.
- restart-interval=nnn
Defines a time limit on how long a daemon process should run before being restarted.
This might be use to periodically force restart the WSGI application processes when you have issues related to Python object reference count cycles, or incorrect use of in memory caching, which causes constant memory growth.
If this option is not defined, or is defined to be 0, then the daemon process will be persistent and will continue to service requests until Apache itself is restarted or shutdown.
Avoid setting this too low. This is because the constant restarting and reloading of your WSGI application may cause unecessary load on your system and affect performance.
You can use the
graceful-timeout
option in conjunction with this option to reduce the chances that an active request will be interrupted when a restart occurs due to the use of this option.- maximum-requests=nnn
Defines a limit on the number of requests a daemon process should process before it is shutdown and restarted.
This might be use to periodically force restart the WSGI application processes when you have issues related to Python object reference count cycles, or incorrect use of in memory caching, which causes constant memory growth.
If this option is not defined, or is defined to be 0, then the daemon process will be persistent and will continue to service requests until Apache itself is restarted or shutdown.
Avoid setting this to a low number of requests on a site which handles a lot of traffic. This is because the constant restarting and reloading of your WSGI application may cause unecessary load on your system and affect performance. Only use this option if you have no other choice due to a memory usage issue. Stop using it as soon as any memory issue has been resolved.
You can use the
graceful-timeout
option in conjunction with this option to reduce the chances that an active request will be interrupted when a restart occurs due to the use of this option.- inactivity-timeout=sss
Defines the maximum number of seconds allowed to pass before the daemon process is shutdown and restarted when the daemon process has entered an idle state. For the purposes of this option, being idle means there are no currently active requests and no new requests are being received.
This option exists to allow infrequently used applications running in a daemon process to be restarted, thus allowing memory being used to be reclaimed, with process size dropping back to the initial startup size before any application had been loaded or requests processed.
Note that after any restart of the WSGI application process, the WSGI application will need to be reloaded. This can mean that the first request received by a process after the process was restarted can be slower. If you WSGI application has a very high startup cost on CPU and time, it may not be a good idea to use the option.
See also the
request-timeout
option for forcing a process restart when requests block for a specified period of time.Note that similar functionality to that of the
request-timeout
option, for forcing a restart when requests blocked, was part of what was implemented by theinactivity-timeout
option. The request timeout was broken out into a separate feature in version 4.1.0 of mod_wsgi.- request-timeout=sss
Defines the maximum number of seconds that a request is allowed to run before the daemon process is restarted. This can be used to recover from a scenario where a request blocks indefinitely, and where if all request threads were consumed in this way, would result in the whole WSGI application process being blocked.
How this option is seen to behave is different depending on whether a daemon process uses only one thread, or more than one thread for handling requests, as set by the
threads
option.If there is only a single thread, and so the process can only handle one request at a time, as soon as the timeout has passed, a restart of the process will be initiated.
If there is more than one thread, the request timeout is applied to the average running time for any requests, across all threads. This means that a request can run longer than the request timeout. This is done to reduce the possibility of interupting other running requests, and causing a user to see a failure. So where there is still capacity to handle more requests, restarting of the process will be delayed if possible.
- deadlock-timeout=sss
Defines the maximum number of seconds allowed to pass before the daemon process is shutdown and restarted after a potential deadlock on the Python GIL has been detected. The default is 300 seconds.
This option exists to combat the problem of a daemon process freezing as the result of a rogue Python C extension module which doesn’t properly release the Python GIL when entering into a blocking or long running operation.
- startup-timeout=sss
Defines the maximum number of seconds allowed to pass waiting to see if a WSGI script file can be loaded successfully by a daemon process. When the timeout is passed, the process will be restarted.
This can be used to force the reloading of a process when a transient issue occurs on the first attempt to load the WSGI script file, but subsequent attempts still fail because a Python package that was loaded has retained state that prevents attempts to run initialisation a second time within the same process. The Django package can cause this scenario as the initialisation of Django itself can no longer be attempted more than once in the same process.
- graceful-timeout=sss
- When
maximum-requests
is used and the maximum has been reached, orcpu-time-limit
is used and the CPU limit reached, orrestart-interval
is used and the time limit reached, ifgraceful-timeout
is set, then the process will continue to run for the number of second specified by this option, while still accepting new requests, to see if the process reaches an idle state. If the process reaches an idle state, it will then be resarted immediately. If the process doesn’t reach an idle state and the graceful restart timeout expires, the process will be restarted, even if it means that requests may be interrupted. - eviction-timeout=sss
When a daemon process is sent the graceful restart signal, usually
SIGUSR1
, to restart a process, this timeout controls how many seconds the process will wait, while still accepting new requests, before it reaches an idle state with no active requests and shutdown.If this timeout is not specified, then the value of the
graceful-timeout
will instead be used. If thegraceful-timeout
is not specified, then the restart when sent the graceful restart signal will instead happen immediately, with the process being forcibly killed, if necessary, when the shutdown timeout has expired.- shutdown-timeout=sss
Defines the maximum number of seconds allowed to pass when waiting for a daemon process to shutdown. When this timeout has been reached the daemon process will be forced to exited even if there are still active requests or it is still running Python exit functions. The shutdown timeout is applied after any graceful restart timeout or eviction timeout if they have been specified. No new requests are accepted during the shutdown timeout is being applied.
If this option is not defined, then the shutdown timeout will be set to 5 seconds. Note that this option does not change the shutdown timeout applied to daemon processes when Apache itself is being stopped or restarted. That timeout value is defined internally to Apache as 3 seconds and cannot be overridden.
- connect-timeout=sss
- Defines the maximum amount of time for an Apache child process to wait trying to get a successful connection to the mod_wsgi daemon processes. This defaults to 15 seconds.
- socket-timeout=sss
- Defines the timeout on individual reads/writes on the socket connection between the Apache child processes and the mod_wsgi daemon processes. If this is not specified, the number of seconds specified by the Apache Timeout directive will be used instead.
- queue-timeout=sss
Defines the timeout on how long to wait for a mod_wsgi daemon process to accept a request for processing.
This option is to allow one to control what to do when backlogging of requests occurs. If the daemon process is overloaded and getting behind, then it is more than likely that a user will have given up on the request anyway if they have to wait too long. This option allows you to specify that a request that was queued up waiting for too long is discarded, allowing any transient backlog to be quickly discarded and not simply cause the daemon process to become even more backlogged. When this occurs the user will recieve a 504 Gateway Time Out response.
- listen-backlog=nnn
Defines the depth of the daemon process socket listener queue. By default the limit is 100, although this is actually a hint, as different operating systems can have different limits on the maximum value or otherwise treat it in special ways.a
This option can be set, along with
queue-timeout
to try and better handle back logging when the WGSI application gets overloaded.- socket-user=name | socket-user=#uid
Set the owner of the UNIX listener socket for the daemon process group.
This can be used when using the Apache PrivilegesMode directive with value of
SECURE
to change the owner of the socket from the default Apache user, to the user under which the Apache child process which is attempting to connect to the daemon process group, will run when handling requests. This is necessary otherwise the Apache child worker process will not be able to connect to the listener socket for the mod_wsgi daemon process to proxy the request to the WSGI application.This option can also be used when using third party Apache modules such as mod_ruid, mod_ruid2, mod_suid as well as the ITK MPM for Apache.
- cpu-time-limit=sss
Define the maximum amount of CPU time a daemon process is allowed to consume before a shutdown is triggered and the daemon process restarted. The point of this is to provide some means of controlling potentially run away processes due to bad code that gets stuck in heavy processing loops.
Note that CPU time used is recorded from when the daemon process is first created. This means that a process will eventually reach the limit in normal use and would be restarted. You can use the
graceful-timeout
option to reduce the chances that an active request will be interrupted.- cpu-priority=num
- Sets the scheduling priority set to the daemon processes. This can be a number of the range -20 to 20. The default priority is 0. A lower priority gives more favourable scheduling.
- memory-limit=num
- Sets the maximum amount of memory a daemon process can use. This will
have no affect on some platforms as
RLIMIT_AS
/RLIMIT_DATA
withsetrlimit()
isn’t always implemented. For example MacOS X and older Linux kernel versions do not implement this feature. You will need to test whether this feature works or not before depending on it. - virtual-memory-limit=num
- Sets the maximum amount of virtual memory a daemon process can use.
This will have no affect on some platforms as
RLIMIT_VMEM
withsetrlimit()
isn’t always implemented. You will need to test whether this feature works or not before depending on it. - stack-size=nnn
The amount of virtual memory in bytes to be allocated for the stack corresponding to each thread created by mod_wsgi in a daemon process.
This option would be used when running Linux in a VPS system which has been configured with a quite low ‘Memory Limit’ in relation to the ‘Context RSS’ and ‘Max RSS Memory’ limits. In particular, the default stack size for threads under Linux is 8MB is quite excessive and could for such a VPS result in the ‘Memory Limit’ being exceeded before the RSS limits were exceeded. In this situation, the stack size should be dropped down to be in the region of 512KB (524288 bytes).
- receive-buffer-size=nnn
Defines the UNIX socket buffer size for data being received by the daemon process from the Apache child process.
This option may need to be used to override small default values set by certain operating systems and would help avoid possibility of deadlock between Apache child process and daemon process when the WSGI application generates large responses but doesn’t consume request content. In general such deadlock problems would not arise with well behaved WSGI applications, but some spam bots attempting to post data to web sites are known to trigger the problem.
The maximum possible value that can be set for the buffer size is operating system dependent and will need to be calculated through trial and error.
- send-buffer-size=nnn
Defines the UNIX socket buffer size for data being sent in the direction daemon process back to Apache child process.
This option may need to be used to override small default values set by certain operating systems and would help avoid possibility of deadlock between Apache child process and daemon process when the WSGI application generates large responses but doesn’t consume request content. In general such deadlock problems would not arise with well behaved WSGI applications, but some spam bots attempting to post data to web sites are known to trigger the problem.
The maximum possible value that can be set for the buffer size is operating system dependent and will need to be calculated through trial and error.
- header-buffer-size=nnn
- Defines the maximum size that a response header/value can be that is
returned from a WSGI application. The default size is 32768 bytes. This
might need to be overridden where excessively large response headers
are returned, such as in custom authentication challenge schemes which
use the
WWW-Authenticate
header. - response-buffer-size=nnn
- Defines the maximum number of bytes that will be buffered for a response in the Apache child processes when proxying the response body from the WSGI application. The default size is 65536 bytes. Be careful increasing this to provide extra buffering of responses as it contributes to the runtime memory size of the Apache child processes.
- response-socket-timeout=nnn
- Defines the maximum number of seconds allowed to pass before timing out
on a write operation back to the HTTP client when the response buffer
has filled and data is being forcibly flushed. Defaults to 0 seconds
indicating that it will default to the value of the
socket-timeout
option.
To delegate a particular WSGI application to run in a named set of daemon
processes, the WSGIProcessGroup
directive should be specified in
appropriate context for that application, or the process-group
option
used on the WSGIScriptAlias
directive. If neither is used to delegate
the WSGI application to run in a daemon process group, the application will
be run within the standard Apache child processes.
If the WSGIDaemonProcess
directive is specified outside of all virtual
host containers, any WSGI application can be delegated to be run within
that daemon process group. If the WSGIDaemonProcess
directive is
specified within a virtual host container, only WSGI applications
associated with virtual hosts with the same server name as that virtual
host can be delegated to that set of daemon processes.
In the case where you have two separate VirtualHost
definitions for
the same ServerName
, but where one is for port 80 and the other for
port 443, specify the WSGIDaemonProcess
directive in the
first VirtualHost
. You can then refer to that daemon process group
by name from the second VirtualHost
. Using one daemon process group
across the two virtual hosts in this case is preferred as then you do not
have two whole separate instances of your application for port 80 and 443.
<VirtualHost *:80>
ServerName www.site1.com
WSGIDaemonProcess www.site1.com user=joe group=joe processes=2 threads=25
WSGIProcessGroup www.site1.com
...
</VirtualHost>
<VirtualHost *:443>
ServerName www.site1.com
WSGIProcessGroup www.site1.com
...
</VirtualHost>
When WSGIDaemonProcess
is associated with a virtual host, the error log
associated with that virtual host will be used for all Apache error log
output from mod_wsgi rather than it appear in the main Apache error log.
For example, if a server is hosting two virtual hosts and it is desired that the WSGI applications related to each virtual host run in distinct processes of their own and as a user which is the owner of that virtual host, the following could be used:
<VirtualHost *:80>
ServerName www.site1.com
CustomLog logs/www.site1.com-access_log common
ErrorLog logs/ww.site1.com-error_log
WSGIDaemonProcess www.site1.com user=joe group=joe processes=2 threads=25
WSGIProcessGroup www.site1.com
...
</VirtualHost>
<VirtualHost *:80>
ServerName www.site2.com
CustomLog logs/www.site2.com-access_log common
ErrorLog logs/www.site2.com-error_log
WSGIDaemonProcess www.site2.com user=bob group=bob processes=2 threads=25
WSGIProcessGroup www.site2.com
...
</VirtualHost>
For historical reasons and the inability to change existing behaviour when
adding or changing features, many of the options to WSGIDaemonProcess
,
especially those related to timeouts are not enabled by default. It is
strongly recommended you explicitly set these options yourself as this will
give you a system which is better able to recover from backlogging due to
overloading when you have too many long running requests or hanging
requests. As a starting point you can see what mod_wsgi-express
uses as
defaults, adjusting them as necessary to suit your specific application
after you research what each option does. For example, consider starting
out with:
display-name='%{GROUP}'
lang='en_US.UTF-8'
locale='en_US.UTF-8'
threads=5
queue-timeout=45
socket-timeout=60
connect-timeout=15
request-timeout=60
inactivity-timeout=0
startup-timeout=15
deadlock-timeout=60
graceful-timeout=15
eviction-timeout=0
restart-interval=0
shutdown-timeout=5
maximum-requests=0
Note that the WSGIDaemonProcess
directive and corresponding features are
not available on Windows.


Relic Watcher:
Go in all 4 directions from this room. You must activate the reading desk with the correct Kaerun's Memoir to cancel the seal.
When you successfully cancel the seal, you will have the memoir stored in this room.


Query Class
Query is the main entity of this module..
Usefull links :
query examples and
commons problems with wmi
Constructor
Query
-
options
Parameters:
-
options
ObjectThe object whose properties will be used to init the query
-
[timeout=5000]
Number optionaltime out for query execution
-
[node]
String | Array optionalnode(s) to query, can contains multiples server name separated by comma: "pc1,pc2" or array of node
-
[user]
String optionalA user name to be used by WMIC when accessing the /NODE computers or computers specified in aliases.
-
[password]
optionalA password to be used by WMIC when accessing the /NODE computers (possibly including the local computer)
-
[verb]
String optionalverb of the query, must be in Query.SUPPORTED_VERBS
-
[alias]
String optionalalias being queried
-
[where]
String | Array optionalwhere clause, query will add parenthesis around it
-
[field]
String | Array optionalfield being queried, used mainly by "get" verb
-
[action]
String optionalaction being executed, use mainly by "call" verb
-
[format='JSON']
String optionalquery output, must be in Query.SUPPORTED_FORMATS or be a valid path to a XSL file (in this case the output will default to raw).
-
[cmd]
String optionalmanual command, will override mosts others options
-
[parser]
String | Function optionalFunction that will be used to parse cmd output
-
[help=false]
Boolean optionalflag used when the cmd executed needs the "/?" option
-
Example:
//requiring module
var wq = require("wmi-query");
//implements of query describe in first link
//using static get method
wq.get({"alias":"baseboard", "field":"Manufacturer, Model, Name, PartNumber, slotlayout, serialnumber, poweredon"}, function(r) {
//...
});
//manual execution and field as array
var myQuery = new wq({"alias":"bios", "verb":"get", "field": ["name", "version", "serialnumber"]})
myQuery.exec(function(r) {
// ...
});
//execution of manual query
var myQuery = new ws({"cmd":"cdrom get Name, drive, Volumename"});
myQuery.exec(function(r) {
// ...
});
//static get with where clause
wq.get({
"alias":"datafile",
"verb":"get",
"field":"Archive, FileSize, FileType, InstallDate, Readable, Writeable, System, Version"
"where":"name='c:\\boot.ini'"
}, function(r) {
//...
});
Item Index
Methods
appendFormat
()
private
append format instruction to cmd. Weird usage of WINDIR path is explained here
buildCmd
()
chainable
use object properties to build command
call
-
options
-
[callback]
build and exec call query
Parameters:
-
options
#crossLink "Query"query options, see }
-
[callback]
Object optionalcallback to be executed once the command result has been parsed
Example:
//start tomcat7 service and log the command's returned value
wmi.call({node:'host', alias:'service', where: 'Name="Tomcat7"', action:'startservice', format:'JSON'}, function(r) {
console.log("Command "+r.cmd+" has returned "+r.data.returnValue);
});
checkCmd
()
private
check command format according to format property
exec
-
[callback]
exec command and fire callback. Params of the callback is an object with a cmd key containing de wmic command and either a data key containing parsed success output if no error occured an err key containing parsed error output if an error occured
Parameters:
-
[callback]
Object optionalcallback to be executed once the command result has been parsed
get
-
options
-
[callback]
build and exec get query
Parameters:
-
options
Objectquery options, see Query constructor
-
[callback]
Object optionalcallback to be executed once the command result has been parsed
Example:
//get os name of localhost, log the result
wmi.get({node : 'localhost', format:'JSON' , alias:'os', field:'Name'}, function(r) {
console.log("OS is :", r.data[0].Name);
});
//get all stopped service on host
wmi.get({node:'host', alias:'service', where: 'Started=FALSE', format:'JSON'}, function(r) {
//...
});
listAlias
-
options
-
[callback]
list all available alias. Note : options param accept the same keys than Query constructor but some of them will be over-ride to produce expected result.
Parameters:
-
options
Objectquery options, see Query constructor
-
[callback]
Object optionalcallback to be executed once the command result has been parsed
Example:
//get alias list and log their name
wmi.listAlias({node : 'localhost'}, function(r) {
for(var i=0; i<r.data.length; i++) {
console.log(r.data[i].alias, '-', r.data[i].caption);
}
});
Properties
cmd
String
field
String
format
String
node
String
parser
String | Function
password
String
SUPPORTED_FORMATS
Unknown
private
final
static
List of the supported output format
SUPPORTED_VERBS
Unknown
private
final
static
List of the implemented verbs


WATCH: Mariah Carey already has a Christmas ad out and it's a must-watch!
Cape Town - Pop star Mariah Carey has been revealed as the new face for Walkers' Christmas advert. The campaign coincides with the 25th anniversary of Carey's Christmas hit, All I Want For Christmas Is You.
WATCH IT HERE:


Basic Terminology
A staff, in music, is a set of five horizontal lines and the four open spaces in between the lines. Each of these lines and open spaces represents a different musical pitch. In music, the pitch means how high or low the sound is. Pitches can be represented in notation by musical notes, which serve as the building blocks of written music.
Notes define two things in music: the pitch, which was mentioned before, and the duration. A musical note can be held out for varying lengths of time, which can be accounted for in musical notation. How to read duration will be covered in a later lesson.


Evolutionary algorithms are optimization tools that assume little of the task at hand. Often they are population based, that is, there is a set of individuals that each represent a candidate solution. Individuals are combined and changed with crossover and mutationlike operators to produce the next generation. Individuals with lower fitness have a lower probability to survive than those with higher fitness. In this way, the fitness function defines the optimization task.
Typically, EAs are quick to get up and running, can produce reasonable results across a wild variety of domains, but they may need a bit of fiddling to perform well and domain specific approaches will almost always have better results. All in all, EA can be very useful to cut down on the tedium of human trial and error. However, they have serious problems scaling to higher number of variables.
This library grew from the Genetic Programming implementation I wrote while working for Ravenpack who agreed to release it under an MIT licence. Several years later I cleaned it up, and documented it. Enjoy.
Evolutionary algorithm is an umbrella term. In this section we first discuss the concepts common to conrete evolutionary algorithms Genetic Programming and Differential Evolution.
[class] EVOLUTIONARY-ALGORITHM
The EVOLUTIONARY-ALGORITHM
is an abstract base
class for generational, population based optimization algorithms.
The currenly implemented EAs are generational. That is, they maintain a population of candidate solutions (also known as individuals) which they replace with the next generation of individuals.
[accessor] POPULATION-SIZE EVOLUTIONARY-ALGORITHM
The number of individuals in a generation. This is a very important parameter. Too low and there won't be enough diversity in the population, too high and convergence will be slow.
[accessor] POPULATION EVOLUTIONARY-ALGORITHM
An adjustable array with a fill-pointer that holds the individuals that make up the population.
[reader] GENERATION-COUNTER EVOLUTIONARY-ALGORITHM
A counter that starts from 0 and is incremented by
ADVANCE
. All accessors of EVOLUTIONARY-ALGORITHM
are allowed to be
specialized on a subclass which allows them to be functions of
GENERATION-COUNTER
.
[function] ADD-INDIVIDUAL EA INDIVIDUAL
Adds INDIVIDUAL
to POPULATION
of EA
. Usually called when
initializing the EA
.
[reader] EVALUATOR EVOLUTIONARY-ALGORITHM
A function of two arguments: the
EVOLUTIONARY-ALGORITHM
object and an individual. It must return
the fitness of the individual. For Genetic Programming, the evaluator often
simply calls EVAL
, or COMPILE
+ FUNCALL
, and compares the result
to some gold standard. It is also typical to slightly penalize
solutions with too many nodes to control complexity and evaluation
cost (see COUNT-NODES
). For Differential Evolution, individuals are
conceptually (and often implemented as) vectors of numbers so the
fitness function may include an L1 or L2 penalty term.
Alternatively, one can specify MASS-EVALUATOR
instead.
[reader] MASS-EVALUATOR EVOLUTIONARY-ALGORITHM
NIL
or a function of three arguments: the
EVOLUTIONARY-ALGORITHM
object, the population vector and the
fitness vector into which the fitnesses of the individuals in the
population vector shall be written. By specifying MASS-EVALUATOR
instead of an EVALUATOR
, one can, for example, distribute costly
evaluations over multiple threads. MASS-EVALUATOR
has precedence
over EVALUATOR
.
[reader] FITNESS-KEY EVOLUTIONARY-ALGORITHM
A function that returns a real number for an
object returned by EVALUATOR
. It is called when two fitness are to
be compared. The default value is #'IDENTITY
which is sufficient
when EVALUATOR
returns real numbers. However, sometimes the
evaluator returns more information about the solution (such as
fitness in various situations) and FITNESS-KEY
key be used to
select the fitness value.
Training is easy: one creates an object of a subclass of
EVOLUTIONARY-ALGORITHM
such as GENETIC-PROGRAMMING
or
DIFFERENTIAL-EVOLUTION
, creates the initial population by adding
individuals to it (see ADD-INDIVIDUAL
) and calls ADVANCE
in a loop
to move on to the next generation until a certain number of
generations or until the FITTEST
individual is good enough.
[generic-function] ADVANCE EA
Create the next generation and place it in
POPULATION
of EA
.
[reader] FITTEST EVOLUTIONARY-ALGORITHM
The fittest individual ever to be seen and its fittness as a cons cell.
[accessor] FITTEST-CHANGED-FN EVOLUTIONARY-ALGORITHM
If non-NIL, a function that's called when FITTEST
is updated with three arguments: the EVOLUTIONARY-ALGORITHM
object, the fittest individual and its fitness. Useful for
tracking progress.
What is Genetic Programming? This is what Wikipedia has to say:
In artificial intelligence, genetic programming (GP) is an
evolutionary algorithm-based methodology inspired by biological
evolution to find computer programs that perform a user-defined
task. Essentially GP is a set of instructions and a fitness
function to measure how well a computer has performed a task. It
is a specialization of genetic algorithms (GA) where each
individual is a computer program. It is a machine learning
technique used to optimize a population of computer programs
according to a fitness landscape determined by a program's ability
to perform a given computational task.
Lisp has a long history of Genetic Programming because GP involves manipulation of expressions which is of course particularly easy with sexps.
GPR works with typed expressions. Mutation and crossover never produce expressions that fail with a type error. Let's define a couple of operators that work with real numbers and also return a real:
(defparameter *operators* (list (operator (+ real real) real)
(operator (- real real) real)
(operator (* real real) real)
(operator (sin real) real)))
One cannot build an expression out of these operators because they
all have at least one argument. Let's define some literal classes
too. The first is produces random numbers, the second always returns
the symbol *X*
:
(defparameter *literals* (list (literal (real)
(- (random 32.0) 16.0))
(literal (real)
'*x*)))
Armed with *OPERATORS*
and *LITERALS*
, one can already build
random expressions with RANDOM-EXPRESSION
, but we also need to
define how good a certain expression is which is called fitness.
In this example, we are going to perform symbolic regression, that is, try to find an expression that approximates some target expression well:
(defparameter *target-expr* '(+ 7 (sin (expt (* *x* 2 pi) 2))))
Think of *TARGET-EXPR*
as a function of *X*
. The evaluator
function will bind the special *X*
to the input and simply EVAL
the expression to be evaluated.
(defvar *x*)
The evaluator function calculates the average difference between
EXPR
and TARGET-EXPR
, penalizes large expressions and returns
the fitness of EXPR
. Expressions with higher fitness have higher
chance to produce offsprings.
(defun evaluate (gp expr target-expr)
(declare (ignore gp))
(/ 1
(1+
;; Calculate average difference from target.
(/ (loop for x from 0d0 to 10d0 by 0.5d0
summing (let ((*x* x))
(abs (- (eval expr)
(eval target-expr)))))
21))
;; Penalize large expressions.
(let ((min-penalized-size 40)
(size (count-nodes expr)))
(if (< size min-penalized-size)
1
(exp (min 120 (/ (- size min-penalized-size) 10d0)))))))
When an expression is to undergo mutation, a randomizer function is
called. Here we change literal numbers slightly, or produce an
entirely new random expression that will be substituted for EXPR
:
(defun randomize (gp type expr)
(if (and (numberp expr)
(< (random 1.0) 0.5))
(+ expr (random 1.0) -0.5)
(random-gp-expression gp (lambda (level)
(<= 3 level))
:type type)))
That's about it. Now we create a GP instance hooking everything up,
set up the initial population and just call ADVANCE
a couple of
times to create new generations of expressions.
(defun run ()
(let ((*print-length* nil)
(*print-level* nil)
(gp (make-instance
'gp
:toplevel-type 'real
:operators *operators*
:literals *literals*
:population-size 1000
:copy-chance 0.0
:mutation-chance 0.5
:evaluator (lambda (gp expr)
(evaluate gp expr *target-expr*))
:randomizer 'randomize
:selector (lambda (gp fitnesses)
(declare (ignore gp))
(hold-tournament fitnesses :n-contestants 2))
:fittest-changed-fn
(lambda (gp fittest fitness)
(format t "Best fitness until generation ~S: ~S for~% ~S~%"
(generation-counter gp) fitness fittest)))))
(loop repeat (population-size gp) do
(add-individual gp (random-gp-expression gp (lambda (level)
(<= 5 level)))))
(loop repeat 1000 do
(when (zerop (mod (generation-counter gp) 20))
(format t "Generation ~S~%" (generation-counter gp)))
(advance gp))
(destructuring-bind (fittest . fitness) (fittest gp)
(format t "Best fitness: ~S for~% ~S~%" fitness fittest))))
Note that this example can be found in example/symbolic-regression.lisp.
Genetic programming works with a population of individuals. The
individuals are sexps that may be evaluated directly by EVAL
or by
other means. The internal nodes and the leafs of the sexp as a tree
represent the application of operators and literal objects,
respectively. Note that currently there is no way to represent
literal lists.
[class] EXPRESSION-CLASS
An object of EXPRESSION-CLASS
defines two things:
how to build a random expression that belongs to that expression
class and what lisp type those expressions evaluate to.
[reader] RESULT-TYPE EXPRESSION-CLASS
Expressions belonging to this expression class must evaluate to a value of this lisp type.
[reader] WEIGHT EXPRESSION-CLASS
The probability of an expression class to be selected from a set of candidates is proportional to its weight.
[class] OPERATOR EXPRESSION-CLASS
Defines how the symbol NAME
in the function
position of a list can be combined arguments: how many and of what
types. The following defines +
as an operator that adds two
FLOAT
s:
(make-instance 'operator
:name '+
:result-type float
:argument-types '(float float))
See the macro OPERATOR
for a shorthand for the above.
Currently no lambda list keywords are supported and there is no way
to define how an expression with a particular operator is to be
built. See RANDOM-EXPRESSION
.
[reader] NAME OPERATOR
A symbol that's the name of the operator.
[reader] ARGUMENT-TYPES OPERATOR
A list of lisp types. One for each argument of this operator.
[macro] OPERATOR (NAME &REST ARG-TYPES) RESULT-TYPE &KEY (WEIGHT 1)
Syntactic sugar for instantiating operators. The example given for
OPERATOR
could be written as:
(operator (+ float float) float)
See WEIGHT
for what WEIGHT
means.
[class] LITERAL EXPRESSION-CLASS
This is slightly misnamed. An object belonging to
the LITERAL
class is not a literal itself, it's a factory for
literals via its BUILDER
function. For example, the following
literal builds bytes:
(make-instance 'literal
:result-type '(unsigned-byte 8)
:builder (lambda () (random 256)))
In practice, one rarely writes it out like that, because the LITERAL
macro provides a more convenient shorthand.
[reader] BUILDER LITERAL
A function of no arguments that returns a random literal that belongs to its literal class.
[macro] LITERAL (RESULT-TYPE &KEY (WEIGHT 1)) &BODY BODY
Syntactic sugar for defining literal classes. The example given for
LITERAL
could be written as:
(literal ((unsigned-byte 8))
(random 256))
See WEIGHT
for what WEIGHT
means.
[function] RANDOM-EXPRESSION OPERATORS LITERALS TYPE TERMINATE-FN
Return an expression built from OPERATORS
and LITERALS
that
evaluates to values of TYPE
. TERMINATE-FN
is a function of one
argument: the level of the root of the subexpression to be generated
in the context of the entire expression. If it returns T
then a
LITERAL
will be inserted (by calling its BUILDER
function),
else an OPERATOR
with all its necessary arguments.
The algorithm recursively generates the expression starting from
level 0 where only operators and literals with a RESULT-TYPE
that's
a subtype of TYPE
are considered and one is selected with the
unnormalized probability given by its WEIGHT
. On lower levels, the
ARGUMENT-TYPES
specification of operators is similarly satisfied and
the resulting expression should evaluate without without a type
error.
The building of expressions cannot backtrack. If it finds itself in a situation where no literals or operators of the right type are available then it will fail with an error.
To start the evolutionary process one creates a GP object,
adds to it the individuals (see ADD-INDIVIDUAL
) that make up the
initial population and calls ADVANCE
in a loop to move on to the
next generation.
[class] GENETIC-PROGRAMMING EVOLUTIONARY-ALGORITHM
The GENETIC-PROGRAMMING
class defines the search
space, how mutation and recombination occur, and hold various
parameters of the evolutionary process and the individuals
themselves.
[function] RANDOM-GP-EXPRESSION GP TERMINATE-FN &KEY (TYPE (TOPLEVEL-TYPE GP))
Creating the initial population by hand is tedious. This
convenience function calls RANDOM-EXPRESSION
to create a random
individual that produces GP
's TOPLEVEL-TYPE
. By passing in another
TYPE
one can create expressions that fit somewhere else in a larger
expression which is useful in a RANDOMIZER
function.
The search space of the GP is defined by the available operators, literals and the type of the final result produced. The evaluator function acts as the guiding light.
[reader] OPERATORS GENETIC-PROGRAMMING
The set of OPERATOR
s from which (together
with LITERAL
s) individuals are built.
[reader] LITERALS GENETIC-PROGRAMMING
The set of LITERAL
s from which (together
with OPERATOR
s) individuals are built.
[reader] TOPLEVEL-TYPE GENETIC-PROGRAMMING
The type of the results produced by individuals.
If the problem is to find the minimum a 1d real function then this
may be the symbol REAL
. If the problem is to find the shortest
route, then this may be a vector. It all depends on the
representation of the problem, the operators and the literals.
[function] COUNT-NODES TREE &KEY INTERNAL
Count the nodes in the sexp TREE
. If INTERNAL
then don't count the
leaves.
The RANDOMIZER
and SELECTOR
functions define how mutation and
recombination occur.
[reader] RANDOMIZER GENETIC-PROGRAMMING
Used for mutations, this is a function of three arguments: the GP object, the type the expression must produce and current expression to be replaced with the returned value. It is called with subexpressions of individuals.
[reader] SELECTOR GENETIC-PROGRAMMING
A function of two arguments: the GP object and a
vector of fitnesses. It must return the and index into the fitness
vector. The individual whose fitness was thus selected will be
selected for reproduction be it copying, mutation or crossover.
Typically, this defers to HOLD-TOURNAMENT
.
[function] HOLD-TOURNAMENT FITNESSES &KEY SELECT-CONTESTANT-FN N-CONTESTANTS KEY
Select N-CONTESTANTS
(all different) for the tournament randomly,
represented by indices into FITNESSES
and return the one with the
highest fitness. If SELECT-CONTESTANT-FN
is NIL
then contestants are
selected randomly with uniform probability. If SELECT-CONTESTANT-FN
is a function, then it's called with FITNESSES
to return an
index (that may or may not be already selected for the tournament).
Specifying SELECT-CONTESTANT-FN
allows one to conduct 'local'
tournaments biased towards a particular region of the index range.
KEY
is NIL
or a function that select the real fitness value from
elements of FITNESSES
.
The new generation is created by applying a reproduction operator
until POPULATION-SIZE
is reached in the new generation. At each
step, a reproduction operator is randomly chosen.
[accessor] COPY-CHANCE GENETIC-PROGRAMMING
The probability of the copying reproduction operator being chosen. Copying simply creates an exact copy of a single individual.
[accessor] MUTATION-CHANCE GENETIC-PROGRAMMING
The probability of the mutation reproduction
operator being chosen. Mutation creates a randomly altered copy of
an individual. See RANDOMIZER
.
If neither copying nor mutation were chosen, then a crossover will take place.
[accessor] KEEP-FITTEST-P GENETIC-PROGRAMMING
If true, then the fittest individual is always copied without mutation to the next generation. Of course, it may also have other offsprings.
The concepts in this section are covered by Differential Evolution: A Survey of the State-of-the-Art.
[class] DIFFERENTIAL-EVOLUTION EVOLUTIONARY-ALGORITHM
Differential evolution (DE) is an evolutionary algorithm in which individuals are represented by vectors of numbers. New individuals are created by taking linear combinations or by randomly swapping some of these numbers between two individuals.
[reader] MAP-WEIGHTS-INTO-FN DIFFERENTIAL-EVOLUTION
The vector of numbers (the 'weights') are most
often stored in some kind of array. All individuals must have the
same number of weights, but the actual representation can be
anything as long as the function in this slot mimics the semantics
of MAP-INTO
that's the default.
[reader] CREATE-INDIVIDUAL-FN DIFFERENTIAL-EVOLUTION
Holds a function of one argument, the DE, that
returns a new individual that needs not be initialized in any way.
Typically this just calls MAKE-ARRAY
.
[reader] MUTATE-FN DIFFERENTIAL-EVOLUTION
One of the supplied mutation functions:
MUTATE/RAND/1
MUTATE/BEST/1
MUTATE/CURRENT-TO-BEST/2
.
[reader] CROSSOVER-FN DIFFERENTIAL-EVOLUTION
A function of three arguments, the DE and two
individuals, that destructively modifies the second individual by
using some parts of the first one. Currently, the implemented
crossover function is CROSSOVER/BINARY
.
[function] CROSSOVER/BINARY DE INDIVIDUAL-1 INDIVIDUAL-2 &KEY (CROSSOVER-RATE 0.5)
Destructively modify INDIVIDUAL-2
by replacement each element with
a probability of 1 - CROSSOVER-RATE
with the corresponding element
in INDIVIDUAL-1
. At least one, element is changed. Return
INDIVIDUAL-2
.
[class] SANSDE DIFFERENTIAL-EVOLUTION
SaNSDE is a special DE that dynamically adjust the
crossover and mutation are performed. The only parameters are the
generic EA ones: POPULATION-SIZE
, EVALUATOR
, etc. One also has to
specify MAP-WEIGHTS-INTO-FN
and CREATE-INDIVIDUAL-FN
.


Current Projects
Low Rank Matrix Estimation Without Lifting -
As part of my MS thesis, I am trying to solve the problem of low rank matrix recovery without lifting i.e. in the natural parameter space. Initial sketches of the proof look promising and I am currently in the process of formalizing this.
PhasePack -
A MATLAB based library for solving Phase Retrieval.


HE
LLO.
About
I'am Prashant
Web developerI am Computer Science and Engineering Student at MS Ramaiah Institute of Technology , Bangalore. I am fascinated about programming and exploring new CS fields. I enjoy solving problems with use of programming. I am always energetic and eager to learn new skills. I have good leadership skills as well as I can work as a team member.


|
WUT Velma robot API
|
Integration test. More...
Functions | |
| def | deg2rad (deg) |
Variables | |
| anonymous | |
| velma = VelmaInterface() | |
| timeout_s | |
| diag = velma.getCoreCsDiag() | |
| start_time | |
| error = velma.waitForJoint() | |
| bool | reset_left = True |
| bool | reset_right = True |
| bool | move_both = True |
| msg | |
| hold | |
| list | dest_q = [deg2rad(30), deg2rad(30), deg2rad(30), deg2rad(180)] |
Integration test.
| def scripts.test_grippers.deg2rad | ( | deg | ) |
Definition at line 45 of file test_grippers.py.
| scripts.test_grippers.anonymous |
Definition at line 50 of file test_grippers.py.
Definition at line 111 of file test_grippers.py.
| scripts.test_grippers.diag = velma.getCoreCsDiag() |
Definition at line 63 of file test_grippers.py.
| scripts.test_grippers.error = velma.waitForJoint() |
Definition at line 73 of file test_grippers.py.
| scripts.test_grippers.hold |
Definition at line 104 of file test_grippers.py.
| bool scripts.test_grippers.move_both = True |
Definition at line 80 of file test_grippers.py.
| scripts.test_grippers.msg |
Definition at line 89 of file test_grippers.py.
| bool scripts.test_grippers.reset_left = True |
Definition at line 78 of file test_grippers.py.
| bool scripts.test_grippers.reset_right = True |
Definition at line 79 of file test_grippers.py.
| scripts.test_grippers.start_time |
Definition at line 72 of file test_grippers.py.
| scripts.test_grippers.timeout_s |
Definition at line 57 of file test_grippers.py.
| scripts.test_grippers.velma = VelmaInterface() |
Definition at line 54 of file test_grippers.py.


%include src="partials/head.html"%>
OUR MISSION Improving ruminant farming profitability and animal welfare through the Obsalim technique


I am felix osambo a fullstack web developer,I design and build websites.
I am typically responsible for the appearance, of the site and technical aspects, such as site speed and how much traffic the site can handle. i also do create site content that requires technical features
Projects
Here are some of the projects i have done so far in web design
All
Web developement
Web design
services
Here are some of the services i do offer
webdesign
I design web using the apropriate tools that is figma so that i can attract users,
web development
ei develope web using the apropriate developement coding languages both front and backend languages


Greeting Script
Hi (user's name). My name is Alex with the EsoX App.EsoX is an educational application, having tutorials for learning Esoteric Programming Languages a bit easier than you would do straing from the existing articles on the internet. We aim for teaching you new, out of ordinary, technologies, while keeping you engaged with a gamification design and community to learn from. Today we are looking for ways to improve the user experience of EsoX. This test is devised to evaluate with specific design components of the app and to discover any issues we need to address, we are not testing you.
Please speak all your thoughts aloud as you go through the tasks. This helps us better understand why you are making certain choices.
If you find something difficult to use, chances are that others will as well. The study will take about (15 minutes). We will answer any questions you have at the end of the study.
Are there any questions regarding this test?
Let us begin the test.
Statement of Informed Consent
EsoX is conducting feedback sessions in order to understand any problem areas for the product. The information obtained in this test will be used to improve the design and development of user interface components and other deliverables.
I understand that my participation will be recorded on digital audio and that I will be photographed. I understand that data and information I share today will be handled confidentially and anonymously.
I understand that data and information I share today will be handled confidentially and anonymously.
My personal information will be protected; taking part in this study and the results from the study are not part of my performance review. My information will be rolled up with the rest of the data from the other study participants. The audio recordings and photographs may be part of information presented at professional conferences.
I waive any right that I may have to inspect or approve the final recordings, photos and report. I discharge EsoX from any liability for making, editing or using the recordings and photographs from this study according to the uses outlined above.
I have read the above project description. I agree with the terms and hereby consent to participate in the study.
Participant Signature: ____________________________________________________
Participant Name: Stefan Saramet
Date: 29.05.2019


There are many different types of of items that make up a course. Each item is given an item_type_id for ease of identification.
| Name | Description |
|---|---|
| course_item_type_id | There are many different types of of items that make up a course. Each item is given an item_type_id for ease of identification. |
| course_item_type_desc | The description attempts to describe the item in a few words (for example, "graded programming" or "exam"). |
| course_item_type_category | There are a variety of different categories that course items fall into, currently: lecture, supplemental item (ie, reading), quiz, peer review, and programming. Within each of these categories, there is the potential to have various item types, which allow for different handling of the items (for example, formative vs summative assignments and open vs closed peer reviews). |
| course_item_type_graded | An item can be either graded ("true", which means it is required that a learner pass the item to pass the course) or not ("false", which means it is either an assessment that allows the learner to practice their skills, such as a practice quiz, or an item that provides information, such as a lecture or reading, regardless it is an optional item). |
CREATE TABLE course_item_types ( course_item_type_id INT4 ,course_item_type_desc VARCHAR(255) ,course_item_type_category VARCHAR(255) ,course_item_type_graded BOOL ,PRIMARY KEY (course_item_type_id) );


Frequently Asked Questions
Some of the information on this page is out of date while we convert our documentation to Python.
Table of Contents


I'm a coder who has a full sense of security at every level of the stack. I promote the use of open sorce software and languages.


Define specialized class function
function si input Real x; output Real y; algorithm y = if abs(x) < Modelica.Constants.eps then 1 else Modelica.Math.sin(x)/x; end si;
[ encapsulated ][ partial ] function IDENT class_specifier class_specifier : string_comment composition end IDENT | "=" base_prefix name [ array_subscripts ] [ class_modification ] comment | "=" enumeration "(" ( [enum_list] | ":" ) ")" comment
See Modelica Language Specification for further details.
The keyword function is used to define functions as known from programming languages. Each part of a function interface must either have causality equal to input or output. A function may not be used in connections. In functions, no equations or initial algorithm and at most one algorithm clause are allowed. Calling a function requires either an algorithm clause or an external function interface.
The syntax and semantics of a function have many similarities to those of the block specialized class. A function has many of the properties of a general class, e.g., being able to inherit other functions, or to redeclare or modify elements of a function declaration.
Modelica functions have the following restrictions compared to a general Modelica class:
Modelica functions have the following enhancements compared to a general Modelica class:
A function may have a function as an input argument. The declared type of such an input formal parameter in a function can be the class-name of a partial function that has no replaceable elements. It cannot be the class-name of a record [i.e., record constructor functions are not allowed in this context.] Such an input formal parameter of function type can also have an optional functional default value. Example:
function quadrature "Integrate function y=integrand(x) from x1 to x2" input Real x1; input Real x2; input Integrand integrand; // Integrand is a partial function, see below // With default: input Integrand integrand := Modelica.Math.sin; output Real integral; algorithm integral :=(x2-x1)*(integrand(x1) + integrand(x2))/2; end quadrature; partial function Integrand input Real x; output Real y; end Integrand;
A functional argument can be provided in one of the following forms to be passed to a formal parameter of function type in a function call (see examples below):
In all cases the provided function must be "function type compatible" to the corresponding formal parameter of function type. Example:
// A function as a positional input argument according to case (a) function Parabola extends Integrand; algorithm y = x*x; end Parabola; area = quadrature(0, 1, Parabola); // The quadrature2 example below uses a function integrand that // is a component as input argument according to case (c): function quadrature2 "Integrate function y=integrand(x) from x1 to x2" input Real x1; input Real x2; input Integrand integrand; // Integrand is a partial function type output Real integral; algorithm integral := quadrature(x1, (x1+x2)/2, integrand)+ quadrature((x1+x2)/2, x2, integrand); end quadrature2;
A function partial application is a function call with certain formal parameters bound to expressions. A function partial application returns a partially evaluated function that is also a function, with the remaining not bound formal parameters still present in the same order as in the original function declaration. A function partial application is specified by the function keyword followed by a function call to func_name giving named formal parameter associations for the formal parameters to be bound, e.g.:
function func_name(..., formal_parameter_name = expr, ...)
[Note that the keyword function in a function partial application differentiates the syntax from a normal function call where some parameters have been left out, and instead supplied via default values.] The function created by the function partial application acts as the original function but with the bound formal input parameters(s) removed, i.e., they cannot be supplied arguments at function call. The binding occurs when the partially evaluated function is created. A partially evaluated function is "function compatible" to the same function where all bound arguments are removed [thus, for checking function type compatibility, bound formal parameters are ignored].
Example of function partial application as argument, positional argument passing, according to case (b) above:
model Test parameter Integer N; Real area; algorithm area := 0; for i in 1:N loop area := area + quadrature(0, 1, function Sine(A=2, w=i*time)); end for; end Test; function Sine "y = Sine(x,A,w)" extends Integrand; input Real A; input Real w; algorithm y:=A*Modelica.Math.sin(w*x); end Sine; //Call with function partial application as named input argument: area := area + quadrature(0, 1, integrand = function Sine(A=2, w=i*time));
Example showing that function types are matching after removing the bound arguments A and w in a function partial application:
function Sine2 "y = Sine2(A,w,x)" input Real A; input Real w; input Real x; // Note: x is now last in argument list. output Real y; algorithm y:=A*Modelica.Math.sin(w*x); end Sine2; // The partially evaluated Sine2 has only one argument: // x - and is thus type compatible with Integrand. area = quadrature(0, 1, integrand = function Sine2(A=2, w=3));
Example of a function partial application of a function that is a component, according to case (d) above:
partial function SurfaceIntegrand input Real x; input Real y; output Real z; end SurfaceIntegrand; function quadratureOnce input Real x; input Real y1; input Real y2; input SurfaceIntegrand integrand; output Real z; algorithm // This is according to case (d) and needs to bind the 2nd argument z := quadrature(y1, y2, function integrand(y=x)); end quadratureOnce; function surfaceQuadrature input Real x1; input Real x2; input Real y1; input Real y2; input SurfaceIntegrand integrand; output Real integral; algorithm // Case (b) and (c) integral := quadrature(x1, x2, function quadratureOnce(y1=y1, y2=y2, integrand=integrand); end surfaceQuadrature;


Exercise 01-Spectrum Loop In this exercise we created specrum of color looped across the screen with the hue increasing across the X axis and the saturation increasing across the Y axis. this was achieved by creating a simple loop that created a grid of squares that were then filled using a gridX variable
Exercise 02-Interactivity and Vertex introduction This exercise involved us adding interactivity to the previous Spectrum Loop exercise, the interaction is simply mouse movement. towards the end of class we began looking at using vertices to build shapes.
Exercise 03-Color Wheel This exercise had us create a color wheel using the triangle fan shape to create a set of verticies that create a series of conecting triangles, in this exercise we also learned about translations, push and pop.
Exercise 04-Personal Design The final exercise in the Color Shape section had us pick a reference image and create our own design using what we had learned so far, personally I wasn't happy with my eventual outcome as it was more programmatic than design oriented and I did not follow the intended process.


{% extends "_template.html" %} {% block title %}Nextzen Developers - API Key {{ key.api_key }}{% endblock %} {% block scripts %} {{ super() }} {% endblock %} {% block container %} {{ super() }}
← Back to your API keys
{{ key.api_key }}
A short bit of text to help you remember what this API key was created for.
Specify one URL per line. If set, this API key will only allow tile requests that have an Origin header set to one of these URLs.
Origin
Disabling your API key will block requests made using this API key. Due to caching, changes made may take several hours to take effect. You must disable an API key before deleting it.
You cannot enable this API key because an administrator has locked it. Please contact us if you have questions.
Enabling your API key will allow requests made using this API key. Due to caching, changes made may take several hours to take effect.
Deleting your API key is permanent and is not recoverable.


Patient Health Dashboard Prototype by Junle Lu
Patient Name:
..
Gender:
..
DOB:
..
Medication Requests


Who's a Good Cat?!
Cat:
GCP:
Turns:
8
Sleep!
Litter Box
Click here to move on to other cat business!


Transform your images into amazing creations and
share them with others around the world!
Before
After
Use the In-app camera to capture pitcures on the go!
Edit pictures with our array of tools to tranform them into masterpieces!
Share your creations with the online Feathr community!


{% extends 'find_a_meeting/country_specific/base.html' %} {% block main %}
Quakers in Britain provides a search engine and listing for meetings in the UK. You can search by postcode, by the name of a nearby city, or by the name of the meeting house you're looking for.
Listings contain contact information for each meeting as well as a link to the meeting's website, if it has one.
Woodbrooke Quaker Center is hosting online meetings for worship several times a week. Some meetings are not hosting their own online meetings, but rather directing attenders to Woodbrooke. They are open to all.
{% endblock %} {% block footer %}This website is in active development. Think something's missing? Email it to<EMAIL_ADDRESS>This page was last updated on 28 March 2020.
{% include 'back_to_top.html' %} {% endblock %}


Lorem Ipsum
The navigation bar will stay at the top of the page while scrolling
Versions of the Lorem ipsum text have been used in typesetting at least since the 1960s, when it was popularized by advertisements for Letraset transfer sheets. Lorem ipsum was introduced to the digital world in the mid-1980s when Aldus employed it in graphic and word-processing templates for its desktop publishing program PageMaker. Other popular word processors including Pages and Microsoft Word have since adopted Lorem ipsum as well.


array debug_backtrace ([ int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT [, int $limit = 0 ]] )
debug_backtrace() generates a PHP backtrace.
Returns an array of associative arrays. The possible returned elements are as follows: Possible returned elements from debug_backtrace() Name Type Description


Live --- community communities local knowledge stakeholders initiative existing SCOPE new action health resources Health i.e., data {border-style partnerships support px;} #ffffff;} implementation key RE-FRAME childhood implementing message partners obesity partnership Public capacity development model using approach implemented used communities, described healthy planning process sharing supporting use children communities. evaluation provided resources, shared social Community central staff ---. PTT SCOPE’s common community-based exchange framework initiative, initiatives intervention multiple px; sectors share {font-family Childhood July Obesity Table champions coaching early engagement experience font-size identified implement interviews linking marketing number office organization research resource results stakeholder supported systems team Figure achieving and/or awareness baseline behaviours collective community-wide confident continuous coordinators creating different distributed double; example, feel funding it’s online opportunities phase prevention related support, supports time unique (C-B) (SCOPE) Am. Existing Facilitation, Med. RE-AIM Research available backbone border-color border-width broader collection dynamics effectively efforts engage engaging established evaluating experiential formal however, impact implementation, information informed integrating materials measures mixed-methods need needs organizations overall participants partner population promotion protocol qualitative really recreation reported settings solid; strategies various {font-style {font-weight (C-A) (C-D) ---, Communities Data Engagement Glasgow Prev. Prevention R.E. Resource Sustainable adapted adaptive additional analysis analyzed based best bold broad child collaborative community. content continue courier; creation critical designed developed easy em; engaged etc.) extensive facilitate having innovative interact level moved necessary order paper participatory physical processes programs pt;} public quality questions range regular relationships remained repeat simple stage tool transfer webinars webinars,


WELCOME TO OUR AMAZING SALMON COOKIE SHOP!
OUR PRODCTS:
Contact Us!
Mobile Number:<PHONE_NUMBER>
open from 6am until 8pm
Rating
Made with all the love, created by the hands of the best cheffs in the entire World!
Cheff's World Cup | IZO | Rank#5 Cookie shop in the world!
Shape
The shape was taken from the salmon fish, giving it a great appeal and freshness
MERCH
Check out our new MERCH!! 50% OFF for the first 100 to enter the the link attached with the image. All the prophet will be donated to a charity for curing kids from Cancer.
Where You Can Find Us!
- Seattle
- Tokyo
- Dubai
- Paris
- Lima


Sublime Smith steers Australia to comfortable win over Pakistan in second T20
by https://www.dawn.com/authors/119/afp, Dawn.com | AFPMaster batsman Steve Smith stroked a faultless unbeaten 80 as Australia edged Pakistan by seven wickets in Canberra to go 1-0 up in their three-match Twenty20 series.
Top-ranked Pakistan set a competitive 150 for six off their 20 overs, with skipper Babar Azam hitting his second consecutive half-century and Iftikhar Ahmed clubbing a quickfire 62.
But their bowling attack was no match for Smith, who brought up his fourth 50 in the short format off 36 balls, with six fours and one big six, as Australia reached 151 for three with nine balls to spare.
It put them 1-0 up after the opening match in Sydney on Sunday was abandoned due to rain. The final game is in Perth on Friday.
“Very pleasing. I thought we were pretty good all day,” said skipper Aaron Finch.
“To get wickets consistently was key. Everyone is playing their roles really well, and we've got guys like Steve, who does what he does best.”
Australia is on a hot T20 streak, having not been beaten in their last seven matches.
“Credit goes to Smith,” said Azam. “He took the game away with a magnificent innings. We are very disappointed. We didn't bat well in the powerplay.”
David Warner had been in fantastic touch after scoring 219 without losing his wicket in four previous innings, and he ominously smashed 16 off Imad Wasim's opening over.
However, the explosive opener was clean bowled by Mohammad Amir for 20, missing a drive, and when Finch fell for 17 to veteran seamer Mohammad Irfan, Pakistan's hopes were up.
But with Smith at the wicket, it was never going to be easy and the experienced campaigner picked the gaps and found the boundary ropes with impeccably timed shots, while grabbing quick singles.
With Ben McDermott at the other end, he pushed the score to 86 for two off the first 10 overs before his partner fell lbw to Wasim for 21.
It left Smith and Ashton Turner with 45 runs to win off 42 balls, which they managed comfortably.
Earlier, Azam, the world's top T20 batsman, again anchored the Pakistan innings with a 38-ball 50 as teammates fell around him until he found support from Ahmed, who notched a maiden, and entertaining, half-century.
After Pakistan won the toss and opted to bat, opener Fakhar Zaman, desperately in need of runs, was left floundering against Pat Cummins and was out for two, driving to Warner at mid-off.
Haris Sohail came to the crease but only lasted nine balls, gone for six.
It took the wind out of Pakistan's sails, and the runs dried up before Azam and Mohammad Rizwan began to push the scoreboard along — until Ashton Agar dismissed Rizwan and then Asif Ali in quick succession.
Azam finally found support from Ahmed before the captain was run out for 50 — his 12th in the short format — after some fantastic fielding by Warner.
Ahmed ensured it was a competitive score, smashing 22 off the penultimate over from Richardson.
Line-ups:
Australia: Aaron Finch (capt), David Warner, Steve Smith, Ben McDermott, Ashton Turner, Alex Carey (wk), Ashton Agar, Pat Cummins, Mitchell Starc, Kane Richardson, Adam Zampa
Pakistan: Babar Azam (capt), Fakhar Zaman, Haris Sohail, Mohammad Rizwan, Asif Ali, Iftikhar Ahmed, Imad Wasim, Wahab Riaz, Shadab Khan, Mohammad Amir, Mohammad Irfan


#{extends 'UbeosMailer/mailTemplate.html' /}
WoooW one proposal was accepted!
Proposal: ${proposal?.id} - ${proposal?.title}
Request: ${proposal?.request?.id} - ${proposal?.request?.country_to?.code}
Provider: ${proposal?.provider?.company?.name}
Traveler: ${proposal?.request?.consumer?.user?.firstName} ${proposal?.request?.consumer?.user?.lastName}
Traveler: ${proposal?.request?.consumer?.user?.id} - ${proposal?.request?.consumer?.user?.email}