module Unix: sig .. end
Note: all the functions of this module (except error_message
and
handle_unix_error
) are liable to raise the Unix_error
exception whenever the underlying system call signals an error.
type error =
| |
E2BIG |
(* |
Argument list too long
| *) |
| |
EACCES |
(* |
Permission denied
| *) |
| |
EAGAIN |
(* |
Resource temporarily unavailable; try again
| *) |
| |
EBADF |
(* |
Bad file descriptor
| *) |
| |
EBUSY |
(* |
Resource unavailable
| *) |
| |
ECHILD |
(* |
No child process
| *) |
| |
EDEADLK |
(* |
Resource deadlock would occur
| *) |
| |
EDOM |
(* |
Domain error for math functions, etc.
| *) |
| |
EEXIST |
(* |
File exists
| *) |
| |
EFAULT |
(* |
Bad address
| *) |
| |
EFBIG |
(* |
File too large
| *) |
| |
EINTR |
(* |
Function interrupted by signal
| *) |
| |
EINVAL |
(* |
Invalid argument
| *) |
| |
EIO |
(* |
Hardware I/O error
| *) |
| |
EISDIR |
(* |
Is a directory
| *) |
| |
EMFILE |
(* |
Too many open files by the process
| *) |
| |
EMLINK |
(* |
Too many links
| *) |
| |
ENAMETOOLONG |
(* |
Filename too long
| *) |
| |
ENFILE |
(* |
Too many open files in the system
| *) |
| |
ENODEV |
(* |
No such device
| *) |
| |
ENOENT |
(* |
No such file or directory
| *) |
| |
ENOEXEC |
(* |
Not an executable file
| *) |
| |
ENOLCK |
(* |
No locks available
| *) |
| |
ENOMEM |
(* |
Not enough memory
| *) |
| |
ENOSPC |
(* |
No space left on device
| *) |
| |
ENOSYS |
(* |
Function not supported
| *) |
| |
ENOTDIR |
(* |
Not a directory
| *) |
| |
ENOTEMPTY |
(* |
Directory not empty
| *) |
| |
ENOTTY |
(* |
Inappropriate I/O control operation
| *) |
| |
ENXIO |
(* |
No such device or address
| *) |
| |
EPERM |
(* |
Operation not permitted
| *) |
| |
EPIPE |
(* |
Broken pipe
| *) |
| |
ERANGE |
(* |
Result too large
| *) |
| |
EROFS |
(* |
Read-only file system
| *) |
| |
ESPIPE |
(* |
Invalid seek e.g. on a pipe
| *) |
| |
ESRCH |
(* |
No such process
| *) |
| |
EXDEV |
(* |
Invalid link
| *) |
| |
EWOULDBLOCK |
(* |
Operation would block
| *) |
| |
EINPROGRESS |
(* |
Operation now in progress
| *) |
| |
EALREADY |
(* |
Operation already in progress
| *) |
| |
ENOTSOCK |
(* |
Socket operation on non-socket
| *) |
| |
EDESTADDRREQ |
(* |
Destination address required
| *) |
| |
EMSGSIZE |
(* |
Message too long
| *) |
| |
EPROTOTYPE |
(* |
Protocol wrong type for socket
| *) |
| |
ENOPROTOOPT |
(* |
Protocol not available
| *) |
| |
EPROTONOSUPPORT |
(* |
Protocol not supported
| *) |
| |
ESOCKTNOSUPPORT |
(* |
Socket type not supported
| *) |
| |
EOPNOTSUPP |
(* |
Operation not supported on socket
| *) |
| |
EPFNOSUPPORT |
(* |
Protocol family not supported
| *) |
| |
EAFNOSUPPORT |
(* |
Address family not supported by protocol family
| *) |
| |
EADDRINUSE |
(* |
Address already in use
| *) |
| |
EADDRNOTAVAIL |
(* |
Can't assign requested address
| *) |
| |
ENETDOWN |
(* |
Network is down
| *) |
| |
ENETUNREACH |
(* |
Network is unreachable
| *) |
| |
ENETRESET |
(* |
Network dropped connection on reset
| *) |
| |
ECONNABORTED |
(* |
Software caused connection abort
| *) |
| |
ECONNRESET |
(* |
Connection reset by peer
| *) |
| |
ENOBUFS |
(* |
No buffer space available
| *) |
| |
EISCONN |
(* |
Socket is already connected
| *) |
| |
ENOTCONN |
(* |
Socket is not connected
| *) |
| |
ESHUTDOWN |
(* |
Can't send after socket shutdown
| *) |
| |
ETOOMANYREFS |
(* |
Too many references: can't splice
| *) |
| |
ETIMEDOUT |
(* |
Connection timed out
| *) |
| |
ECONNREFUSED |
(* |
Connection refused
| *) |
| |
EHOSTDOWN |
(* |
Host is down
| *) |
| |
EHOSTUNREACH |
(* |
No route to host
| *) |
| |
ELOOP |
(* |
Too many levels of symbolic links
| *) |
| |
EOVERFLOW |
(* |
File size or position not representable
| *) |
| |
EUNKNOWNERR of int |
(* |
Unknown error
| *) |
exception Unix_error(error, string, string);
let error_message: error => string;
let handle_unix_error: ('a => 'b, 'a) => 'b;
handle_unix_error f x
applies f
to x
and returns the result.
If the exception Unix_error
is raised, it prints a message
describing the error and exits with code 2.let environment: unit => array(string);
let getenv: string => string;
Not_found
if the variable is unbound.
(This function is identical to Sys.getenv
.)let putenv: (string, string) => unit;
Unix.putenv name value
sets the value associated to a
variable in the process environment.
name
is the name of the environment variable,
and value
its new associated value.type process_status =
| |
WEXITED of int |
(* |
The process terminated normally by
exit ;
the argument is the return code. | *) |
| |
WSIGNALED of int |
(* |
The process was killed by a signal;
the argument is the signal number.
| *) |
| |
WSTOPPED of int |
(* |
The process was stopped by a signal; the argument is the
signal number.
| *) |
Sys
for the
definitions of the standard signal numbers. Note that they are
not the numbers used by the OS.type wait_flag =
| |
WNOHANG |
(* |
do not block if no child has
died yet, but immediately return with a pid equal to 0.
| *) |
| |
WUNTRACED |
(* |
report also the children that receive stop signals.
| *) |
Unix.waitpid
.let execv: (string, array(string)) => 'a;
execv prog args
execute the program in file prog
, with
the arguments args
, and the current process environment.
These execv*
functions never return: on success, the current
program is replaced by the new one;
on failure, a Unix.Unix_error
exception is raised.let execve: (string, array(string), array(string)) => 'a;
Unix.execv
, except that the third argument provides the
environment to the program executed.let execvp: (string, array(string)) => 'a;
Unix.execv
, except that
the program is searched in the path.let execvpe: (string, array(string), array(string)) => 'a;
Unix.execve
, except that
the program is searched in the path.let fork: unit => int;
let wait: unit => (int, process_status);
let waitpid: (list(wait_flag), int) => (int, process_status);
Unix.wait
, but waits for the child process whose pid is given.
A pid of -1
means wait for any child.
A pid of 0
means wait for any child in the same process group
as the current process.
Negative pid arguments represent process groups.
The list of options indicates whether waitpid
should return
immediately without waiting, and whether it should report stopped
children.let system: string => process_status;
/bin/sh
and therefore can contain redirections, quotes, variables,
etc. The result WEXITED 127
indicates that the shell couldn't
be executed.let getpid: unit => int;
let getppid: unit => int;
let nice: int => int;
type file_descr;
let stdin: file_descr;
let stdout: file_descr;
let stderr: file_descr;
type open_flag =
| |
O_RDONLY |
(* |
Open for reading
| *) |
| |
O_WRONLY |
(* |
Open for writing
| *) |
| |
O_RDWR |
(* |
Open for reading and writing
| *) |
| |
O_NONBLOCK |
(* |
Open in non-blocking mode
| *) |
| |
O_APPEND |
(* |
Open for append
| *) |
| |
O_CREAT |
(* |
Create if nonexistent
| *) |
| |
O_TRUNC |
(* |
Truncate to 0 length if existing
| *) |
| |
O_EXCL |
(* |
Fail if existing
| *) |
| |
O_NOCTTY |
(* |
Don't make this dev a controlling tty
| *) |
| |
O_DSYNC |
(* |
Writes complete as `Synchronised I/O data
integrity completion'
| *) |
| |
O_SYNC |
(* |
Writes complete as `Synchronised I/O file
integrity completion'
| *) |
| |
O_RSYNC |
(* |
Reads complete as writes (depending on
O_SYNC/O_DSYNC)
| *) |
| |
O_SHARE_DELETE |
(* |
Windows only: allow the file to be deleted
while still open
| *) |
| |
O_CLOEXEC |
(* |
Set the close-on-exec flag on the
descriptor returned by
Unix.openfile | *) |
Unix.openfile
.type file_perm = int;
0o640
is read and write for user,
read for group, none for otherslet openfile: (string, list(open_flag), file_perm) => file_descr;
Unix.umask
). Return a file descriptor on the named file.let close: file_descr => unit;
let read: (file_descr, bytes, int, int) => int;
read fd buff ofs len
reads len
bytes from descriptor fd
,
storing them in byte sequence buff
, starting at position ofs
in
buff
. Return the number of bytes actually read.let write: (file_descr, bytes, int, int) => int;
write fd buff ofs len
writes len
bytes to descriptor fd
,
taking them from byte sequence buff
, starting at position ofs
in buff
. Return the number of bytes actually written. write
repeats the writing operation until all bytes have been written or
an error occurs.let single_write: (file_descr, bytes, int, int) => int;
write
, but attempts to write only once.
Thus, if an error occurs, single_write
guarantees that no data
has been written.let write_substring: (file_descr, string, int, int) => int;
write
, but take the data from a string instead of a byte
sequence.let single_write_substring: (file_descr, string, int, int) => int;
single_write
, but take the data from a string instead of
a byte sequence.let in_channel_of_descr: file_descr => Pervasives.in_channel;
set_binary_mode_in ic false
if text mode is desired.let out_channel_of_descr: file_descr => Pervasives.out_channel;
set_binary_mode_out oc false
if text mode is desired.let descr_of_in_channel: Pervasives.in_channel => file_descr;
let descr_of_out_channel: Pervasives.out_channel => file_descr;
type seek_command =
| |
SEEK_SET |
(* |
indicates positions relative to the beginning of the file
| *) |
| |
SEEK_CUR |
(* |
indicates positions relative to the current position
| *) |
| |
SEEK_END |
(* |
indicates positions relative to the end of the file
| *) |
Unix.lseek
.let lseek: (file_descr, int, seek_command) => int;
let truncate: (string, int) => unit;
let ftruncate: (file_descr, int) => unit;
type file_kind =
| |
S_REG |
(* |
Regular file
| *) |
| |
S_DIR |
(* |
Directory
| *) |
| |
S_CHR |
(* |
Character device
| *) |
| |
S_BLK |
(* |
Block device
| *) |
| |
S_LNK |
(* |
Symbolic link
| *) |
| |
S_FIFO |
(* |
Named pipe
| *) |
| |
S_SOCK |
(* |
Socket
| *) |
type stats = {
|
st_dev : int; |
(* |
Device number
| *) |
|
st_ino : int; |
(* |
Inode number
| *) |
|
st_kind : file_kind; |
(* |
Kind of the file
| *) |
|
st_perm : file_perm; |
(* |
Access rights
| *) |
|
st_nlink : int; |
(* |
Number of links
| *) |
|
st_uid : int; |
(* |
User id of the owner
| *) |
|
st_gid : int; |
(* |
Group ID of the file's group
| *) |
|
st_rdev : int; |
(* |
Device minor number
| *) |
|
st_size : int; |
(* |
Size in bytes
| *) |
|
st_atime : float; |
(* |
Last access time
| *) |
|
st_mtime : float; |
(* |
Last modification time
| *) |
|
st_ctime : float; |
(* |
Last status change time
| *) |
Unix.stat
calls.let stat: string => stats;
let lstat: string => stats;
Unix.stat
, but in case the file is a symbolic link,
return the information for the link itself.let fstat: file_descr => stats;
let isatty: file_descr => bool;
true
if the given file descriptor refers to a terminal or
console window, false
otherwise.module LargeFile: sig .. end
let unlink: string => unit;
let rename: (string, string) => unit;
rename old new
changes the name of a file from old
to new
.let link: (string, string) => unit;
link source dest
creates a hard link named dest
to the file
named source
.type access_permission =
| |
R_OK |
(* |
Read permission
| *) |
| |
W_OK |
(* |
Write permission
| *) |
| |
X_OK |
(* |
Execution permission
| *) |
| |
F_OK |
(* |
File exists
| *) |
Unix.access
call.let chmod: (string, file_perm) => unit;
let fchmod: (file_descr, file_perm) => unit;
let chown: (string, int, int) => unit;
let fchown: (file_descr, int, int) => unit;
let umask: int => int;
let access: (string, list(access_permission)) => unit;
Unix_error
otherwise.let dup: file_descr => file_descr;
let dup2: (file_descr, file_descr) => unit;
dup2 fd1 fd2
duplicates fd1
to fd2
, closing fd2
if already
opened.let set_nonblock: file_descr => unit;
EAGAIN
or EWOULDBLOCK
error instead of blocking;
writing on a descriptor on which there is temporarily no room
for writing also raises EAGAIN
or EWOULDBLOCK
.let clear_nonblock: file_descr => unit;
Unix.set_nonblock
.let set_close_on_exec: file_descr => unit;
exec
functions.let clear_close_on_exec: file_descr => unit;
Unix.set_close_on_exec
.let mkdir: (string, file_perm) => unit;
Unix.umask
).let rmdir: string => unit;
let chdir: string => unit;
let getcwd: unit => string;
let chroot: string => unit;
type dir_handle;
let opendir: string => dir_handle;
let readdir: dir_handle => string;
End_of_file
when the end of the directory has been reached.let rewinddir: dir_handle => unit;
let closedir: dir_handle => unit;
let pipe: unit => (file_descr, file_descr);
let mkfifo: (string, file_perm) => unit;
Unix.umask
).let create_process:
(string, array(string), file_descr, file_descr, file_descr) => int;
create_process prog args new_stdin new_stdout new_stderr
forks a new process that executes the program
in file prog
, with arguments args
. The pid of the new
process is returned immediately; the new process executes
concurrently with the current process.
The standard input and outputs of the new process are connected
to the descriptors new_stdin
, new_stdout
and new_stderr
.
Passing e.g. stdout
for new_stdout
prevents the redirection
and causes the new process to have the same standard output
as the current process.
The executable file prog
is searched in the path.
The new process has the same environment as the current process.let create_process_env:
(string, array(string), array(string), file_descr, file_descr, file_descr) =>
int;
create_process_env prog args env new_stdin new_stdout new_stderr
works as Unix.create_process
, except that the extra argument
env
specifies the environment passed to the program.let open_process_in: string => Pervasives.in_channel;
/bin/sh
(cf. system
).let open_process_out: string => Pervasives.out_channel;
Unix.open_process_in
, but redirect the standard input of
the command to a pipe. Data written to the returned output channel
is sent to the standard input of the command.
Warning: writes on output channels are buffered, hence be careful
to call Pervasives.flush
at the right times to ensure
correct synchronization.let open_process: string => (Pervasives.in_channel, Pervasives.out_channel);
Unix.open_process_out
, but redirects both the standard input
and standard output of the command to pipes connected to the two
returned channels. The input channel is connected to the output
of the command, and the output channel to the input of the command.let open_process_full:
(string, array(string)) =>
(Pervasives.in_channel, Pervasives.out_channel, Pervasives.in_channel);
Unix.open_process
, but the second argument specifies
the environment passed to the command. The result is a triple
of channels connected respectively to the standard output, standard input,
and standard error of the command.let close_process_in: Pervasives.in_channel => process_status;
Unix.open_process_in
,
wait for the associated command to terminate,
and return its termination status.let close_process_out: Pervasives.out_channel => process_status;
Unix.open_process_out
,
wait for the associated command to terminate,
and return its termination status.let close_process:
((Pervasives.in_channel, Pervasives.out_channel)) => process_status;
Unix.open_process
,
wait for the associated command to terminate,
and return its termination status.let close_process_full:
((Pervasives.in_channel, Pervasives.out_channel, Pervasives.in_channel)) =>
process_status;
Unix.open_process_full
,
wait for the associated command to terminate,
and return its termination status.let symlink: (string, string) => unit;
symlink source dest
creates the file dest
as a symbolic link
to the file source
.let readlink: string => string;
let select:
(list(file_descr), list(file_descr), list(file_descr), float) =>
(list(file_descr), list(file_descr), list(file_descr));
type lock_command =
| |
F_ULOCK |
(* |
Unlock a region
| *) |
| |
F_LOCK |
(* |
Lock a region for writing, and block if already locked
| *) |
| |
F_TLOCK |
(* |
Lock a region for writing, or fail if already locked
| *) |
| |
F_TEST |
(* |
Test a region for other process locks
| *) |
| |
F_RLOCK |
(* |
Lock a region for reading, and block if already locked
| *) |
| |
F_TRLOCK |
(* |
Lock a region for reading, or fail if already locked
| *) |
Unix.lockf
.let lockf: (file_descr, lock_command, int) => unit;
lockf fd cmd size
puts a lock on a region of the file opened
as fd
. The region starts at the current read/write position for
fd
(as set by Unix.lseek
), and extends size
bytes forward if
size
is positive, size
bytes backwards if size
is negative,
or to the end of the file if size
is zero.
A write lock prevents any other
process from acquiring a read or write lock on the region.
A read lock prevents any other
process from acquiring a write lock on the region, but lets
other processes acquire read locks on it.
The F_LOCK
and F_TLOCK
commands attempts to put a write lock
on the specified region.
The F_RLOCK
and F_TRLOCK
commands attempts to put a read lock
on the specified region.
If one or several locks put by another process prevent the current process
from acquiring the lock, F_LOCK
and F_RLOCK
block until these locks
are removed, while F_TLOCK
and F_TRLOCK
fail immediately with an
exception.
The F_ULOCK
removes whatever locks the current process has on
the specified region.
Finally, the F_TEST
command tests whether a write lock can be
acquired on the specified region, without actually putting a lock.
It returns immediately if successful, or fails otherwise.
Sys.signal
and Sys.set_signal
.let kill: (int, int) => unit;
kill pid sig
sends signal number sig
to the process
with id pid
. Under Windows, only the Sys.sigkill
signal
is emulated.type sigprocmask_command =
| |
SIG_SETMASK |
| |
SIG_BLOCK |
| |
SIG_UNBLOCK |
let sigprocmask: (sigprocmask_command, list(int)) => list(int);
sigprocmask cmd sigs
changes the set of blocked signals.
If cmd
is SIG_SETMASK
, blocked signals are set to those in
the list sigs
.
If cmd
is SIG_BLOCK
, the signals in sigs
are added to
the set of blocked signals.
If cmd
is SIG_UNBLOCK
, the signals in sigs
are removed
from the set of blocked signals.
sigprocmask
returns the set of previously blocked signals.let sigpending: unit => list(int);
let sigsuspend: list(int) => unit;
sigsuspend sigs
atomically sets the blocked signals to sigs
and waits for a non-ignored, non-blocked signal to be delivered.
On return, the blocked signals are reset to their initial value.let pause: unit => unit;
type process_times = {
|
tms_utime : float; |
(* |
User time for the process
| *) |
|
tms_stime : float; |
(* |
System time for the process
| *) |
|
tms_cutime : float; |
(* |
User time for the children processes
| *) |
|
tms_cstime : float; |
(* |
System time for the children processes
| *) |
type tm = {
|
tm_sec : int; |
(* |
Seconds 0..60
| *) |
|
tm_min : int; |
(* |
Minutes 0..59
| *) |
|
tm_hour : int; |
(* |
Hours 0..23
| *) |
|
tm_mday : int; |
(* |
Day of month 1..31
| *) |
|
tm_mon : int; |
(* |
Month of year 0..11
| *) |
|
tm_year : int; |
(* |
Year - 1900
| *) |
|
tm_wday : int; |
(* |
Day of week (Sunday is 0)
| *) |
|
tm_yday : int; |
(* |
Day of year 0..365
| *) |
|
tm_isdst : bool; |
(* |
Daylight time savings in effect
| *) |
let time: unit => float;
let gettimeofday: unit => float;
Unix.time
, but with resolution better than 1 second.let gmtime: float => tm;
Unix.time
, into a date and
a time. Assumes UTC (Coordinated Universal Time), also known as GMT.let localtime: float => tm;
Unix.time
, into a date and
a time. Assumes the local time zone.let mktime: tm => (float, tm);
tm
argument, into
a time in seconds, as returned by Unix.time
. The tm_isdst
,
tm_wday
and tm_yday
fields of tm
are ignored. Also return a
normalized copy of the given tm
record, with the tm_wday
,
tm_yday
, and tm_isdst
fields recomputed from the other fields,
and the other fields normalized (so that, e.g., 40 October is
changed into 9 November). The tm
argument is interpreted in the
local time zone.let alarm: int => int;
SIGALRM
signal after the given number of seconds.let sleep: int => unit;
let times: unit => process_times;
let utimes: (string, float, float) => unit;
0.0
is interpreted as the
current time.type interval_timer =
| |
ITIMER_REAL |
(* |
decrements in real time, and sends the signal
SIGALRM when
expired. | *) |
| |
ITIMER_VIRTUAL |
(* |
decrements in process virtual time, and sends
SIGVTALRM
when expired. | *) |
| |
ITIMER_PROF |
(* |
(for profiling) decrements both when the process
is running and when the system is running on behalf of the
process; it sends
SIGPROF when expired. | *) |
type interval_timer_status = {
|
it_interval : float; |
(* |
Period
| *) |
|
it_value : float; |
(* |
Current value of the timer
| *) |
let getitimer: interval_timer => interval_timer_status;
let setitimer:
(interval_timer, interval_timer_status) => interval_timer_status;
setitimer t s
sets the interval timer t
and returns
its previous status. The s
argument is interpreted as follows:
s.it_value
, if nonzero, is the time to the next timer expiration;
s.it_interval
, if nonzero, specifies a value to
be used in reloading it_value
when the timer expires.
Setting s.it_value
to zero disables the timer.
Setting s.it_interval
to zero causes the timer to be disabled
after its next expiration.let getuid: unit => int;
let geteuid: unit => int;
let setuid: int => unit;
let getgid: unit => int;
let getegid: unit => int;
let setgid: int => unit;
let getgroups: unit => array(int);
let setgroups: array(int) => unit;
setgroups groups
sets the supplementary group IDs for the
calling process. Appropriate privileges are required.let initgroups: (string, int) => unit;
initgroups user group
initializes the group access list by
reading the group database /etc/group and using all groups of
which user
is a member. The additional group group
is also
added to the list.type passwd_entry = {
|
pw_name : string; |
|
pw_passwd : string; |
|
pw_uid : int; |
|
pw_gid : int; |
|
pw_gecos : string; |
|
pw_dir : string; |
|
pw_shell : string; |
passwd
database.type group_entry = {
|
gr_name : string; |
|
gr_passwd : string; |
|
gr_gid : int; |
|
gr_mem : string array; |
groups
database.let getlogin: unit => string;
let getpwnam: string => passwd_entry;
passwd
with the given name, or raise
Not_found
.let getgrnam: string => group_entry;
group
with the given name, or raise
Not_found
.let getpwuid: int => passwd_entry;
passwd
with the given user id, or raise
Not_found
.let getgrgid: int => group_entry;
group
with the given group id, or raise
Not_found
.type inet_addr;
let inet_addr_of_string: string => inet_addr;
XXX.YYY.ZZZ.TTT
)
for IPv4 addresses, and up to 8 numbers separated by colons
for IPv6 addresses. Raise Failure
when given a string that
does not match these formats.let string_of_inet_addr: inet_addr => string;
Unix.inet_addr_of_string
for a description of the
printable representation.let inet_addr_any: inet_addr;
bind
, representing
all the Internet addresses that the host machine possesses.let inet_addr_loopback: inet_addr;
<IP_ADDRESS>
).let inet6_addr_any: inet_addr;
bind
, representing
all the Internet addresses that the host machine possesses.let inet6_addr_loopback: inet_addr;
::1
).type socket_domain =
| |
PF_UNIX |
(* |
Unix domain
| *) |
| |
PF_INET |
(* |
Internet domain (IPv4)
| *) |
| |
PF_INET6 |
(* |
Internet domain (IPv6)
| *) |
PF_INET6
).type socket_type =
| |
SOCK_STREAM |
(* |
Stream socket
| *) |
| |
SOCK_DGRAM |
(* |
Datagram socket
| *) |
| |
SOCK_RAW |
(* |
Raw socket
| *) |
| |
SOCK_SEQPACKET |
(* |
Sequenced packets socket
| *) |
type sockaddr =
| |
ADDR_UNIX of string |
|||
| |
ADDR_INET of inet_addr * int |
(* |
The type of socket addresses.
ADDR_UNIX name is a socket
address in the Unix domain; name is a file name in the file
system. ADDR_INET(addr,port) is a socket address in the Internet
domain; addr is the Internet address of the machine, and
port is the port number. | *) |
let socket: (socket_domain, socket_type, int) => file_descr;
let domain_of_sockaddr: sockaddr => socket_domain;
let socketpair: (socket_domain, socket_type, int) => (file_descr, file_descr);
let accept: file_descr => (file_descr, sockaddr);
let bind: (file_descr, sockaddr) => unit;
let connect: (file_descr, sockaddr) => unit;
let listen: (file_descr, int) => unit;
type shutdown_command =
| |
SHUTDOWN_RECEIVE |
(* |
Close for receiving
| *) |
| |
SHUTDOWN_SEND |
(* |
Close for sending
| *) |
| |
SHUTDOWN_ALL |
(* |
Close both
| *) |
shutdown
.let shutdown: (file_descr, shutdown_command) => unit;
SHUTDOWN_SEND
as second argument
causes reads on the other end of the connection to return
an end-of-file condition.
SHUTDOWN_RECEIVE
causes writes on the other end of the connection
to return a closed pipe condition (SIGPIPE
signal).let getsockname: file_descr => sockaddr;
let getpeername: file_descr => sockaddr;
type msg_flag =
| |
MSG_OOB |
|||
| |
MSG_DONTROUTE |
|||
| |
MSG_PEEK |
(* | *) |
let recv: (file_descr, bytes, int, int, list(msg_flag)) => int;
let recvfrom: (file_descr, bytes, int, int, list(msg_flag)) => (int, sockaddr);
let send: (file_descr, bytes, int, int, list(msg_flag)) => int;
let send_substring: (file_descr, string, int, int, list(msg_flag)) => int;
send
, but take the data from a string instead of a byte
sequence.let sendto: (file_descr, bytes, int, int, list(msg_flag), sockaddr) => int;
let sendto_substring:
(file_descr, string, int, int, list(msg_flag), sockaddr) => int;
sendto
, but take the data from a string instead of a
byte sequence.type socket_bool_option =
| |
SO_DEBUG |
(* |
Record debugging information
| *) |
| |
SO_BROADCAST |
(* |
Permit sending of broadcast messages
| *) |
| |
SO_REUSEADDR |
(* |
Allow reuse of local addresses for bind
| *) |
| |
SO_KEEPALIVE |
(* |
Keep connection active
| *) |
| |
SO_DONTROUTE |
(* |
Bypass the standard routing algorithms
| *) |
| |
SO_OOBINLINE |
(* |
Leave out-of-band data in line
| *) |
| |
SO_ACCEPTCONN |
(* |
Report whether socket listening is enabled
| *) |
| |
TCP_NODELAY |
(* |
Control the Nagle algorithm for TCP sockets
| *) |
| |
IPV6_ONLY |
(* |
Forbid binding an IPv6 socket to an IPv4 address
| *) |
Unix.getsockopt
and modified with Unix.setsockopt
. These options have a boolean
(true
/false
) value.type socket_int_option =
| |
SO_SNDBUF |
(* |
Size of send buffer
| *) |
| |
SO_RCVBUF |
(* |
Size of received buffer
| *) |
| |
SO_ERROR |
(* |
Deprecated. Use
Unix.getsockopt_error instead. | *) |
| |
SO_TYPE |
(* |
Report the socket type
| *) |
| |
SO_RCVLOWAT |
(* |
Minimum number of bytes to process for input operations
| *) |
| |
SO_SNDLOWAT |
(* |
Minimum number of bytes to process for output
operations
| *) |
Unix.getsockopt_int
and modified with Unix.setsockopt_int
. These options have an
integer value.type socket_optint_option =
| |
SO_LINGER |
(* |
Whether to linger on closed connections
that have data present, and for how long
(in seconds)
| *) |
Unix.getsockopt_optint
and modified with Unix.setsockopt_optint
. These options have a
value of type int option
, with None
meaning ``disabled''.type socket_float_option =
| |
SO_RCVTIMEO |
(* |
Timeout for input operations
| *) |
| |
SO_SNDTIMEO |
(* |
Timeout for output operations
| *) |
Unix.getsockopt_float
and modified with Unix.setsockopt_float
. These options have a
floating-point value representing a time in seconds.
The value 0 means infinite timeout.let getsockopt: (file_descr, socket_bool_option) => bool;
let setsockopt: (file_descr, socket_bool_option, bool) => unit;
let getsockopt_int: (file_descr, socket_int_option) => int;
Unix.getsockopt
for an integer-valued socket option.let setsockopt_int: (file_descr, socket_int_option, int) => unit;
Unix.setsockopt
for an integer-valued socket option.let getsockopt_optint: (file_descr, socket_optint_option) => option(int);
let setsockopt_optint: (file_descr, socket_optint_option, option(int)) => unit;
let getsockopt_float: (file_descr, socket_float_option) => float;
Unix.getsockopt
for a socket option whose value is a
floating-point number.let setsockopt_float: (file_descr, socket_float_option, float) => unit;
Unix.setsockopt
for a socket option whose value is a
floating-point number.let getsockopt_error: file_descr => option(error);
let open_connection:
sockaddr => (Pervasives.in_channel, Pervasives.out_channel);
Pervasives.flush
on the output channel at the right
times to ensure correct synchronization.let shutdown_connection: Pervasives.in_channel => unit;
Unix.open_connection
;
that is, transmit an end-of-file condition to the server reading
on the other side of the connection. This does not fully close the
file descriptor associated with the channel, which you must remember
to free via Pervasives.close_in
.let establish_server:
((Pervasives.in_channel, Pervasives.out_channel) => unit, sockaddr) => unit;
Unix.establish_server
never returns normally.type host_entry = {
|
h_name : string; |
|
h_aliases : string array; |
|
h_addrtype : socket_domain; |
|
h_addr_list : inet_addr array; |
hosts
database.type protocol_entry = {
|
p_name : string; |
|
p_aliases : string array; |
|
p_proto : int; |
protocols
database.type service_entry = {
|
s_name : string; |
|
s_aliases : string array; |
|
s_port : int; |
|
s_proto : string; |
services
database.let gethostname: unit => string;
let gethostbyname: string => host_entry;
hosts
with the given name, or raise
Not_found
.let gethostbyaddr: inet_addr => host_entry;
hosts
with the given address, or raise
Not_found
.let getprotobyname: string => protocol_entry;
protocols
with the given name, or raise
Not_found
.let getprotobynumber: int => protocol_entry;
protocols
with the given protocol number,
or raise Not_found
.let getservbyname: (string, string) => service_entry;
services
with the given name, or raise
Not_found
.let getservbyport: (int, string) => service_entry;
services
with the given service number,
or raise Not_found
.type addr_info = {
|
ai_family : socket_domain; |
(* |
Socket domain
| *) |
|
ai_socktype : socket_type; |
(* |
Socket type
| *) |
|
ai_protocol : int; |
(* |
Socket protocol number
| *) |
|
ai_addr : sockaddr; |
(* |
Address
| *) |
|
ai_canonname : string; |
(* |
Canonical host name
| *) |
Unix.getaddrinfo
.type getaddrinfo_option =
| |
AI_FAMILY of socket_domain |
(* |
Impose the given socket domain
| *) |
| |
AI_SOCKTYPE of socket_type |
(* |
Impose the given socket type
| *) |
| |
AI_PROTOCOL of int |
(* |
Impose the given protocol
| *) |
| |
AI_NUMERICHOST |
(* |
Do not call name resolver,
expect numeric IP address
| *) |
| |
AI_CANONNAME |
(* |
Fill the
ai_canonname field
of the result | *) |
| |
AI_PASSIVE |
(* |
Set address to ``any'' address
for use with
Unix.bind | *) |
Unix.getaddrinfo
.let getaddrinfo: (string, string, list(getaddrinfo_option)) => list(addr_info);
getaddrinfo host service opts
returns a list of Unix.addr_info
records describing socket parameters and addresses suitable for
communicating with the given host and service. The empty list is
returned if the host or service names are unknown, or the constraints
expressed in opts
cannot be satisfied.
host
is either a host name or the string representation of an IP
address. host
can be given as the empty string; in this case,
the ``any'' address or the ``loopback'' address are used,
depending whether opts
contains AI_PASSIVE
.
service
is either a service name or the string representation of
a port number. service
can be given as the empty string;
in this case, the port field of the returned addresses is set to 0.
opts
is a possibly empty list of options that allows the caller
to force a particular socket domain (e.g. IPv6 only or IPv4 only)
or a particular socket type (e.g. TCP only or UDP only).
type name_info = {
|
ni_hostname : string; |
(* |
Name or IP address of host
| *) |
|
ni_service : string; |
Unix.getnameinfo
.type getnameinfo_option =
| |
NI_NOFQDN |
(* |
Do not qualify local host names
| *) |
| |
NI_NUMERICHOST |
(* |
Always return host as IP address
| *) |
| |
NI_NAMEREQD |
(* |
Fail if host name cannot be determined
| *) |
| |
NI_NUMERICSERV |
(* |
Always return service as port number
| *) |
| |
NI_DGRAM |
(* |
Consider the service as UDP-based
instead of the default TCP
| *) |
Unix.getnameinfo
.let getnameinfo: (sockaddr, list(getnameinfo_option)) => name_info;
getnameinfo addr opts
returns the host name and service name
corresponding to the socket address addr
. opts
is a possibly
empty list of options that governs how these names are obtained.
Raise Not_found
if an error occurs.termios
man page for a
complete description.type terminal_io = {
|
mutable c_ignbrk : bool; |
(* |
Ignore the break condition.
| *) |
|
mutable c_brkint : bool; |
(* |
Signal interrupt on break condition.
| *) |
|
mutable c_ignpar : bool; |
(* |
Ignore characters with parity errors.
| *) |
|
mutable c_parmrk : bool; |
(* |
Mark parity errors.
| *) |
|
mutable c_inpck : bool; |
(* |
Enable parity check on input.
| *) |
|
mutable c_istrip : bool; |
(* |
Strip 8th bit on input characters.
| *) |
|
mutable c_inlcr : bool; |
(* |
Map NL to CR on input.
| *) |
|
mutable c_igncr : bool; |
(* |
Ignore CR on input.
| *) |
|
mutable c_icrnl : bool; |
(* |
Map CR to NL on input.
| *) |
|
mutable c_ixon : bool; |
(* |
Recognize XON/XOFF characters on input.
| *) |
|
mutable c_ixoff : bool; |
(* |
Emit XON/XOFF chars to control input flow.
| *) |
|
mutable c_opost : bool; |
(* |
Enable output processing.
| *) |
|
mutable c_obaud : int; |
(* |
Output baud rate (0 means close connection).
| *) |
|
mutable c_ibaud : int; |
(* |
Input baud rate.
| *) |
|
mutable c_csize : int; |
(* |
Number of bits per character (5-8).
| *) |
|
mutable c_cstopb : int; |
(* |
Number of stop bits (1-2).
| *) |
|
mutable c_cread : bool; |
(* |
Reception is enabled.
| *) |
|
mutable c_parenb : bool; |
(* |
Enable parity generation and detection.
| *) |
|
mutable c_parodd : bool; |
(* |
Specify odd parity instead of even.
| *) |
|
mutable c_hupcl : bool; |
(* |
Hang up on last close.
| *) |
|
mutable c_clocal : bool; |
(* |
Ignore modem status lines.
| *) |
|
mutable c_isig : bool; |
(* |
Generate signal on INTR, QUIT, SUSP.
| *) |
|
mutable c_icanon : bool; |
(* |
Enable canonical processing
(line buffering and editing)
| *) |
|
mutable c_noflsh : bool; |
(* |
Disable flush after INTR, QUIT, SUSP.
| *) |
|
mutable c_echo : bool; |
(* |
Echo input characters.
| *) |
|
mutable c_echoe : bool; |
(* |
Echo ERASE (to erase previous character).
| *) |
|
mutable c_echok : bool; |
(* |
Echo KILL (to erase the current line).
| *) |
|
mutable c_echonl : bool; |
(* |
Echo NL even if c_echo is not set.
| *) |
|
mutable c_vintr : char; |
(* |
Interrupt character (usually ctrl-C).
| *) |
|
mutable c_vquit : char; |
(* |
Quit character (usually ctrl-\).
| *) |
|
mutable c_verase : char; |
(* |
Erase character (usually DEL or ctrl-H).
| *) |
|
mutable c_vkill : char; |
(* |
Kill line character (usually ctrl-U).
| *) |
|
mutable c_veof : char; |
(* |
End-of-file character (usually ctrl-D).
| *) |
|
mutable c_veol : char; |
(* |
Alternate end-of-line char. (usually none).
| *) |
|
mutable c_vmin : int; |
(* |
Minimum number of characters to read
before the read request is satisfied.
| *) |
|
mutable c_vtime : int; |
(* |
Maximum read wait (in 0.1s units).
| *) |
|
mutable c_vstart : char; |
(* |
Start character (usually ctrl-Q).
| *) |
|
mutable c_vstop : char; |
(* |
Stop character (usually ctrl-S).
| *) |
let tcgetattr: file_descr => terminal_io;
type setattr_when =
| |
TCSANOW |
| |
TCSADRAIN |
| |
TCSAFLUSH |
let tcsetattr: (file_descr, setattr_when, terminal_io) => unit;
TCSANOW
),
when all pending output has been transmitted (TCSADRAIN
),
or after flushing all input that has been received but not
read (TCSAFLUSH
). TCSADRAIN
is recommended when changing
the output parameters; TCSAFLUSH
, when changing the input
parameters.let tcsendbreak: (file_descr, int) => unit;
let tcdrain: file_descr => unit;
type flush_queue =
| |
TCIFLUSH |
| |
TCOFLUSH |
| |
TCIOFLUSH |
let tcflush: (file_descr, flush_queue) => unit;
TCIFLUSH
flushes data received but not read,
TCOFLUSH
flushes data written but not transmitted, and
TCIOFLUSH
flushes both.type flow_action =
| |
TCOOFF |
| |
TCOON |
| |
TCIOFF |
| |
TCION |
let tcflow: (file_descr, flow_action) => unit;
TCOOFF
suspends output, TCOON
restarts output,
TCIOFF
transmits a STOP character to suspend input,
and TCION
transmits a START character to restart input.let setsid: unit => int;


printReverse()
that takes an array as an argument and prints out the elements in the array in reverse order (do no actually reverse the array itself)isUniform()
which takes an array as an argument and returns true if all elements in the array are identicalsumArray()
that accepts an array of numbers and returns the sum of all numbers in the arraymax()
that accepts an array of numbers and returns the maximum number in the arrayAnswers should print to this page's console...view by pressing F12
Javascript Code:
// TODO
Output:
// TODO


A. P. J. Abdul Kalam: An inspiration to many
Dream is not the thing you see in sleep but is that thing that doesn't let you sleep ~Dr. Kalam
A. P. J Abdul Kalam as former president
- 1931 - Born Avul Pakir Jainulabdeen Abdul Kalam on October 15, in Rameswaram, Tamil Nadu.
- 1954 - Graduates in Physics from Saint Joseph's College, Tiruchirappalli, in 1954.
- 1960 - Gains degree in Aeronautical Engineering from Madras Institute of Technology.
- 1969 - Transferred to ISRO from the DRDO.
- 1980 - India enters the space club by putting the Rohini satellite in the near earth orbit with the first indigenous Satellite Launch Vehicle (SLV-III), developed under the stewardship of Dr. Kalam.
- 1980s-1990s - As the chief of the Integrated Guided Missile Development Programme, he was responsible for the development and operationalisation of AGNI and PRITHVI Missiles.
- 1992-1999 - works as Chief Scientific Advisor to the PM and Secretary of the DRDO.
- 1998 - India conducts the Pokhran II nuclear tests in May with Dr. Kalam as the chief project coordinator.
- 1999-2001 - Principal Scientific Advisor to the Government of India.
- 2002-2007 - President of India
- 2015 - The 11th President of India, widely acclaimed as the "people's President", passed away on July 27, 2015 after collapsing during a lecture at the Indian Institute of Management in Shillong.
Time line of Dr. Kalam:
Awards and honours
| # | Year of award or honour | Name of award or honour | Awarding organisation |
|---|---|---|---|
| 1 | 2014 | Doctor of Science | Edinburgh University, UK |
| 2 | 2013 | Von Braun Award | National Space Society |
| 3 | 2012 | Doctor of Laws (Honoris Causa) | Simon Fraser University |
| 4 | 2011 | IEEE Honorary Membership | IEEE |
| 5 | 2010 | Doctor of Engineering | University of Waterloo |
| 6 | 2009 | Honorary Doctorate | Oakland University |
| 7 | 2009 | Hoover Medal | ASME Foundation, USA |
| 8 | 2009 | International von Kármán Wings Award | California Institute of Technology, USA |
| 9 | 2008 | Doctor of Engineering (Honoris Causa)p | Nanyang Technological University, Singapore |
| 10 | 2008 | Doctor of Science (Honoris Causa) | Aligarh Muslim University, Aligarh |
| 11 | 2007 | Honorary Doctorate of Science | University of Wolverhampton, UK |
| 12 | 2007 | Honorary Doctorate of Science and Technology | Carnegie Mellon University |
| 13 | 2007 | King Charles II Medal | Royal Society, UK |
| 14 | 2000 | Ramanujan Award | Alwars Research Centre, Chennai |
| 15 | 1998 | Veer Savarkar Award | Government of India |
| 16 | 1997 | Bharat Ratna | Government of India |
| 17 | 1997 | Indira Gandhi Award for National Integration | Indian National Congress |
| 18 | 1995 | Honorary Fellow | National Academy of Medical Sciences |
| 19 | 1994 | Distinguished Fellow | Institute of Directors (India) |
| 20 | 1990 | Padma Vibhushan | Government of India |
| 21 | 1981 | Padma Bhushan | Government of India |
"Suitably named 'the People's President', Dr. Kalam's humility and dedication to public service served as an inspiration to millions of Indians and admirers around the world.
-- Barack Obama


--- layout: post title: old gouache date: '2017-02-26T10:30:12+01:00' categories: - Illustration picture_url: https://film-Storyboards.tumblr.com/post/157738119648/old-gouache ---
old gouache


Shopping
Flo, Almasi, Destiny, Alex, Isis and Zeba
Migos
Home
Culture
Social Media
Shopping
Contact
Female Apparel


Class: Aws::CloudSearch::Types::DomainStatus
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Struct
|
|
|
Instance Chain:
self,
::Aws::Structure ,
Struct
|
|
| Inherits: |
Struct
|
| Defined in: | gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb |
Overview
The current status of the search domain.
Constant Summary
Instance Attribute Summary
-
#arn ⇒ String
rw
The Amazon
::Aws::CloudSearch::Resource
Name (ARN) of the search domain. -
#created ⇒ Boolean
rw
True if the search domain is created.
-
#deleted ⇒ Boolean
rw
True if the search domain has been deleted.
-
#doc_service ⇒ Types::ServiceEndpoint
rw
The service endpoint for updating documents in a search domain.
-
#domain_id ⇒ String
rw
An internally generated unique identifier for a domain.
-
#domain_name ⇒ String
rw
A string that represents the name of a domain.
- #limits ⇒ Types::Limits rw
-
#processing ⇒ Boolean
rw
True if processing is being done to activate the current domain configuration.
-
#requires_index_documents ⇒ Boolean
rw
True if IndexDocuments needs to be called to activate the current domain configuration.
-
#search_instance_count ⇒ Integer
rw
The number of search instances that are available to process search requests.
-
#search_instance_type ⇒ String
rw
The instance type that is being used to process search requests.
-
#search_partition_count ⇒ Integer
rw
The number of partitions across which the search index is spread.
-
#search_service ⇒ Types::ServiceEndpoint
rw
The service endpoint for requesting search results from a search domain.
Instance Method Summary
::Aws::Structure
- Included
| #to_hash | Alias for Structure#to_h. |
Instance Attribute Details
#arn ⇒ String
(rw)
The Amazon ::Aws::CloudSearch::Resource
Name (ARN) of the search domain. See
Identifiers for ::Aws::IAM
Entities in Using AWS Identity and Access
Management for more information.
# File 'gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb', line 1127
class DomainStatus < Struct.new( :domain_id, :domain_name, :arn, :created, :deleted, :doc_service, :search_service, :requires_index_documents, :processing, :search_instance_type, :search_partition_count, :search_instance_count, :limits) SENSITIVE = [] include Aws::Structure end
#created ⇒ Boolean
(rw)
True if the search domain is created. It can take several minutes to initialize a domain when CreateDomain is called. Newly created search domains are returned from DescribeDomains with a false value for Created until domain creation is complete.
# File 'gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb', line 1127
class DomainStatus < Struct.new( :domain_id, :domain_name, :arn, :created, :deleted, :doc_service, :search_service, :requires_index_documents, :processing, :search_instance_type, :search_partition_count, :search_instance_count, :limits) SENSITIVE = [] include Aws::Structure end
#deleted ⇒ Boolean
(rw)
True if the search domain has been deleted. The system must clean up resources dedicated to the search domain when DeleteDomain is called. Newly deleted search domains are returned from DescribeDomains with a true value for IsDeleted for several minutes until resource cleanup is complete.
# File 'gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb', line 1127
class DomainStatus < Struct.new( :domain_id, :domain_name, :arn, :created, :deleted, :doc_service, :search_service, :requires_index_documents, :processing, :search_instance_type, :search_partition_count, :search_instance_count, :limits) SENSITIVE = [] include Aws::Structure end
#doc_service ⇒ Types::ServiceEndpoint (rw)
The service endpoint for updating documents in a search domain.
# File 'gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb', line 1127
class DomainStatus < Struct.new( :domain_id, :domain_name, :arn, :created, :deleted, :doc_service, :search_service, :requires_index_documents, :processing, :search_instance_type, :search_partition_count, :search_instance_count, :limits) SENSITIVE = [] include Aws::Structure end
#domain_id ⇒ String
(rw)
An internally generated unique identifier for a domain.
# File 'gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb', line 1127
class DomainStatus < Struct.new( :domain_id, :domain_name, :arn, :created, :deleted, :doc_service, :search_service, :requires_index_documents, :processing, :search_instance_type, :search_partition_count, :search_instance_count, :limits) SENSITIVE = [] include Aws::Structure end
#domain_name ⇒ String
(rw)
A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).
# File 'gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb', line 1127
class DomainStatus < Struct.new( :domain_id, :domain_name, :arn, :created, :deleted, :doc_service, :search_service, :requires_index_documents, :processing, :search_instance_type, :search_partition_count, :search_instance_count, :limits) SENSITIVE = [] include Aws::Structure end
#limits ⇒ Types::Limits (rw)
[ GitHub ]# File 'gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb', line 1127
class DomainStatus < Struct.new( :domain_id, :domain_name, :arn, :created, :deleted, :doc_service, :search_service, :requires_index_documents, :processing, :search_instance_type, :search_partition_count, :search_instance_count, :limits) SENSITIVE = [] include Aws::Structure end
#processing ⇒ Boolean
(rw)
True if processing is being done to activate the current domain configuration.
# File 'gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb', line 1127
class DomainStatus < Struct.new( :domain_id, :domain_name, :arn, :created, :deleted, :doc_service, :search_service, :requires_index_documents, :processing, :search_instance_type, :search_partition_count, :search_instance_count, :limits) SENSITIVE = [] include Aws::Structure end
#requires_index_documents ⇒ Boolean
(rw)
True if IndexDocuments needs to be called to activate the current domain configuration.
# File 'gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb', line 1127
class DomainStatus < Struct.new( :domain_id, :domain_name, :arn, :created, :deleted, :doc_service, :search_service, :requires_index_documents, :processing, :search_instance_type, :search_partition_count, :search_instance_count, :limits) SENSITIVE = [] include Aws::Structure end
#search_instance_count ⇒ Integer
(rw)
The number of search instances that are available to process search requests.
# File 'gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb', line 1127
class DomainStatus < Struct.new( :domain_id, :domain_name, :arn, :created, :deleted, :doc_service, :search_service, :requires_index_documents, :processing, :search_instance_type, :search_partition_count, :search_instance_count, :limits) SENSITIVE = [] include Aws::Structure end
#search_instance_type ⇒ String
(rw)
The instance type that is being used to process search requests.
# File 'gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb', line 1127
class DomainStatus < Struct.new( :domain_id, :domain_name, :arn, :created, :deleted, :doc_service, :search_service, :requires_index_documents, :processing, :search_instance_type, :search_partition_count, :search_instance_count, :limits) SENSITIVE = [] include Aws::Structure end
#search_partition_count ⇒ Integer
(rw)
The number of partitions across which the search index is spread.
# File 'gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb', line 1127
class DomainStatus < Struct.new( :domain_id, :domain_name, :arn, :created, :deleted, :doc_service, :search_service, :requires_index_documents, :processing, :search_instance_type, :search_partition_count, :search_instance_count, :limits) SENSITIVE = [] include Aws::Structure end
#search_service ⇒ Types::ServiceEndpoint (rw)
The service endpoint for requesting search results from a search domain.
# File 'gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/types.rb', line 1127
class DomainStatus < Struct.new( :domain_id, :domain_name, :arn, :created, :deleted, :doc_service, :search_service, :requires_index_documents, :processing, :search_instance_type, :search_partition_count, :search_instance_count, :limits) SENSITIVE = [] include Aws::Structure end


I am Rachel Wong, a 1B Computer Engineering student at the University of Waterloo. I had my first coop term as an IT Coop Intern at Allstream Inc and currently am working as a Quality Engineer Co-op at RBC for my second coop.
I am from Hong Kong.
My favourite food is matcha.
This is my second year in Canada. Canada is too cold.
I really like to take pictures xD
I am constantly looking for internships as a coop student. Feel free to email me.


|
Glorious
Day
(Weezer) |
|
Gonna
make my move
Gonna make it stay Gonna make it last Nevermind the past Living for today Hey, hey You know what you want me to say Right, right Fight, fight We can start a glorious day Gonna take my chance Gonna rock and dance Gonna hit the ground With a brand new sound Looking for romance Hey, hey You know what you want me to say Right, right Fight, fight We can start a glorious day Glorious children on my mind Glorious wastings of my time Glorious plans we make up Forcing things in line Hey, hey You know what you want me to say Right, right Fight, fight We can start a glorious day Glorious children on my mind Glorious wastings of my time Glorious plans we make up Forcing things in line Gonna rock it out Gonna scream and shout Gonna do it right Standing in the light Perchin' on the clouds Gonna do it right Standing in the light Perchin' on the clouds Gonna do it right Standing in the light Perchin' on the clouds Hey |


With gorgeous sound and visuals, immersive and expansive modes for single players, captivating multiplayer options, a rewarding economy, and a staggering amount of cars and tracks, Forza Motorsport 6 delivers a powerful racing experience. It single-handedly makes the Xbox One console appealing, and is a no-brainer “gotta have it” title for those that have Microsoft’s gaming machine in their homes.
Like a big bucket of Hot Wheels brought to life, Forza Motorsport 6 is first-order car porn for the automobile obsessed but remains an accessible and exciting racer for those who just want to drive fast in something red with a horse logo on it.
No proper controller settings makes it a chore to play, all cars feel like they under steer way to much, only way to counter this is have all the assists on so no credits. Will be trading it in and stick to project cars.


Non-bank financial institutions and money service businesses
These include cheque-cashing services, currency brokers and dealers, casinos and money transmitters. Currency dealers specialising in currencies of countries with poor regulation should be classified as potentially extreme-risk customers.
Trusts
Trust beneficiaries may hide behind the trustee, which may be a financial organisation.
Bearer share corporations
Ownership may change quickly and easily without being traced.
Charities
Donations are often collected in cash, which makes charities vulnerable to money laundering. Terrorist organisations often finance their activities via charitable front organisations.
Foreign customers
Individuals and companies from foreign countries pose a high risk because it is more difficult to collect identification, verification and transaction information from them.


This how am going to show you how you can know your year of birth in a simple way. The following example i did for the Ghanian people so that they can know there month and year of their birthday using functions. You can also try and put your details if you have a culture name of Ghana and see the response.
Use this form to enter your date of birth, Months and years to see your name if you have a Akan name.


Zuko is a fire bending master from the show Avatar: the Last Airbender . He is son to Firelord Ozai, brother to Princess Azula and nephew to General Iroh. Zuko is arguably the most dynamic character in the series. He transforms from an angsty teenage boy looking to redeem his honor to a compassionate, righteous mentor to the person who he was formerly seeking to capture.
Reasons why I admire Zuko:


Dear {{user.firstName}}
Thank you for accepting the invitation. Please click on the link to login to Data Portal.


Local Taliban commanders among 16 killed, wounded in Balkh and Jawzjan clashes
by Khaama PressClashes in northern Balkh and Jawzjan provinces left 16 Taliban militants dead or wounded including local commanders of the group, the 209th Shaheen Corps said.
According to a statement released by Shaheen Corps, the Taliban militants attacked Khel Guli Base in Dawlatabad district of Balkh at 7 pm local time on Saturday which sparked clashes that continued until 9 pm.
The statement further added that Taliban militants retreated after 4 losing of their comrades during the clashes.
The security forces killed 2 Taliban militants and wounded another Taliban fighter during a separate clash in Joi Uzlek area of Chahar Bolak district in Balkh proivnce, the 209th Shaheen Corps added.
The 209th Shaheen Corps also added that the security forces killed local Taliban commanders Qari Toofan and Chari Pawalan during a clash in Qarqeen district of Jawzjan on Saturday.
Four other Taliban militants sustained injuries during the clash including their commander Qari Qayoum, the 209th Shaheen Corps said.
Author
-
The Khaama Press News Agency is the leading and largest English news service for Afghanistan with over 3 million hits a month. Independent authors/columnists and experts are welcomed to contribute stories, opinions and editorials. Send stories to news@khaama.com.


OK
OK
Cancel
OK
Cancel
Wifi
Data
Bluetooth
Power
Go to Settings
1
2
3
4
5
6
7
8
9
Emergency
0
Back
Emergency call panel
To be done.
Turn off screen to go back.
Enter PIN
1
2
3
4
5
6
7
8
9
Ok
0
Back
Emergency


Portal allows you to create an information portal for use within your Discord Server.
.txt
file on your computer with all of the information you'd like. Make sure it is 2048 characters or less@Portal#0301 update
and attach and send your *.txt
file with it@Portal help
- View Welcome Message
@Portal info
- View info on Portal
@Portal getportal
- Get a copy of your previously opened Portal
@Portal update
- Update your existing Portal or create a new one
@Portal
- Views Portal if one exists. Otherwise shows Welcome Message
Copyright © 2020 Skylar McCauley
This was created from scratch with a little help from Bootstrap


--- title: Extract Unique Words From A Text | Developer Tools layout: post ---
{% include common-meta %}This is a free online tool to extract unique words from any plain text.
In plain text, many words are repeated. This tool can help you identify all the words that are present.
Unique words can be used to identify many things. e.g. Many SEO experts may use it for keyword densityand other analysis purposes.
Unique words are handy to create word clouds too. Just throw these words into a word cloud maker and it will do the magic.
Yes, this tool can easily be used for any text and can help you identify all unique words. Give it a try.


PXE Plugin requires OpenSolaris 2009.06 build 110 or later. Also note that you need an "Automated Installer" image, not the LiveCD image. Download is availble from the following locations:
- OpenSolaris 2009.06 builds ISO (BitTorrent) — choose
osol-0906-NNN-ai-x86.iso.torrent
SPARC network installation is not supported


Copyright (c) 1988 Ludovic Robillard
The game starts at following hexagonal board:
Each player has 50 'grains' and 3 'seeds'.
|
Plant actions imply some possible effects: (a) fusion - by growing, a plant may fuse with another friendly plant; (b) massive trimming - by removing a grain, a part of the plant may be without contact to a seed, and so it is removed from the board; (c) separation - a plant with more than one seed may separate in two.
| A simple capture [In these diagrams, black seeds have blue grains and white seeds have yellow grains] After the grow of the blue plant (by dropping the marked blue grain), the marked yellow grain was captured. |
|
| A capture
with an extra dead plant
In this case, after the grow of the marked blue grain, two yellow grains were captured (the marked ones). After this capturing, a new dead plant was created (the two isolated yellow grains), which is also removed from board. |
|
| Suicide
are illegal
The grow showed by the marked yellow grain is illegal, since that grain could be captured without any extra action. |
|
| Not a
suicide
Growing the marked yellow stone is no longer illegal, since by moving there it captures the marked blue grain. |
This game has some extra rules (dealing with plant parasites and fast grow) which I believe are optional and do not add much more interest to the game. There is a detailed document with the complete rules (in French).


|
Proton DotNet
|
Base map type decoder used by decoders of various AMQP types that represent map style serialized objects. More...
Public Member Functions | |
| IDictionary< K, V > | ReadMap< K, V > (IProtonBuffer buffer, IDecoderState state) |
| Attempts to read and decode an AMQP Map from the given incoming byte buffer. The decoder applies type restrictions to the incoming Map based on the types given in the methods generic parameters. The resulting IDictionary is created using the type parameters provided to this method. More... | |
| IDictionary< K, V > | ReadMap< K, V > (Stream stream, IStreamDecoderState state) |
| Attempts to read and decode an AMQP Map from the given incoming byte stream. The decoder applies type restrictions to the incoming Map based on the types given in the methods generic parameters. The resulting IDictionary is created using the type parameters provided to this method. More... | |
| override object | ReadValue (IProtonBuffer buffer, IDecoderState state) |
| Reads this decoders managed type from the given buffer and returns it. More... | |
| override object | ReadValue (Stream stream, IStreamDecoderState state) |
| Reads this decoders managed type from the given buffer and returns it. More... | |
| override void | SkipValue (IProtonBuffer buffer, IDecoderState state) |
| Skips the value that this decoder is handling by skipping the encoded bytes in the provided buffer instance. More... | |
| override void | SkipValue (Stream stream, IStreamDecoderState state) |
| Skips the value that this decoder is handling by skipping the encoded bytes in the provided buffer instance. More... | |
| abstract int | ReadCount (IProtonBuffer buffer, IDecoderState state) |
| Reads the number of elements contained in the encoded map from the provided IProtonBuffer. The implementation must read the correct size encoding based on the type of map that this type decoder handles. More... | |
| abstract int | ReadCount (Stream stream, IStreamDecoderState state) |
| Reads the number of elements contained in the encoded map from the provided Stream. The implementation must read the correct size encoding based on the type of map that this type decoder handles. More... | |
| abstract int | ReadSize (IProtonBuffer buffer, IDecoderState state) |
| Reads the encoded size value for the encoded map payload and returns it. The read is destructive and the type decoder read methods cannot be called after this this unless the IProtonBuffer is reset via a position marker. This method can be useful when the caller intends to manually read the binary payload from the given IProtonBuffer. More... | |
| abstract int | ReadSize (Stream stream, IStreamDecoderState state) |
| Reads the encoded size value for the encoded map payload and returns it. The read is destructive and the type decoder read methods cannot be called after this this unless the Stream is reset via a position marker. This method can be useful when the caller intends to manually read the binary payload from the given stream. More... | |
| Public Member Functions inherited from Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder | |
| Array | ReadArrayElements (IProtonBuffer buffer, IDecoderState state, int count) |
| Reads a series of this type that have been encoded into the body of an Array type. When encoded into an array the values are encoded in series following the identifier for the type, this method is given a count of the number of instances that are encoded and should read each in succession and returning them in a new array. More... | |
| Array | ReadArrayElements (Stream stream, IStreamDecoderState state, int count) |
| Reads a series of this type that have been encoded into the body of an Array type. When encoded into an array the values are encoded in series following the identifier for the type, this method is given a count of the number of instances that are encoded and should read each in succession and returning them in a new array. More... | |
Public Attributes | |
| override Type | DecodesType => typeof(IDictionary) |
| Public Attributes inherited from Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder | |
| bool | IsArrayType => false |
Additional Inherited Members | |
| Properties inherited from Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder | |
| abstract EncodingCodes | EncodingCode [get] |
| abstract Type | DecodesType [get] |
| Properties inherited from Apache.Qpid.Proton.Codec.IPrimitiveTypeDecoder | |
| EncodingCodes | EncodingCode [get] |
| Get the AMQP encoding code byte for the type this decoder handles. More... | |
| Properties inherited from Apache.Qpid.Proton.Codec.ITypeDecoder | |
| Type | DecodesType [get] |
| The Type that this decoder can read. More... | |
| bool | IsArrayType [get] |
| Returns true if the value that this decoder is going to read is an array type. More... | |
| Properties inherited from Apache.Qpid.Proton.Codec.IStreamTypeDecoder | |
| Type | DecodesType [get] |
| The Type that this decoder can read. More... | |
| bool | IsArrayType [get] |
| Returns true if the value that this decoder is going to read is an array type. More... | |
Base map type decoder used by decoders of various AMQP types that represent map style serialized objects.
|
pure virtual |
Reads the number of elements contained in the encoded map from the provided IProtonBuffer. The implementation must read the correct size encoding based on the type of map that this type decoder handles.
| buffer | The buffer where the count should be read from |
| state | The decoder state that provides support |
Implements Apache.Qpid.Proton.Codec.Decoders.Primitives.IMapTypeDecoder.
Implemented in Apache.Qpid.Proton.Codec.Decoders.Primitives.Map32TypeDecoder, and Apache.Qpid.Proton.Codec.Decoders.Primitives.Map8TypeDecoder.
|
pure virtual |
Reads the number of elements contained in the encoded map from the provided Stream. The implementation must read the correct size encoding based on the type of map that this type decoder handles.
| stream | The stream where the element count should be read from |
| state | The decoder state that provides support |
Implements Apache.Qpid.Proton.Codec.Decoders.Primitives.IMapTypeDecoder.
Implemented in Apache.Qpid.Proton.Codec.Decoders.Primitives.Map32TypeDecoder, and Apache.Qpid.Proton.Codec.Decoders.Primitives.Map8TypeDecoder.
|
inline |
Attempts to read and decode an AMQP Map from the given incoming byte buffer. The decoder applies type restrictions to the incoming Map based on the types given in the methods generic parameters. The resulting IDictionary is created using the type parameters provided to this method.
| K | The type restriction for the keys of the Map |
| V | The type restriction for the values of the Map |
| buffer | The buffer where the Map should be read from |
| state | The decoder state that provides support |
Implements Apache.Qpid.Proton.Codec.Decoders.Primitives.IMapTypeDecoder.
|
inline |
Attempts to read and decode an AMQP Map from the given incoming byte stream. The decoder applies type restrictions to the incoming Map based on the types given in the methods generic parameters. The resulting IDictionary is created using the type parameters provided to this method.
| K | The type restriction for the keys of the Map |
| V | The type restriction for the values of the Map |
| stream | The stream where the Map should be read from |
| state | The decoder state that provides support |
Implements Apache.Qpid.Proton.Codec.Decoders.Primitives.IMapTypeDecoder.
|
pure virtual |
Reads the encoded size value for the encoded map payload and returns it. The read is destructive and the type decoder read methods cannot be called after this this unless the IProtonBuffer is reset via a position marker. This method can be useful when the caller intends to manually read the binary payload from the given IProtonBuffer.
| buffer | The buffer where the size should be read from |
| state | The decoder state that provides support |
Implements Apache.Qpid.Proton.Codec.Decoders.Primitives.IMapTypeDecoder.
Implemented in Apache.Qpid.Proton.Codec.Decoders.Primitives.Map32TypeDecoder, and Apache.Qpid.Proton.Codec.Decoders.Primitives.Map8TypeDecoder.
|
pure virtual |
Reads the encoded size value for the encoded map payload and returns it. The read is destructive and the type decoder read methods cannot be called after this this unless the Stream is reset via a position marker. This method can be useful when the caller intends to manually read the binary payload from the given stream.
| stream | The stream where the size should be read from |
| state | The decoder state that provides support |
Implements Apache.Qpid.Proton.Codec.Decoders.Primitives.IMapTypeDecoder.
Implemented in Apache.Qpid.Proton.Codec.Decoders.Primitives.Map32TypeDecoder, and Apache.Qpid.Proton.Codec.Decoders.Primitives.Map8TypeDecoder.
|
inlinevirtual |
Reads this decoders managed type from the given buffer and returns it.
| buffer | The buffer where the encoded bytes can be read from |
| state | The decoder state that can be used during decode |
Implements Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder.
|
inlinevirtual |
Reads this decoders managed type from the given buffer and returns it.
| stream | The stream where the encoded bytes can be read from |
| state | The decoder state that can be used during decode |
Implements Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder.
|
inlinevirtual |
Skips the value that this decoder is handling by skipping the encoded bytes in the provided buffer instance.
| buffer | The buffer where the encoded bytes can be read from |
| state | The decoder state that can be used during decode |
Implements Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder.
|
inlinevirtual |
Skips the value that this decoder is handling by skipping the encoded bytes in the provided buffer instance.
| stream | The stream where the encoded bytes can be read from |
| state | The decoder state that can be used during decode |
Implements Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder.


"Light Makes Right"
October 27, 1989
Volume 2, Number 8
Compiled by
All contents are copyright (c) 1989, all rights reserved by the individual authors
Archive locations: anonymous FTP at
ftp://ftp-graphics.stanford.edu/pub/Graphics/RTNews/,
wuarchive.wustl.edu:/graphics/graphics/RTNews, and many others.
You may also want to check out the Ray Tracing News issue guide and the ray tracing FAQ.
back to contents
Over the years I have learnt a variety of tricks to increase the performance and image quality of my ray tracer. It's almost a cliche that today's successful trick is tomorrow's established technique. Photorealistic computer graphics is, after all, concerned with figuring out shortcuts and approximations for rendering various physical phenomena, i.e. tricks.
For whatever reason, many of the tricks mentioned here are not common knowledge. Some have been published (and sometimes overlooked), some have been discussed informally and have never made it into research papers, and others seem to have appeared out of nowhere. It's most likely that there are tricks that are commonly known that have not percolated over to me yet.
When possible, I have tried to give appropriate references or attributions; if not attributed, the ideas are my own (I think!). My apologies if I have overlooked anyone. Only references that do not appear in the book's "Ray Tracing Bibliography" are included at the end of this article. For more general rendering hacks, see [Whitted85], which originally inspired me to attempt to pass on some ideas from my bag of tricks.
back to contents
back to contents
While at the University of Utah, John Peterson and Tom Malley actually implemented Whitted/Rubin, Kay/Kajiya, and an octree scheme, and found that all three schemes were within 10-20% of each other speedwise. In an informal survey at SIGGRAPH '88, the BV Hierarchy, Octree, Grid and 5D schemes all had about the same number of users (all the 5D users were from Apollo; on the other hand, 5D is the new kid on the block).
There are a number of techniques I have found to be generally useful for all efficiency schemes.
1) When shadow testing, keep the opaque object (if any) which shadowed each light for each ray tree node. Try this object immediately during the next shadow test at that ray tree node. Odds are that whatever shadowed your last intersection point will shadow again. If the object is hit you can immediately stop testing because the light is not seen. This was first published in [Haines86].
2) When shadow testing, save transparent objects for later intersection. Only if no opaque object is hit should the transparent objects be tested. The idea here is to avoid doing work on transparent filters when in fact the light does not reach the surface.
3) Don't calculate the normal for each intersection. Get the normal only after all intersection calculations are done and the closest object for each node is known. After all, each ray can have only one intersection point and one normal. Saving intermediate results is worthwhile for some intersection calculations, which are then used if the object is actually hit. This idea was first mentioned in [Whitted85]. Similarly, other calculations about the surface can be delayed, such as (u,v) location, etc.
4) One other idea (which I have not tested) is sorting each intersection list by various criteria. Most efficiency schemes have in common the idea of lists of objects to be tested. For a given list, the order of testing is important. For example, all else being equal, if a list contained a spline surface and a polygon, I would want to test the polygon first since it is usually a quicker intersection test. Given an opaque object and a bounding box in a list, I probably want to test the opaque object first when doing shadow testing, since I want to find any intersection as soon as possible. If two polygons are on the list, I probably want to test the larger one first, as it is more likely to cast a shadow or give me a maximum depth (see next section). There are many variations on this theme and at this point little work has been done on these possibilities.
back to contents
I have found a number of tricks to speed up hierarchy traversal, most of which are simple to implement. Some of the ideas can also be useful for other efficiency schemes.
1) Keep track of the closest intersection distance. Whenever an object is hit, keep its distance as the maximum distance to search. During further intersection testing use this distance to cut short the intersection calculations: if an object or bounding box is beyond the maximum distance, no further testing of it needs to be done. Note that for shadow testing the distance to the light provides an initial maximum.
2) When building a ray intersection tree, keep the ray tree which was previously built. For each ray tree node, intersect the object in the old ray tree, then proceed to intersect the bounding box/object tree. By intersecting the old object first you can usually obtain a good maximum distance immediately, which can then be used to aid trick #1.
3) When shooting rays from a surface (e.g. reflection, refraction, or shadow rays), get the initial list of objects to intersect from the bounding volume hierarchy. For example, a ray beginning on a sphere must hit the sphere's bounding volume, so include all other objects in this bounding volume in the immediate test list. The bounding volume which is the parent of the sphere's bounding volume must also automatically be hit, and its other children should automatically be added to the test list, and so on up the object tree. Note also that this list can be calculated once for any object, and so could be created and kept around under a least-recently-used storage scheme. Another advantage of this scheme is that nearby neighbors of the object are tested for shadowing first. These neighbors are more likely to cast a shadow on the point than any random object. I first saw this trick used in Weghorst and Hooper's ray tracer at Cornell's Program of Computer Graphics.
4) Similar to trick #3, the idea is simply to do the same list making process for the eye position. Check if the eye position is inside the topmost node of the hierarchy. If it is, check the children which are boxes. Continue to check and unwrap until you are left with a list of objects to intersect. Again, the idea is to avoid wasting time shooting a ray against boxes which you know must be hit.
For light sources, since the farthest endpoint of the ray is also known, it can also be used to open some boxes early on. The tradeoff here, however, is that for shadow testing we want to find any intersection we can. Wasting time opening boxes near the light or ray origin might be better spent trying to find an intersection as fast as possible.
5) An improvement to trick #3 is also to use trick #4 to open more boxes initially. You work up the hierarchy opening all parent boxes; any children of the parent (except the original one, of course) are then tested against the ray position. However, this can be done only when the trick is done on the fly, since the ray's origin will change.
Kay & Kajiya's hierarchy scheme [Kay86] is about the best overall traversal method. However, Jeff Goldsmith and others note that if you do use Kay & Kajiya's heapsort on bounding volumes in order to get the closest, don't bother to do it for illumination rays. In shadowing, you don't care about the closest intersection, but just whether anything blocks the light.
back to contents
In practice, each octree voxel notes whether it is a parent of further voxels or is a leaf and contains a list of objects to hit. If it is a parent, it stores a list of 8 pointers to its subordinate octrees, with null pointers meaning that the subordinate octree is empty; otherwise, a list of objects is used.
One problem with building octrees is deciding when enough is enough. You want to subdivide an octree voxel if the number of objects is too many, but you may find that these further subdivisions do not gain you anything. Olin Lathrop has an interesting method for octree subdivision. First, the biggest win is to subdivide on the fly. Never subdivide anything until you find there is a demand for it (this same idea was used by Arvo and Kirk [Arvo87] in their 5D efficiency scheme). His subdivision criteria are, in order of precedence:
1) Do not subdivide if subdivision generation limit is hit.
2) Do not subdivide if a voxel contains less than X objects (These first two criteria were first proposed in [Glassner84]). Olin uses X=1.
3) Do not subdivide if less than N rays passed through this voxel, but did not hit anything. Olin uses N=4.
4) Do not subdivide if M*K >= N, where M is the number of rays that passed through this voxel that did hit something, and K is a parameter you chose. Olin uses K=2, but suspects it should be higher. This step seeks to avoid subdividing a voxel that may be large, but has a good history of producing real intersections anyway. Keep in mind that for every ray that did hit something, there are probably shadow test rays that did not hit anything. This can distort the statistics, and make a voxel appear less "tight" than it really is, hence the need for larger values of K.
Another possible criterion is to base the subdivision generation limit (criterion 1) on the number of objects in the octree. If you had, say, 6 objects and 5 of them are clustered tightly together, you may find your octree reaching its maximum depth without the subordinate octrees actually splitting up the 5 objects. These octree voxels are useless, costing extra time and memory. They could be avoid by setting the limit based on the total number of objects. I use something along the lines of the depth limit being equal to log sub 4 of (number of objects).
Andrew Glassner has a better method to avoid this problem. When you subdivide a voxel, look at its children. If only one child is non-empty, replace the original voxel with its non-null child. Do this recursively until the subdivision criterion is satisfied. He does this in his spacetime ray tracer, and the speedup can be large. Note that this scheme means adding a field to the octree structure to identify what level in the hierarchy it represents.
An idea to speed octree traversal was first mentioned to me by Andrew Glassner and later by Mike Kaplan. The idea is to place a pointer on each face of each octree voxel. If a voxel's face is next to a larger or same size voxel, a pointer to this neighbor is stored. If the voxel face's neighbors are smaller, then the face pointer is set to point at the bordering voxel of the same size (which is these neighbors' common parent). If there are no neighbors (i.e. the face is on the exterior), a null pointer is stored.
When a ray exits a voxel, the voxel face is accessed and the next voxel found directly. This voxel may have to be descended, but this trick saves having to descend the octree from the top.
Mike Kaplan independently arrived at a similar method, in which he stores quadtrees at the faces so that he can immediately access the next voxel and avoid any descent altogether.
back to contents
back to contents
Peterson's subdivision criterion is to use a bounding box around each quad generated, subdividing until the box is smaller than a certain number of pixels. A drawback of this method is that it does not elegantly handle objects that are part of the scene yet do not appear in the viewing frustum (e.g. if the teapot is only seen in a mirror, we cannot get a good sense of how much to subdivide it). Snyder and Barr [Snyder87] have some good recommendations on this process, and they use the change in the tangent vector between the quad's points as a subdivision criterion. This article also points out other pitfalls of tessellation and of rendering polygons with a normal at each vertex.
If adaptive techniques are used, one problem to guard against is cracking. Say there are two adjacent quadrilaterals, and one has been subdivided into four smaller quads. Something must be done along the seam between the two large quadrilaterals, as normally the subdivision point between the two common vertices will not lie on the large, undivided quad. If rendered from some angle, there will be a noticeable crack between the large quad and the two neighboring smaller quads.
back to contents
back to contents
[Press88] Press, William H. et al, Numerical Recipes in C, Cambridge University Press, Cambridge, 1988.
back to contents


Name: Gai Sensei
Username: Fuzzy Brows
Email<EMAIL_ADDRESS>Special Recipe: The Ghana Jollof
Joined At: 20th October, 2017
Phone:<PHONE_NUMBER>0
Recipes Added: 200
Recipes Reviewed: 3000
Please where do you think I can buy all the ingredients you listed in your recipe from


Time & Date from minute.js here
What is your main symptom today? (pick one)
Head
Eyes
Ears
Nose
Flu/COVID Symptoms
Neck
Back
Arms
Wrist
Hand
Finger
Legs
Ankle
Foot
Toes
Chest
Cough
Shortness of Breath
Abdomen
Urinary
Next


FITS Headers¶
In the next three chapters, more detailed information as well as examples will be explained for manipulating FITS headers, image/array data, and table data respectively.
Header of an HDU¶
Every HDU normally has two components: header and data. In Astropy these two
components are accessed through the two attributes of the HDU,
hdu.header
and hdu.data
.
While an HDU may have empty data, i.e. the .data
attribute is None
, any
HDU will always have a header. When an HDU is created with a constructor, e.g.
hdu = PrimaryHDU(data, header)
, the user may supply the header value from
an existing HDU’s header and the data value from a numpy array. If the
defaults (None) are used, the new HDU will have the minimal required keywords
for an HDU of that type:
>>> hdu = fits.PrimaryHDU()
>>> hdu.header # show the all of the header cards
SIMPLE = T / conforms to FITS standard
BITPIX = 8 / array data type
NAXIS = 0 / number of array dimensions
EXTEND = T
A user can use any header and any data to construct a new HDU. Astropy will strip any keywords that describe the data structure leaving only your informational keywords. Later it will add back in the required structural keywords for compatibility with the new HDU and any data added to it. So, a user can use a table HDU’s header to construct an image HDU and vice versa. The constructor will also ensure the data type and dimension information in the header agree with the data.
The Header Attribute¶
Value Access, Updating, and Creating¶
As shown in the Getting Started tutorial, keyword values can be accessed via keyword name or index of an HDU’s header attribute. Here is a quick summary:
>>> hdulist = fits.open('input.fits') # open a FITS file
>>> prihdr = hdulist[0].header # the primary HDU header
>>> print prihdr[3] # get the 4th keyword's value
10
>>> prihdr[3] = 20 # change its value
>>> prihdr['DARKCORR'] # get the value of the keyword 'darkcorr'
'OMIT'
>>> prihdr['darkcorr'] = 'PERFORM' # change darkcorr's value
Keyword names are case-insensitive except in a few special cases (see the
sections on HIERARCH card and record-valued cards). Thus, prihdr['abc']
,
prihdr['ABC']
, or prihdr['aBc']
are all equivalent.
Like with Python’s dict
type, new keywords can also be added to the
header using assignment syntax:
>>> 'DARKCORR' in header # Check for existence
False
>>> header['DARKCORR'] = 'OMIT' # Add a new DARKCORR keyword
You can also add a new value and comment by assigning them as a tuple:
>>> header['DARKCORR'] = ('OMIT', 'Dark Image Subtraction')
Note
An important point to note when adding new keywords to a header is that by default they are not appended immediately to the end of the file. Rather, they are appended to the last non-commentary keyword. This is in order to support the common use case of always having all HISTORY keywords grouped together at the end of a header. A new non-commentary keyword will be added at the end of the existing keywords, but before any HISTORY/COMMENT keywords at the end of the header.
There are a couple of ways to override this functionality:
Use the
Header.append()
method with theend=True
argument:>>> header.append(('DARKCORR', 'OMIT', 'Dark Image Subtraction'), end=True)
This forces the new keyword to be added at the actual end of the header.
The
Header.insert()
method will always insert a new keyword exactly where you ask for it:>>> header.insert(20, ('DARKCORR', 'OMIT', 'Dark Image Subtraction'))
This inserts the DARKCORR keyword before the 20th keyword in the header no matter what it is.
A keyword (and its corresponding card) can be deleted using the same index/name syntax:
>>> del prihdr[3] # delete the 2nd keyword
>>> del prihdr['abc'] # get the value of the keyword 'abc'
Note that, like a regular Python list, the indexing updates after each delete,
so if del prihdr[3]
is done two times in a row, the 4th and 5th keywords
are removed from the original header. Likewise, del prihdr[-1]
will delete
the last card in the header.
It is also possible to delete an entire range of cards using the slice syntax:
>>> del prihdr[3:5]
The method Header.set()
is another way to update they value or comment
associated with an existing keyword, or to create a new keyword. Most of its
functionality can be duplicated with the dict-like syntax shown above. But in
some cases it might be more clear. It also has the advantage of allowing one
to either move cards within the header, or specify the location of a new card
relative to existing cards:
>>> prihdr.set('target', 'NGC1234', 'target name')
>>> # place the next new keyword before the 'TARGET' keyword
>>> prihdr.set('newkey', 666, before='TARGET') # comment is optional
>>> # place the next new keyword after the 21st keyword
>>> prihdr.set('newkey2', 42.0, 'another new key', after=20)
In FITS headers, each keyword may also have a comment associated with it
explaining its purpose. The comments associated with each keyword are accessed
through the comments
attribute:
>>> header['NAXIS']
2
>>> header.comments['NAXIS']
the number of image axes
>>> header.comments['NAXIS'] = 'The number of image axes' # Update
Comments can be accessed in all the same ways that values are accessed, whether
by keyword name or card index. Slices are also possible. The only difference
is that you go through header.comments
instead of just header
by
itself.
COMMENT, HISTORY, and Blank Keywords¶
Most keywords in a FITS header have unique names. If there are more than two cards sharing the same name, it is the first one accessed when referred by name. The duplicates can only be accessed by numeric indexing.
There are three special keywords (their associated cards are sometimes referred to as commentary cards), which commonly appear in FITS headers more than once. They are (1) blank keyword, (2) HISTORY, and (3) COMMENT. Unlike other keywords, when accessing these keywords they are returned as a list:
>>> prihdr['HISTORY']
I updated this file on 02/03/2011
I updated this file on 02/04/2011
....
These lists can be sliced like any other list. For example, to display just the
last HISTORY entry, use prihdr['history'][-1]
. Existing commentary cards
can also be updated by using the appropriate index number for that card.
New commentary cards can be added like any other card by using the dict-like
keyword assignment syntax, or by using the Header.set()
method. However,
unlike with other keywords, a new commentary card is always added and appended
to the last commentary card with the same keyword, rather than to the end of
the header. Here is an example:
>>> hdu.header['HISTORY'] = 'history 1'
>>> hdu.header[''] = 'blank 1'
>>> hdu.header['COMMENT'] = 'comment 1'
>>> hdu.header['HISTORY'] = 'history 2'
>>> hdu.header[''] = 'blank 2'
>>> hdu.header['COMMENT'] = 'comment 2'
and the part in the modified header becomes:
HISTORY history 1
HISTORY history 2
blank 1
blank 2
COMMENT comment 1
COMMENT comment 2
Users can also directly control exactly where in the header to add a new
commentary card by using the Header.insert()
method.
Note
Ironically, there is no comment in a commentary card, only a string value.
Card Images¶
A FITS header consists of card images.
A card image in a FITS header consists of a keyword name, a value, and
optionally a comment. Physically, it takes 80 columns (bytes)–without carriage
return–in a FITS file’s storage format. In Astropy, each card image is
manifested by a Card
object. There are also special kinds of cards:
commentary cards (see above) and card images taking more than one 80-column
card image. The latter will be discussed later.
Most of the time the details of dealing with cards are handled by the
Header
object, and it is not necessary to directly manipulate cards.
In fact, most Header
methods that accept a (keyword, value)
or
(keyword, value, comment)
tuple as an argument can also take a
Card
object as an argument. Card
objects are just wrappers
around such tuples that provide the logic for parsing and formatting individual
cards in a header. But there’s usually nothing gained by manually using a
Card
object, except to examine how a card might appear in a header
before actually adding it to the header.
A new Card object is created with the Card
constructor:
Card(key, value, comment)
. For example:
>>> c1 = fits.Card('TEMP', 80.0, 'temperature, floating value')
>>> c2 = fits.Card('DETECTOR', 1) # comment is optional
>>> c3 = fits.Card('MIR_REVR', True,
... 'mirror reversed? Boolean value')
>>> c4 = fits.Card('ABC', 2+3j, 'complex value')
>>> c5 = fits.Card('OBSERVER', 'Hubble', 'string value')
>>> print c1; print c2; print c3; print c4; print c5 # show the cards
TEMP = 80.0 / temperature, floating value
DETECTOR= 1 /
MIR_REVR= T / mirror reversed? Boolean value
ABC = (2.0, 3.0) / complex value
OBSERVER= 'Hubble ' / string value
Cards have the attributes .keyword
, .value
, and .comment
. Both
.value
and .comment
can be changed but not the .keyword
attribute.
In other words, once a card is created, it is created for a specific, immutable
keyword.
The Card()
constructor will check if the arguments given are conforming
to the FITS standard and has a fixed card image format. If the user wants to
create a card with a customized format or even a card which is not conforming
to the FITS standard (e.g. for testing purposes), the Card.fromstring()
class method can be used.
Cards can be verified with Card.verify()
. The non-standard card c2
in
the example below is flagged by such verification. More about verification in
Astropy will be discussed in a later chapter.
>>> c1 = fits.Card.fromstring('ABC = 3.456D023')
>>> c2 = fits.Card.fromstring("P.I. ='Hubble'")
>>> print c1; print c2
ABC = 3.456D023
P.I. ='Hubble'
>>> c2.verify()
Output verification result:
Unfixable error: Illegal keyword name 'P.I.'
A list of the Card
objects underlying a Header
object can be
accessed with the Header.cards
attribute. This list is only meant for
observing, and should not be directly manipulated. In fact, it is only a
copy–modifications to it will not affect the header it came from. Use the
methods provided by the Header
class instead.
CONTINUE Cards¶
The fact that the FITS standard only allows up to 8 characters for the keyword name and 80 characters to contain the keyword, the value, and the comment is restrictive for certain applications. To allow long string values for keywords, a proposal was made in:
by using the CONTINUE keyword after the regular 80-column containing the keyword. Astropy does support this convention, even though it is not a FITS standard. The examples below show the use of CONTINUE is automatic for long string values:
>>> header = fits.Header()
>>> header['abc'] = 'abcdefg' * 20
>>> header
ABC = 'abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcd&'
CONTINUE 'efgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefga&'
CONTINUE 'bcdefg&'
>>> header['abc']
'abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg'
>>> # both value and comments are long
>>> header['abc'] = ('abcdefg' * 10, 'abcdefg' * 10)
>>> header
ABC = 'abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcd&'
CONTINUE 'efg&'
CONTINUE '&' / abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefga
CONTINUE '&' / bcdefg
Note that when a CONTINUE card is used, at the end of each 80-characters card image, an ampersand is present. The ampersand is not part of the string value. Also, there is no “=” at the 9th column after CONTINUE. In the first example, the entire 240 characters is treated by Astropy as a single card. So, if it is the nth card in a header, the (n+1)th card refers to the next keyword, not the next CONTINUE card. As such, CONTINUE cards are transparently handled by Astropy as a single logical card, and it’s generally not necessary to worry about the details of the format. Keywords that resolve to a set of CONTINUE cards can be accessed and updated just like regular keywords.
HIERARCH Cards¶
For keywords longer than 8 characters, there is a convention originated at ESO to facilitate such use. It uses a special keyword HIERARCH with the actual long keyword following. Astropy supports this convention as well.
If a keyword contains more than 8 characters Astropy will automatically use a
HIERARCH card, but will also issue a warning in case this is in error.
However, one may explicitly request a HIERARCH card by prepending the keyword
with ‘HIERARCH ‘ (just as it would appear in the header). For example,
header['HIERARCH abcdefghi']
will create the keyword abcdefghi
without
displaying a warning. Once created, HIERARCH keywords can be accessed like any
other: header['abcdefghi']
, without prepending ‘HIERARCH’ to the keyword.
HIEARARCH keywords also differ from normal FITS keywords in that they are
case-sensitive.
Examples follow:
>>> c = fits.Card('abcdefghi', 10)
Keyword name 'abcdefghi' is greater than 8 characters; a HIERARCH card will
be created.
>>> print c
HIERARCH abcdefghi = 10
>>> c = fits.Card('hierarch abcdefghi', 10)
>>> print c
HIERARCH abcdefghi = 10
>>> h = fits.PrimaryHDU()
>>> h.header['hierarch abcdefghi'] = 99
>>> h.header['abcdefghi']
99
>>> h.header['abcdefghi'] = 10
>>> h.header['abcdefghi']
10
>>> h.header['ABCDEFGHI']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "astropy/io/fits/header.py", line 121, in __getitem__
return self._cards[self._cardindex(key)].value
File "astropy/io/fits/header.py", line 1106, in _cardindex
raise KeyError("Keyword %r not found." % keyword)
KeyError: "Keyword 'ABCDEFGI.' not found."
>>> h.header
SIMPLE = T / conforms to FITS standard
BITPIX = 8 / array data type
NAXIS = 0 / number of array dimensions
EXTEND = T
HIERARCH abcdefghi = 1000
Note
A final point to keep in mind about the Header
class is that much
of its design is intended to abstract away quirks about the FITS format.
This is why, for example, it will automatically created CONTINUE and
HIERARCH cards. The Header is just a data structure, and as user you
shouldn’t have to worry about how it ultimately gets serialized to a header
in a FITS file.
Though there are some areas where it’s almost impossible to hide away the quirks of the FITS format, Astropy tries to make it so that you have to think about it as little as possible. If there are any areas where you have concern yourself unnecessarily about how the header is constructed, then let<EMAIL_ADDRESS>know, as there are probably areas where this can be improved on even more.


|
|
Christian L. Ebbesen, PhD
I'm a Deep Learning Specialist in Data Science at Lundbeck A/S. In my work, I use artificial intelligence to discover and develop new ways to support and restore brain health.
Before that, I was a postdoctoral fellow in the laboratory of Robert Froemke at the NYU Neuroscience Institute and the Skirball Institute of Biomolecular Medicine. In my postdoctoral work, I focused on the oxytocin system and used a combination of experimental and computational methods to map complex, cortical receptive fields during social behavior in mice.
I received my PhD in Neurobiology from the Humboldt Universität zu Berlin, Germany. I did my doctoral research in the laboratory of Michael Brecht at the Bernstein Center for Computational Neuroscience and I was associated with the Berlin School of Mind and Brain. During my PhD, I worked on the cortical control of rat whisker movements in the context of rat social facial touch and on spatial and temporal coding in para-hippocampal cortex. I received my master's and bachelor's degrees in physics/biophysics from the Niels Bohr Institute at the University of Copenhagen, Denmark.
|


typealias Logger = (String) -> Unit
(source)
Logger is a lambda you can provide to allow you to do some debugging using your favourite approach for it.
You will receive information about when flows are started, completed, and emissions that are taking place (actions, mutations) as well as reducer invocations.


log out
Admin Panel -
titles
|
[performances]
|
theaters
Add
#
Title
Theater
Date
Bookings
Edit
Delete


Nav Item #1
Nav Item #2
Nav Item #3
Nav Item #4
Nav Item #5
Module 1 - Assignment 1
GitHub Practice
This is my master (or main) branch
This is in my test branch


Your attack: {{ player.attack }} Your defense: {{ player.defense }} Your hp: {{ player.hp }} Your name: {{ player.name }}
{% if player.cell == mob.cell %}Monster attack: {{ mob.attack }} Monster defense: {{ mob.defense }} Monster hp: {{ mob.hp }} Monster name: {{ mob.name }}
Monster hitted you with {{ mob.attack }} damage
Your resist is {{ player.defense }} damage
{% endif %}| {% elif x.type == "mob" %} | {% elif x.type == "inv" %} | {% else %} | {% endif %} | {% endfor %}


Web scraping
Web scraping, web harvesting, or web data extraction is data scraping used for extracting data from websites.
While web scraping can be done manually by a software user, the term typically refers to automated processes implemented using a bot or web crawler.
Web scraping a web page involves fetching it and extracting from it.
Fetching is the downloading of a page (which a browser does when you view the page). Therefore, web crawling is a main component of web scraping, to fetch pages for later processing.
In my own mind web scraping is a great tool at your disposal to automate tasks for working with UIs.
Instead of manually clicking buttons and submitting forms you instead write a web scraping script to do the job
Web scraping with Nodejs
You can use tools like Cheerio and Request to do web scraping with Node.js
Here is a very simple script for web scraping:
const request = require('request');
const cheerio = require('cheerio');
const URL = 'https://api-university.com/';
request(URL, (error, response, html) => {
if (!error && response.statusCode == 200) {
// load all of html into cheerio for dom manipulation
const $ = cheerio.load(html);
const submenu = $('.sub-menu');
console.log(submenu.text());
}
});
Essentially here I am dumping all of the HTML from GET https://api-university.com/
into the cheerio load function.
Now I can use jquery like syntax to simulate button clicks, find elements in the dom and more.
You can use other tools but keep in mind that web scraping is a good tool for automation and getting data from websites in a programmatic manner.
If you like this POST please check out Web Scraping Repo for more updates to the scripts and follow me at jbelmont at Github


iFruit 3A - reboot
Document Id: KBDOC-00118
Created: 2012-07-21
Updated: 2012-08-02
iFruit 3A reboot
Sometimes your phone may reboot. This is perfectly normal and perfectly healthy. It keeps the phone working in top condition.
Reboots help
- Protect from viruses.
- Lower taxes.
- Give IT people a simple answer to all problems.
Tags: tablet, reboot, these, off, etc, three