{% include 'head.html' %}
Welcome back!
Please login to continue tracking your childs growth
{% include 'login_form.html' %}


Yachts travelling to Pemba Island must visit Immigration and have passports stamped, even if having already completed clearance on mainland Tanzania. A transire/transit log must be obtained from the mainland ports before entering Pemba as it may be inspected. Yachts should ensure that their papers are in order and report any incidents if approached with demands for money.
The west coast of Pemba Island is a designated Marine Park, managed by PECCA and the fees of $20 per boat per visit and $5 per person per day must be paid at Mesali Island.
Mkoani remains the most friendly of the ports in Pemba.


Next: call-next-method, Previous: next-method-p, Up: Objects Dictionary
call-method
method &optional next-method-list ⇒ {result}*
make-method
form ⇒ method-object
method—a method object, or a list (see below); not evaluated.
method-object—a method object.
next-method-list—a list of method objects; not evaluated.
results—the values returned by the method invocation.
The macro call-method is used in method combination. It hides the implementation-dependent details of how methods are called. The macro call-method has lexical scope and can only be used within an effective method form.
[Editorial Note by KMP: This next paragraph still needs some work.]
Whether or not call-method is fbound in the global environment is implementation-dependent; however, the restrictions on redefinition and shadowing of call-method are the same as for symbols in the COMMON-LISP package which are fbound in the global environment. The consequences of attempting to use call-method outside of an effective method form are undefined.
The macro call-method invokes the specified method, supplying it with arguments and with definitions for call-next-method and for next-method-p. If the invocation of call-method is lexically inside of a make-method, the arguments are those that were supplied to that method. Otherwise the arguments are those that were supplied to the generic function. The definitions of call-next-method and next-method-p rely on the specified next-method-list.
If method is a list, the first element of the list must be the symbol make-method and the second element must be a form. Such a list specifies a method object whose method function has a body that is the given form.
Next-method-list can contain method objects or lists, the first element of which must be the symbol make-method and the second element of which must be a form.
Those are the only two places where make-method can be used. The form used with make-method is evaluated in the null lexical environment augmented with a local macro definition for call-method and with bindings named by symbols not accessible from the COMMON-LISP-USER package.
The call-next-method function available to method will call the first method in next-method-list. The call-next-method function available in that method, in turn, will call the second method in next-method-list, and so on, until the list of next methods is exhausted.
If next-method-list is not supplied, the call-next-method function available to method signals an error of type control-error and the next-method-p function available to method returns nil.
call-next-method, define-method-combination, next-method-p
Next: call-next-method, Previous: next-method-p, Up: Objects Dictionary


PML-N, PPP oppose idea of long stay, march towards D-Chowk: Sources
by https://www.facebook.com/dunyanewsISLAMABAD (Dunya News) – Major opposition parties in National Assembly have opposed the idea of long stay and march towards D –Chowk.
As per details, Pakistan Muslim League Nawaz (PML-N) and Pakistan People’s Party (PPP) during the meeting of opposition’s Rehbar Committee have opposed breaching the agreement with government.
Inside story of the meeting revealed by sources said PML-N and PPP have said there is no need to create anarchy by marching towards D-Chowk.
Sources further said both parties maintained that it was not opposition’s idea to hold a sit-in in federal capital.
Sources added that JUI-F expressed its desire to hold sit-in for some more time. Rehbar Committee members would present the suggestions before the heads of parties and further decisions would be taken.
Earier, head of opposition’s Rehbar Committee Akram Durrani said the principal demand of opposition is Prime Minister’s resignation and there is no need for talks if the foremost demand is not met.
Addressing a press conference along with other leaders of Rehbar committee, he said undemocratic forces are warned against any step. He said opposition is consulting on option of resign from assemblies.
He said options like protest on districts level is under consideration. He said government is running away from its agreement and APC of opposition has discussed the matters in detail today.
He said the tone of PM and Defence Minister Pervaiz Khattak is not good, adding that we are democratic people and ready to hold negotiations. He said we will decide whether to move towards D-Chowk or not.
He said opposition demands for re-elections without Army’s cover.
PML-N leader Ahsan Iqbal on the occasion said government has damaged the economy.


| CONTENTS |
In most shells, aliases are an easy way to shorten a long command line or do a short series of commands. Section 29.2 through Section 29.10 cover C shell aliases. Section 29.4 through Section 29.14 cover aliases in bash, pdksh, and zsh.
All except the oldest Bourne-type shells have shell functions (Section 29.11), which are explained in Section 29.11 through Section 29.13. These are a cross between aliases and shell scripts. They're good both for shortening command lines and for running a short or long series of commands.
JP and SJC
All shells except the original Bourne shell have an "alias" facility that lets you define abbreviations for commands.
The simplest C shell aliases, which are similar to the alias facility in newer Bourne-type shells, are simply a short name for a command and, often, command options or arguments too. The C shell's aliases can get very complicated. Section 29.3 describes how a C shell alias can use arguments from its command line as it's invoked.
As we've said, aliases in Bourne-type shells (bash, zsh, and ksh) are simpler. Section 29.4 covers some of the differences between those shells and the C shells. Still, the ideas for custom C shell commands are useful in any kind of shell, and if you can't write something in a simple Bourne-type alias, you almost certainly can do it in a shell function (Section 29.11).
You can define aliases from the command line, for use in just your current shell. Any aliases you define can also be placed in your shell setup file (Section 3.3), so they'll be available whenever you're using your shell.
Note that aliases are not passed to subprocesses (Section 3.3), so putting them in a setup file that's read only by login shells or top-level shells probably isn't what you want. (One exception is an alias for a command that you want to run only in a login shell. For instance, you could define an alias named X that starts your X Window System. If that alias isn't defined in subshells, you'll get a message like X: command not found if you try to start the window system from an existing window.)
A common approach is to create separate files for each shell that store your aliases (such as .bash_aliases for bash or .aliases.csh for the C shell), so that you may source them whenever you like.
Here's one last note that applies to all shells. Anytime you want a list of the aliases currently set, just type alias.
JP, ML, DG, and SJC
It's convenient for your aliases to use command-line arguments. For example, let's think about an alias named phone:
alias phone 'cat ~/phonelist | grep -i'
After you define that alias, you could type phone smith. The shell would find the phone alias and execute it with the argument (smith) at the end (Section 29.2) this way:
cat ~/phonelist | grep -i smith
Using cat and a pipe that way is inefficient (Section 43.2). It might be more sensible to have an alias that worked like this:
grep -i name ~/phonelist
How do we do this? The C shell's history (Section 30.8) facility lets us use the notation !$ to refer to the last word in the previous command; the notation !* refers to all the arguments of the previous command. Assuming that we only want to look up aliases one at a time, we can use !$ and write our alias like this:
alias phone grep -i \!$ ~/phonelist
When we use the phone command, its final argument will be substituted into the alias. That is, when we type phone bill, the shell executes the command grep -i bill ~/phonelist.
In this example, we needed another kind of quoting. We had to put a backslash before the exclamation point to prevent the shell from replacing !$ with the previous command's last argument. That is, we don't want the shell to expand !$ when we define the alias that's nonsense. We want the shell to insert the previous argument when we use the alias (in which case, the previous argument is just the argument for the alias itself clear?).
But why couldn't we just use single quotes or double quotes (Section 27.12)? This isn't the right place for a full explanation, but neither single quotes nor double quotes protect the exclamation point. The backslash does (Section 27.13). If you want to be convinced, experiment with some commands like:
% echo '!!' Print your last command % echo '\!!' Print !!
The first echo command shows that the shell performs history substitution (i.e., replaces !! with your previous command) in spite of the single quotes. The second example shows that the backslash can prevent the shell from interpreting ! as a special character.
Let's look at another alias. We want to pipe the output of ls -l into more. In this case, we would want all the arguments from the command line instead of merely the last argument (or the only argument). Here's the alias:
alias lm 'ls -l \!* | more'
This time, we needed both kinds of quoting: a backslash prevents the shell from interpreting the exclamation point immediately. Single quotes protect the pipe symbol and the asterisk (*). If you don't protect them both, and protect only the pipe (with a backslash), look what happens:
% alias lm ls -l \!* | more alias: No match.
Because the backslash temporarily stops the special meaning of the !, the shell next tries to find filenames that match the wildcard (Section 1.13) pattern !*. That fails (except in the unusual case when you have a file in the current directory whose name starts with a !).
|
If you want to pick one argument from the command line, use \!:n, where n is the number of the argument. Here's a sample alias. It uses cat (Section 12.2) to add a header file to the file named in the first argument, then writes them both into the file named in the second argument:
alias addhead 'cat ~/txt/header \!:1 > \!:2'
This alias has two arguments: the file to which you want to add a header and the output file. When you type:
% addhead foo bar
the C shell substitutes the filename foo for \!:1, and the filename bar for \!:2, executing the command:
cat ~/txt/header foo > bar
Finally, if you need to append fixed text strings to these arguments, you need to separate the argument text from the fixed text. For instance, here's an alias that tells the Netscape browser to go to a URL http://info/proj23/xxx1.html, where xxx is a word like report, summary, etc., that you're typing on the command line (as an argument to the alias). For instance, to go to the page http://info/proj23/report1.html, you'd type:
% proj report
The first alias below shows the wrong way to do this. The second one shows how to quote the argument in curly braces ({}) so the shell doesn't think the 1 after the argument is part of the number (giving you argument 11 instead of what you want: argument 1 with the digit 1 after it):
alias proj 'netscape -remote "openURL(http://info/proj23/\!:11.html)"' ...wrong alias proj 'netscape -remote "openURL(http://info/proj23/\!{:1}1.html)"' ...right
If you haven't seen this netscape -remote technique, by the way, it's very handy. It sends a message to an already-open Netscape browser. You can use it from a command line (shell prompt) or by defining a button or menu item on your window system desktop. Recent Unix versions of Mozilla have also begun to support this API, as well. On the Macintosh, remote control is supported via Apple Events, but not from the command line as of this writing.
ML, JP, and SJC
A lot of what we said about aliases in Section 29.2 applies to the Korn shell (ksh), zsh, and bash. This article, along with Section 29.5 and Section 29.6, have an overview of what's different.
One thing that's different from C shells is the syntax of the alias command, which is:
$ alias name = definition
That is, you need an equal sign (no spaces) between the name and the definition. A good guideline is to use single quotes (') around the definition unless you're doing something specialized and you understand how quoting (Section 27.12) works in aliases.
You can't put arguments inside an alias as the C shell's \! operator (Section 29.3) does. To do that, use a shell function (Section 29.11).
As in the C shells, unalias removes an alias. To remove all aliases, use unalias -a in ksh and bash or unhash -a in zsh. alias with no arguments lists aliases that are currently defined.
bash aliases are pretty basic; this section covers them. Korn shell and zsh aliases do more.
JP and SC
pdksh (the public domain ksh) has three types of aliases. First is the regular command alias covered in Section 29.4.
Tracked aliases keep track of the locations of external (Section 1.9) executables. The shell has a default list of commands to track (see the ksh manpage). The first time ksh searches the PATH for an executable command that's marked as a tracked alias, it saves the full path of that command. This saves the shell the trouble of performing the path search each time a command is invoked. The tracked aliases aren't reset unless one becomes invalid or you change the PATH. The command alias -t lists and creates tracked aliases. Here's an example with a newly invoked Korn shell:
$ alias -t $ cat somefile > somewhere $ alias -t cat=/bin/cat $ alias -t less $ alias -t cat=/bin/cat less=/usr/bin/less
At first, there are no tracked aliases. But the cat command is marked for tracking; as soon as I use it, the shell saves its location, as the next alias -t shows. Next, I add a tracked alias for less (Section 12.3) (which isn't one of the default commands to track). The Korn shell won't track a command unless it's one of the defaults or you mark it for tracking.
The third kind of alias, directory aliases, set with alias -d, let you use a tilde abbreviation like ~dir for any directory.
JP
zsh has the regular command alias covered in Section 29.4. zsh is compatible with the C shell in many ways, but it doesn't accept csh alias syntax without an equal sign (=) between the name and value. That's probably because, as in other Bourne-type shells, zsh allows you to set multiple aliases with one command, like this:
zsh$ alias ri='rm -i' mi='mv -i' ...and so on
In zsh, alias -g defines a zsh global alias: a word that's expanded anywhere (as long as it isn't quoted). These are like a shell variable (Section 35.9) that doesn't need a dollar sign ($) to be expanded. Maybe you have a log file you read and edit often. You could make a global alias named log:
zsh$ alias -g log=/work/beta/p2/worklog zsh$ less log zsh$ cp log logtemp
Global aliases are expanded only when they stand alone and aren't quoted. So if there's a global alias dir for a directory, you cannot use emacs dir/file to refer to a file in that directory. Also, if you defined the global alias fserv for the hostname fserv.bkk.ac.uk, you could type telnet fserv but if you type mail ed@fserv, the shell wouldn't expand it into a hostname. Named directories and shell variables work better in cases like those.
alias -m lists aliases that match a wildcard-type pattern; alias -m 'hi*' shows all alias names that start with hi (like hi, hist, and so on). This matches regular command aliases as well as global aliases. You can use -m with unalias, too, to remove all aliases matching a pattern.
 Another great capability is shell scripts (Section 1.8). Each has its strengths. An alias is just right for common sequences of commands, calling a command by a different name, and so on. Scripts are great for more flexible processing and batch processing. There are limitations to both, and I will show a way around them.
The limitation to aliases is that you are working pretty much with one command line. Consider this example, which manages various stages of changing directories, updating the prompt, and so forth:
alias pp 'set o2=$cwd; popd; set old=$o2; dir_number; record_dir pp; \\ prompt_set; set cd_attempt=(\!*); if ($#cd_attempt > 0) cd $cd_attempt'
Now this works fine for me, and it served me well for a few years and thousands of invocations, but it's at the point where I start thinking that a script is more suited to the job. This brings me to the limitation of scripts.
Shell scripts are great for accomplishing some task that might change a file, start a program, etc. They are limited by the fact that any changes they make to shell or environment variables are not visible (Section 24.3) to the parent shell that started them. In other words, you can write some really cool script that will change directories for you if you don't touch the keyboard for five seconds, but once the script exits, you are still in the same place you started.
The answer is to combine the best of both worlds. Consider this:
alias pp 'set cd_attempt=(\!*); source ~/bin/pp_csh'
We set up a variable and source a script. The concept is this: put your command-line arguments into a variable and then source (Section 35.29) a script to accomplish something. The difference here is that because you are not starting a subshell (Section 24.4) for the script, it can do everything an alias can and more. This is much like Bourne shell functions (Section 29.11).
Some hints on using this technique:
I like to name the script that is doing all of the work after the alias, with _csh or .csh at the end of its name. I put all of the scripts in my ~/bin (Section 7.4). [Instead of names ending in .csh, I put mine in a directory named ~/.lib/csh. JP]
You don't want to execute the script directly. You want to source it. Here's a good first line that detects this:
#! /bin/echo sorry,try:source
Check the variable that you expect to see from the alias. If it isn't there, you can show a usage statement and do a goto to the end of the script:
if ($#lg_args == 0) then cat << +++ usage: lg [-a][-p] pattern [command] -a lists all (.dot files) -p pipe resulting list into command +++ goto lg_end endif ... lg_end:
You aren't limited to what an alias can do, since you are sourcing a script. You gain some flexibility here. Here's one way of handling options:
set Section 35.9
unset ls_arg while (! $?ls_arg) switch ("$lg_args[1]") case "-a": set ls_arg="-a" shift lg_args case "-p": set use_pipe shift lg_args default: set ls_arg breaksw endsw end
Have fun with this! You may find yourself tossing some old aliases and rewriting them as sourceable scripts. They're also easier to maintain.
DS
Section 27.9 has similar information for bash.
Here's a situation that came up on the Net a while ago. Someone wanted an exit (Section 24.4) alias that would run a ~/.exit file (Section 31.13) before leaving the shell. The obvious solution is:
alias exit "source ~/.exit; exit"
This doesn't work; when you use the exit alias, the C shell thinks that the alias is trying to execute itself. Recursive aliases aren't allowed on many shells, so the C shell prints an error message (Alias loop) and gives up.
There are many ways to break the loop. Here's the best (in my opinion):
alias exit 'source ~/.exit; ""exit'
Section 27.10 has the hairy details of what works and why. To summarize, if you need to use the alias's name within a C shell alias, you can use:
Where name is the name of a built-in (Section 1.9) command or any "regular" command.
Where name is the name of any "regular" command, but not a built-in command.
Tempting as this all may sound (and I have to admit, if it didn't sound a bit tempting, I wouldn't be writing this article), I can't really recommend the practice of "redefining" commands with aliases. You should leave the original commands as they are. The original author could have avoided all these problems by calling his alias quit rather than exit.
If you redefine commands with aliases and then use another account where your alias isn't defined, it's easy for things to go wrong. That's especially true for commands that do something permanent overwriting or removing files, for example. It also can cause problems if you let someone type a command on your account and the person isn't expecting an aliased version.
Let me give one more example to show you what problems you can have. Let's say you've aliased the exit command to source a .exit file before quitting. Fair enough. But now, let's say that you're not in your login shell, that you've set ignoreeof, and that, for no apparent reason, your .exit file disappears (maybe it develops a bad block, so the system can't read it; such things happen).
Now you're stuck. If you type exit, the source command will fail, and the "real" exit command will never be executed. You can't leave the shell. Of course, if you remember what you did, you can always type unalias exit and get the original command back. Or you can type " "exit. Or finally, you could simply write the alias such that it tests for the existence of the file before trying to read it. But if you've foisted this alias on a beginner, he or she might not know that.
The biggest virtue of Unix is that it's infinitely extendable. However, you aren't helping if your extensions hide the basic operations that make everything work. So extend all you want. But when you write your extensions, give them new names. End of sermon.
ML
The C shell's brain damage keeps you from using an if with an else in an alias. You have to use a sourceable script (Section 29.7). Or that's what I thought until I saw an article by Lloyd Zusman on comp.unix.questions in December 1987. He'd saved an earlier posting on that group (but without its author's name) that showed how. The trick: use enough backslashes (\) and the eval (Section 27.8) command.
As an example, here's an alias named C for compiling C programs. It needs the executable filename (like C prog), not the source filename (like C prog.c). If you type a filename ending in .c, it complains and quits. Else, it does the following:
Renames any old prog file to prog.old.
Prints the message prog SENT TO cc.
Compiles prog.c.
And if there's a prog file (if the compile succeeded) runs chmod 311 prog to protect the file from accidental reading with a command like cat * or more *.
Your alias doesn't need to be as complicated. But this one shows some tricks, such as putting an if inside the if, that you might want to use. Watch your quoting remember that the shell strips off one level of quoting when you set the alias (Section 29.3) and another during the first pass of the eval. Follow this example and you'll probably be fine:
Go to http://examples.oreilly.com/upt3 for more information on: if-else-alias.cs
# COMPILE AND chmod C PROGRAMS; DON'T USE .c ON END OF FILENAME. alias C 'eval "if (\!* =~ *.c) then \\ echo "C quitting: no .c on end of \!* please." \\ else \\ if (-e \!*) mv \!* \!*.old \\ echo \!*.c SENT TO cc \\ cc -s \!*.c -o \!* \\ if (-e \!*) chmod 311 \!* \\ endif"'
JP
Getting quoting right in C shell aliases can be a real problem. Dan Bernstein wrote two aliases called makealias and quote that take care of this for you.
For example, here I use makealias to avoid having to quote ! and *:
% makealias mycat cat `ls | sed '1,/!*/d'` | less CTRL-d alias mycat 'cat `ls | sed '\''1,/\!*/d'\''` | less'
I typed the makealias mycat command and the line starting with cat, then pressed CTRL-d and got back an alias definition with all the quoting done correctly.
The properly quoted alias definition is sent to the standard output. That line is what you would use to define the alias.[1]
Here are the quote and makealias aliases themselves:
Go to http://examples.oreilly.com/upt3 for more information on: makealias.csh
alias quote "/bin/sed -e 's/\\!/\\\\\!/g' \\ -e 's/'\\\''/'\\\'\\\\\\\'\\\''/g' \\ -e 's/^/'\''/' -e 's/"\$"/'\''/'" alias makealias "quote | /bin/sed 's/^/alias \!:1 /' \!:2*"
Pretty gross, but they do the job. On Darwin, as on many BSD-derived systems, sed is in /usr/bin, not /bin. You may wish simply to use the command name without the explicit path, or use the explicit (but correct) path. On Linux, the script above does not work with tcsh, which handles multi-line aliases anyway.
JIK and SJC
Most shells have aliases (Section 29.2). Almost all Bourne-type shells have functions, which are like aliases, but richer and more flexible. Here are four examples.
Let's start with two aliases from Section 29.2, changed into shell functions: The la function includes "hidden" files in ls listings. The lf function labels the names as directories, executable files, and so on.
function la ( ) { ls -a "$@"; } function lf ( ) { ls -F "$@"; }
The spaces and the semicolon (;) are important. You don't need them on some shells, but writing functions this way (or in the multiline format in later examples) is more portable.[2] The function keyword is not needed in the original Bourne shell but is required in later versions of bash. The "$@" (Section 35.20) is replaced by any arguments (other options, or directory and filenames) you pass to the function:
$ la -l somedir ...runs ls -a -l somedir
Go to http://examples.oreilly.com/upt3 for more information on: mx.sh
The mx function uses dig to look up the DNS MX (mail exchanger) record for a host, then sed (Section 34.1) to pull out the "ANSWER SECTION", which has the hostname or hostnames:
for Section 35.21
function mx( ) { # Look up mail exchanger for host(s) for host do echo "==== $host ====" dig "$host" mx in | sed -n '/^;; ANSWER SECTION:/,/^$/{ s/^[^;].* //p }' done }
mx takes one or more hostname arguments; it runs dig and sed on each hostname. For example, the mail exchangers for oreilly.com are smtp2.oreilly.com and smtp.oreilly.com. The mail exchanger for hesketh.com is mail.hesketh.com:
$ mx oreilly.com hesketh.com ==== oreilly.com ==== smtp2.oreilly.com. smtp.oreilly.com. ==== hesketh.com ==== mail.hesketh.com.
This example shows how to write a function with more than one line. In that style, with the ending curly brace on its own line, you don't need a semicolon after the last command. (The curly braces in the middle of the function are inside quotes, so they're passed to sed as part of its script.)
The mx function looks like a little shell program (Section 35.2). Shell functions have the same syntax as a shell script, except for the enclosing function name and curly braces. In fact, a shell function can be defined and used within a shell script (Section 35.30). But, as we've seen, it's also handy for interactive use.
Like aliases, functions run in the current shell process not in a subprocess as shell scripts do. So they can change your shell's current directory, reset shell and environment variables, and do basically anything you could do at a shell prompt. (Section 24.3 has details.)
This next function is for a group of people who are all working on a project. A directory named /work has symbolic links (Section 10.4) named for each worker /work/ann, /work/joe, etc. and each link points to the directory where that person is working. Each worker makes a function named work that, by default, cds to her directory and summarizes it. If the person gives an argument to the function like work todo, for instance the script edits the file named .todo in that directory. This setup also lets people quickly find out where others in the group are working.
Go to http://examples.oreilly.com/upt3 for more information on: work.sh
Okay, I admit that I made this up as a demonstration for this article, as a way to show a lot of features in a small amount of space. Anyway, here's the function:
if Section 35.13, '...' Section 28.14, wc Section 16.6
function work ( ) { local status=0 if [ $# -eq 1 -a "$1" = todo ] then ${VISUAL-vi} /work/$USER/.todo status=$? # return status from editor elif [ $# -ne 0 ] then echo "Usage: work [todo]" 1>&2 status=1 else cd /work/$USER echo "You're in your work directory `pwd`." echo "`ls | wc -w` files to edit." status=0 fi return $status }
There are three points I should make about this example. First, the local command defines a shell variable named status that's local to the function which means its value isn't available outside the function, so it's guaranteed not to conflict with variables set other places in the shell. I've also set the value to 0, but this isn't required. (In the original Korn shell, use the typeset command to set a local variable.) Second, when you run a function, the first argument you pass it is stored in $1, the second in $2, and so on (Section 35.20). Shell and environment variables set outside of the function, and nonlocal variables set within the function, are passed to and from the function. Finally, the return command returns a status (Section 35.12) to the calling shell. (Without return, the function returns the status from the last command in the function.) For a function you use interactively, like this one, you may not care about the status. But you also can use return in the middle of a function to end execution and return to the calling shell immediately.
Okay, students, this example is "extra credit" ;-)...You can ignore this ramble unless you want some esoterica. (I'm actually not trying to waste your time. There are some useful bits of info in here about the internal workings of the shells.) Functions can call each other recursively, and local variables are passed to functions they call, but changes in a called function are not passed back to the calling function. When I say "recursion," I've gotta show the classic demonstration: a factorial function.[3]
The fac function calculates the factorial of the number passed in $1. It writes the result to standard output, for two reasons. First, doing so lets you type fac n at the command line (why you'd need to calculate a factorial very often, though, I'm not sure!). Second, if the shells' return command works like the Unix exit statuses (and I haven't checked all versions of all shells), the values are only eight bits so it's better to return a string, which lets us handle bigger integers. I could put in more error checking, but since this is all theoretical anyway, here's the simple version of fac:
Go to http://examples.oreilly.com/upt3 for more information on: fac.sh
function fac ( ) { if [ "$1" -gt 0 ] then echo $(($1 * `fac $(($1 - 1))`)) else echo 1 fi }
Then you can play:
$ fac 0 1 $ fac 15<PHONE_NUMBER> $ fac 18 -898433024
Oops: overflow. Try zsh instead of bash or ksh; zsh built-in arithmetic seems to have more capacity:
zsh$ fac 18<PHONE_NUMBER>728000
You can do some simple tracing by typing set -x (Section 27.15) at a shell prompt. Then the shell will display the commands it executes. (This works best in bash because it puts one + character at the left edge of each line to show each level of recursion.) You also can add some tracing code that uses a local variable, level, to store the depth of recursion. The code echoes debugging messages that show the depth of recursion of each call. Note that because the "returned value" of each function is written to its standard output, these debugging messages have to be on the standard error! (To see what happens otherwise, remove the 1>&2 operator (Section 36.16).) Here's fac with debugging code:
${..-..} Section 36.7
fac ( ) { local level=${level-0} echo "debug: recursion level is $((level += 1)). Doing fac of $1" 1>&2 if [ "$1" -gt 0 ] then echo $(($1 * `fac $(($1 - 1))`)) else echo 1 fi echo "debug: leaving level $level." 1>&2 }
Let's run the code with tracing. Note that changes to the value of level at deeper levels doesn't affect the value at higher levels and that level isn't set at all in the top-level shell:
$ fac 3 debug: recursion level is 1. Doing fac of 3 debug: recursion level is 2. Doing fac of 2 debug: recursion level is 3. Doing fac of 1 debug: recursion level is 4. Doing fac of 0 debug: leaving level 4. debug: leaving level 3. debug: leaving level 2. 6 debug: leaving level 1. $ echo $level $
The next two articles cover specifics about functions in particular shells, and Section 29.14 shows how to simulate functions in shells that don't have them.
Here's another overall note. Each shell has its own commands for working with functions, but in general, the typeset -f command lists the functions you've defined, and unset -f funcname deletes the definition of the function named funcname.
JP and SJC
Section 27.11 introduces shell functions for all Bourne-type shells. This article covers details of functions in specific shells.
A bash and ksh function can be made read-only. In ksh, that means the function can't be changed. In bash, it can't be changed or removed. To make a function read-only, use the ksh command typeset -r funcname or use read-only -f funcname in bash, where funcname is the name of the function.
A system administrator might want to set read-only functions from a system-wide setup file (Section 3.3) like /etc/profile. bash users can't unset read-only functions, though. So once a function foo has been defined, how can you define your own foo? As Section 27.9 explains, you can type command foo to use a command named foo from your search path. Or define an alias named foo; aliases are used before functions. Finally, if you'd like to redefine the function, make an alias with the same name, then make the alias invoke a function with a (usually similar) name. For instance, to override a read-only function named foo:
alias foo=_foo function _foo( ) { ...your foo function... }
If a function uses an environment variable like VISUAL or EDITOR (Section 35.5), your standard text editor you can set the value temporarily while the function executes. The syntax is the same for functions, but only in bash and zsh. For instance, if you usually use vi, but you want to use emacs as you run the work function (Section 29.11):
$ VISUAL=emacs work todo
There are lots of zsh options. You may want to set some of them temporarily during a shell function without needing to reset them to their previous values when the function returns to the calling shell. To make that happen, set the LOCAL_OPTIONS option (run setopt local_options) in the function body.
For instance, maybe you use setopt nounset to make your interactive shell complain if you try to expand an unset shell variable. During your func function, though, you want to use the unset option to allow unset variables. Define the function like this:
function mullog( ) { setopt unset local_options ...do whatever... }
JP and SJC
One easy way to define shell functions that you'll have every time you start a new shell is by defining them in your shell setup files (Section 3.3). Here are two other ways.
In bash , you can export functions to other bash subshells (Section 24.4). (The original Korn shell, but not the public-domain version, supposedly does this too, but I haven't had much luck with it.) Just use the command typeset -fx funcname, where funcname is the name of the function.
How does this work? It stores the function in an environment variable (Section 35.3) whose value starts with ( ). You can see this with printenv or env (Section 35.3). For example, let's define a simple function named dir, export it, start a subshell, run the function, and look for it in the environment:
bash$ function dir( ) { ls -F "$@"; } bash$ typeset -fx dir ...export the function bash$ bash ...start subshell bash$ dir ...the function still works ,ptbk.last ch14.sgm ch36.ps.gz fmt/ ,xrefs.list ch15.ps.gz ch36.sgm gmatlogs/ bash$ printenv ...lots of environment variables... dir=( ) { ls -F "$@" }
Both ksh and zsh will automatically search for functions in the PATH variable (Section 35.6). So you can put a function in a file with the same name as the function (for instance, put the function foo in a file named foo), and make the file executable (with chmod +x foo (Section 35.1)), and then the shell can find the function.
I don't like to use PATH for function-searching, though. One reason is that PATH is passed to all Unix processes but if the process isn't a shell and it tries to execute a function file, it'll probably fail in an ugly way.[4] Also, making a file executable if you don't tell the kernel how to execute it seems to me a recipe for trouble. A better way to help the shell find functions is to set a function search path in the FPATH environment variable; it has the same syntax as PATH. (In zsh, you can also set the fpath array with the same syntax as path.) In FPATH, list directories that hold function files. In ksh, those files don't even need execute permission! Then ksh and zsh will search the FPATH directories if they can't find an executable file in the PATH.
Would you like the shells to search FPATH before PATH, so that a function will be executed before a standard command with the same name? (I would. After all, if I define a function from a shell prompt or shell setup file like .zshrc, that function will be run instead of a standard executable.) Here's how to set that up. Tell the shell to autoload the function. Autoloading happens automatically if there's no match found in PATH because, as I said above, the shell falls back to FPATH if it doesn't find a match in PATH. But if you want the shell to look for a particular name in FPATH before it tries PATH, you have to autoload the function. Autoloading a function doesn't actually define the function (read the function body into the shell); it simply declares that the function exists so the shell will remember that when you eventually want to execute the function.
This has a few twists, so let's look at each shell separately. You might want to do this yourself and follow along: When I first played with FPATH, I made two subdirectories of /tmp named a and b. Each directory had three simple function files named func1, func2, and foo. The functions func1 and func2 simply echo a message with their name and location. foo invokes a shell script of the same name, but first uses set -xv (Section 37.1) for debugging. func1 was a single-line function and func2 was multiline. The files in /tmp/a weren't executable, and the ones in /tmp/b were executable. I set the FPATH environment variable (set the shell variable and exported it) to /tmp/a:/tmp/b so the shells should try the nonexecutable function files before falling back to the executables. After setting that up, I started a ksh subshell and played around. Then I exited the ksh and started a zsh.
Here's what happened in pdksh. The standard ksh is similar but not as verbose:
$ echo $FPATH /tmp/a:/tmp/b $ type func1 func1 is a undefined (autoload from /tmp/a/func1) function $ func1 This is func1 from /tmp/a, a single-line unexecutable function $ type func1 func1 is a function $ typeset -f func2 $ type func2 func2 is a undefined (autoload from /tmp/a/func2) function $ func2 This is func2 from /tmp/a, a multi-line unexecutable function $ typeset -f func2 func2( ) { echo "This is func2 from /tmp/a, a multi-line unexecutable function" } $ type foo foo is /home/jpeek/.bin/foo $ autoload foo $ type foo foo is a undefined (autoload from /tmp/a/foo) function $ cat /tmp/a/foo foo( ) { sh -xv $HOME/.bin/foo "$@"; } $ foo #!/bin/sh echo "Welcome to the exciting $0 program..." + echo Welcome to the exciting /home/jpeek/.bin/foo program... Welcome to the exciting /home/jpeek/.bin/foo program... $ type foo foo is a function
Here's what happened with func1, func2, and foo:
First, without autoloading, I use type (Section 2.6) to see if the shell has found func1 anywhere. There's no func1 along the PATH, so the shell searches FPATH and finds it. So func1 is automatically marked for autoloading; note that I didn't have to autoload it myself because there's no func1 in a PATH directory. I run func1, then use type again; now the shell confirms that it's read the function definition and func has been loaded into the shell.
Next I played with func2. typeset -f (Section 29.11) shows that the shell doesn't have a definition for the function yet, but type shows that the function declaration has been autoloaded. (This isn't just academic. If you edit a function definition file, it's good to know whether the shell has already loaded a copy of a previous definition.) I run the function, then use typeset to display the function, which has been loaded (of course!) by now.
Because there's a program named foo in my PATH, type shows that. But I want the shell to use my front-end foo function, so I run autoload and then type confirms that the shell looked down FPATH and found the function in /tmp/a. The function definition hasn't been loaded yet, so I use cat (Section 12.2) to display the function file. I run the foo function; because it set the shell's verbose and echo flags, you can see the contents of the foo shell script and the commands that are executed. Finally, type shows that the shell will now run the function when I execute foo.
If you'd like to be sure that all the functions in your FPATH are autoloaded especially if you add new ones pretty often here's a way to do it. Put code like this in your ENV setup file (Section 3.3):
IFS Section 36.23, for Section 28.9
# Autoload all functions in FPATH directories. # Temporarily add a colon (:) to IFS to parse FPATH: old_ifs="$IFS"; IFS=":$IFS" for d in $FPATH do autoload `ls $d` done IFS="$oldifs"; unset old_ifs
If a directory in FPATH is empty, autoload gets no arguments and, in that case, shows the function definitions it has already autoloaded. I only put a directory in my FPATH if it has functions to load. If you might have an empty directory in yours, you can avoid seeing the autoload output by editing that code to store the output of ls in a shell variable and running autoload only if the variable isn't empty.
The zsh system is mostly like ksh. The difference is that zsh doesn't automatically search FPATH. You have to manually autoload any function that you want zsh to search for in FPATH.
zsh$ echo $FPATH /tmp/a:/tmp/b zsh$ type func1 func1 not found zsh$ func1 zsh: command not found: func1 zsh$ autoload func1 zsh$ type func1 func1 is a shell function zsh$ func1 This is func1 from /tmp/a, a single-line unexecutable function zsh$ type func1 func1 is a shell function zsh$ autoload func2 zsh$ typeset -f func2 undefined func2 ( ) { } zsh$ func2 This is func2 from /tmp/a, a multi-line unexecutable function zsh$ typeset -f func2 func2 ( ) { echo "This is func2 from /tmp/a, a multi-line unexecutable function" } zsh$ type foo foo is /home/jpeek/.bin/foo zsh$ autoload foo zsh$ foo #!/bin/sh echo "Welcome to the exciting $0 program..." + echo Welcome to the exciting /home/jpeek/.bin/foo program... Welcome to the exciting /home/jpeek/.bin/foo program... zsh$ type foo foo is a shell function
I won't repeat all of the explanation from the ksh section. Instead, let's just look at the differences:
The first examples show that zsh won't look down FPATH for func1. Once you autoload the function, type doesn't give you a clue whether the function has been defined or just declared.
In zsh, you can see whether a function has been defined by using typeset -f (instead of type). After autoloading it, func2 has been declared but not defined. As the example shows, running the function once loads the definition.
If you'd like to be sure that all the functions in your FPATH are autoloaded especially if you add new ones pretty often here's how to do it in zsh. Put code like this in a per-shell setup file (Section 3.3) typically .zshrc:
# Autoload all functions in fpath directories: for d in $fpath do autoload `ls $d` done
The code is simpler than in ksh because we can step through the fpath array without parsing it at colon (:) characters. As in ksh, though, you'll want to tweak the code if a directory in fpath might be empty: store the output of ls in an array and run autoload only if the array has members.
JP
Until System V Release 2 (circa 1984), the Bourne shell had no way for users to set up their own built-in commands. If you have a Bourne shell with no functions (Section 29.11) or aliases (Section 29.2) and haven't yet turned the host machine into a wet bar, CD/DVD storage case, or some other pragmatic but fun use for a 30-year-old computer, you can do a lot of the same things with shell variables and the eval (Section 27.8) command.
Let's look at an example. First, here's a shell function named cps (copy safely). If the destination file exists and isn't empty, the function prints an error message instead of copying:
test Section 35.26
cps( ) { if test ! -s "$2" then cp "$1" "$2" else echo "cps: cannot copy $1: $2 exists" fi }
If you use the same cps twice, the first time you'll make bfile. The second time you try, you see the error:
$ cps afile bfile ... $ cps afile bfile cps: cannot copy afile: bfile exists
Here's the same cps stored in a shell variable instead of a function:
cps=' if test ! -s "$2" then cp "$1" "$2" else echo "cps: cannot copy $1: $2 exists" fi '
Because this fake function uses shell parameters, you have to add an extra step: setting the parameters. Simpler functions are easier to use:
set Section 35.25
$ set afile bfile $ eval "$cps" ... $ eval "$cps" cps: cannot copy afile: bfile exists
JP
[1] [The mycat alias runs cat on all files with names later in the alphabet than the argument you type. The output of cat is piped to the less (Section 12.3) pager. For example, let's say your current directory has the files afile, count, jim, and report. Typing mycat count would display the files jim and report. JP]
[2] A function is a Bourne shell list construct.
[3] Factorial is the product of all integers from some nonnegative number through one. So the factorial of 6, written 6!, is 6 x 5 x 4 x 3 x 2 x 1 or 720. Also, zero factorial (0!) is defined as 1. In recursion, a function typically calls itself to get "the next value," then waits for that value to be returned and returns its answer to the function that called it. If you ask a function to calculate 6!, it will call itself and ask for 5!, then call itself and ask for 4!, and so on. This can be confusing if you haven't seen it before, but there's information about it in almost every computer science textbook on basic programming techniques. It is also worth mentioning that recursion is a pretty poor way to calculate factorials in most languages, namely, those that lack support for tail recursion.
[4] zsh lets you define a function in a function file without the enclosing funcname( ) { and } syntax. Then the file could be directly executed in a subshell by some shell that doesn't understand functions. I'm not sure I'd ever use this because running a function this way as an external command instead of an internal command (Section 1.9) means the function can't access or modify the environment of the shell that's running it, which is one of the reasons for writing a shell function in the first place! But, like everything in zsh, I'm sure someone had a good reason for making this work.
| CONTENTS |


A blacksmith is a metalsmith who creates objects from wrought iron or steel by forging the metal, using tools to hammer, bend, and cut (cf. tinsmith). Blacksmiths produce objects such as gates, grilles, railings, light fixtures, furniture, sculpture, tools, agricultural implements, decorative and religious items, cooking utensils and weapons. There was an historical opposition between the heavy work of the blacksmith and the more delicate operation of a whitesmith, who usually worked in gold, silver, pewter, or the finishing steps of fine steel. The place where a blacksmith works is called variously a smithy, a forge or a blacksmith's shop. While there are many people who work with metal such as farriers, wheelwrights, and armorers, in former times the blacksmith had a general knowledge of how to make and repair many things, from the most complex of weapons and armor to simple things like nails or lengths of chain.


1969
ISRO was established to harness space technology for India.
ISRO's major milestones
ISRO was established to harness space technology for India.
Satish Dhawan Space Centre formed in Sriharikota, Andhra Pradesh.
India's first satellite, Aryabhatta was launched.
ASLV was launched successfully.
PSLV, ISRO's most reliable launcher carried out its first successful mission.
PSLV started launching foreign satellites.
GSLV was successfully launched.
Kalpana-1 satellite was launched.
Chandrayaan-1 was successfully launched. A Tricolour was hoisted on the moon!
ISRO created history after successfully launching 104 satellites from Sriharikota Space Centre.
Chandrayaan-2 was launched on July 15.
ISRO continues to create history!
VERITAS'19


[gecode-users] How to set an arbitrary RandomGenerator for randomized branching?!?
Guido Tack
tack at ps.uni-sb.de
Tue May 19 03:29:52 CEST 2009
Martin Mann wrote:
> Is there a possibility to support user defined generators? e.g. in
> coming versions?
>
> If not available right now, maybe you like the following suggestion:
[...]
A problem with your approach is that a global random number generator
doesn't work in a multi-threaded setting (you don't want to lock
access to it, I think). One would at least have to have it per thread.
Cheers,
Guido
More information about the gecode-users
mailing list


public final class PTCRISync
extends java.lang.Object
An implementation of the PTCRISync synchronization service based on the version 0.4.3 of the specification, enhanced with minimal quality criteria. This service allows CRIS services to maintain their repositories synchronized with ORCID. This requires the CRIS service to have access to the ORCID Member API.
The service has two main functionalities: to keep a set of local activities
updated in an ORCID user profile through an
export
procedure, and import activities not known locally from the ORCID
profile, either through the
import
for completely new activities or through the
import
for new information for already known entries. Activities must meet
certain quality criteria to be imported (the set of invalid activities can be
retrieved as well through
importInvalidBase(ORCIDHelper, List, Collection, ProgressHandler)
.
The implementation of the service assumes that the local CRIS communicates
the local activities following the established ORCID schema, according to the
ORCID Member API 2.0. This uniforms the API and simplifies the
synchronization process. The current version focuses on synchronizing
research productions and funding entries, which must be encoded as ORCID
works
and funding
activities.
The communication with ORCID is encapsulated in an ORCID client
that contains information regarding the CRIS Member API and the ORCID
profile that is to be managed. An helper
provides utility
methods for the synchronization of activities.
The procedures do not currently consider the contributors (authors) of activities when assessing the quality criteria nor when assessing whether they are up-to-date, as this information is not available in ORCID summaries and would require additional calls to the ORCID API.
See https://ptcris.pt/hub-ptcris/.| Constructor | Description |
|---|---|
PTCRISync() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.Map<java.math.BigInteger,PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work>> |
export(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals,
ProgressHandler handler) |
Deprecated.
Replaced by
exportWorks(ORCIDClient, List, ProgressHandler) |
static java.util.Map<java.math.BigInteger,PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work>> |
exportForce(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals,
ProgressHandler handler) |
Deprecated.
|
static java.util.Map<java.math.BigInteger,PTCRISyncResult<org.um.dsi.gavea.orcid.model.funding.Funding>> |
exportFundings(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> locals,
java.util.Collection<org.um.dsi.gavea.orcid.model.funding.FundingType> types,
ProgressHandler handler) |
Exports a list of local CRIS funding entries to an ORCID profile and
keeps them up-to-date.
|
static java.util.Map<java.math.BigInteger,PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work>> |
exportWorks(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals,
ProgressHandler handler) |
Exports a list of local CRIS productions to an ORCID profile and keeps
them up-to-date.
|
static java.util.Map<java.math.BigInteger,PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work>> |
exportWorksForced(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals,
ProgressHandler handler) |
Exports a list of local CRIS productions to an ORCID profile and keeps
them up-to-date.
|
static java.lang.Integer |
importCounter(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals,
ProgressHandler handler) |
Deprecated.
|
static java.lang.Integer |
importFundingCounter(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> locals,
java.util.Collection<org.um.dsi.gavea.orcid.model.funding.FundingType> types,
ProgressHandler handler) |
Counts new valid funding activities in an ORCID profile given a set of
known local CRIS funding entries, following the criteria of
importFundings(ORCIDClient, List, Collection, ProgressHandler)
but is more efficient, generating less API calls. |
static java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> |
importFundings(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> locals,
java.util.Collection<org.um.dsi.gavea.orcid.model.funding.FundingType> types,
ProgressHandler handler) |
Discovers new valid funding activities in an ORCID profile given a set of
known local CRIS funding entries.
|
static java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> |
importFundingUpdates(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> locals,
java.util.Collection<org.um.dsi.gavea.orcid.model.funding.FundingType> types,
ProgressHandler handler) |
Discovers updates to existing local CRIS funding activities in an ORCID
profile.
|
static java.util.Map<org.um.dsi.gavea.orcid.model.work.Work,java.util.Set<java.lang.String>> |
importInvalid(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals,
ProgressHandler handler) |
Deprecated.
|
static java.util.Map<org.um.dsi.gavea.orcid.model.funding.Funding,java.util.Set<java.lang.String>> |
importInvalidFundings(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> locals,
java.util.Collection<org.um.dsi.gavea.orcid.model.funding.FundingType> types,
ProgressHandler handler) |
Discovers new invalid funding activities (that do not pass the quality
criteria, see
ORCIDHelper.testMinimalQuality(ElementSummary) ) in an
ORCID profile given a set of known local CRIS entries, as well as the
causes for invalidity (defined at ORCIDFundingHelper ). |
static java.util.Map<org.um.dsi.gavea.orcid.model.work.Work,java.util.Set<java.lang.String>> |
importInvalidWorks(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals,
ProgressHandler handler) |
Discovers new invalid works (that do not pass the quality criteria, see
ORCIDHelper.testMinimalQuality(ElementSummary) ) in an ORCID
profile given a set of known local CRIS entries, as well as the causes
for invalidity (defined at ORCIDWorkHelper ). |
static java.util.List<org.um.dsi.gavea.orcid.model.work.Work> |
importUpdates(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals,
ProgressHandler handler) |
Deprecated.
|
static java.lang.Integer |
importWorkCounter(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals,
ProgressHandler handler) |
Counts new valid works in an ORCID profile given a set of
known local CRIS productions, following the criteria of
importWorks(ORCIDClient, List, ProgressHandler)
but is more efficient, generating less API calls. |
static java.util.List<org.um.dsi.gavea.orcid.model.work.Work> |
importWorks(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals,
ProgressHandler handler) |
Discovers new valid works in an ORCID profile given a set of known local
CRIS productions.
|
static java.util.List<org.um.dsi.gavea.orcid.model.work.Work> |
importWorkUpdates(ORCIDClient client,
java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals,
ProgressHandler handler) |
Discovers updates to existing local CRIS productions in an ORCID
profile.
|
public static java.util.Map<java.math.BigInteger,PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work>> exportWorks(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.IllegalArgumentException
Exports a list of local CRIS productions to an ORCID profile and keeps
them up-to-date. This procedure manages the work activities in the ORCID
user profile that are sourced by the CRIS, both previously specified in
the client
.
The procedure detects every CRIS sourced work in the ORCID profile that
matches any local entry that is being exported; if there is no matching
local entry, the ORCID activity is deleted from the profile. Otherwise it
will be updated with the meta-data of one of the matching local entries.
Finally, for local entries without any matching ORCID activity, new ones
are created. The matching is performed by detecting shared
external identifiers
(see
ORCIDHelper.getSelfExternalIdsDiffS(ElementSummary, Collection)
).
Activities are only updated if the meta-data is not up-to-date.
Currently, the title, the publication year and the publication are
considered (see ORCIDHelper.isUpToDateE(ElementSummary, ElementSummary)
).
The procedure expects the CRIS service to provide the local works in the
ORCID schema, in particular encoding them as works
. Thus,
the meta-data of the CRIS sourced entries in the ORCID profile is exactly
that of the provided local entries that are to be exported. The put-code
of these local entries is assumed to be used as local key identifiers,
and are disregarded during the update of the ORCID profile (new entries
are assigned fresh put-codes and updated entries use the put-code of the
existing ORCID entry).
The provided local activities must pass a quality criteria to be kept
synchronized in ORCID. Currently, this forces the existence of external
identifiers, the title, the publication year and the publication type
(see ORCIDHelper.testMinimalQuality(ElementSummary)
.
The procedure reports the status for each of the input local activities,
identifying them by the provided local put-code, including the ORCID
error if the process failed. See PTCRISyncResult
for the codes.
If the local put-code is empty, returns a default value, which currently
is the put-code remotely assigned by ORCID.
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the list of local productions to be exported that should be
kept synchronized in the ORCID user profilehandler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.IllegalArgumentException
- if null arguments@Deprecated public static java.util.Map<java.math.BigInteger,PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work>> export(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.IllegalArgumentException
exportWorks(ORCIDClient, List, ProgressHandler)
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the list of local productions to be exported that should be
kept synchronized in the ORCID user profilehandler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.IllegalArgumentException
- if null argumentspublic static java.util.Map<java.math.BigInteger,PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work>> exportWorksForced(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.IllegalArgumentException
Exports a list of local CRIS productions to an ORCID profile and keeps
them up-to-date. This procedure manages the work activities in the ORCID
user profile that are sourced by the CRIS, both previously specified in
the client
.
The procedure detects every CRIS sourced work in the ORCID profile that
matches any local entry that is being exported; if there is no matching
local entry, the ORCID activity is deleted from the profile. Otherwise it
will be updated with the meta-data of one of the matching local entries.
Finally, for local entries without any matching ORCID activity, new ones
are created. The matching is performed by detecting shared
external identifiers
(see
ORCIDHelper.getSelfExternalIdsDiffS(ElementSummary, Collection)
).
Activities are always updated, even if already up-to-date (no test is performed). The caller of this method should guarantee that the input local productions have been effectively updated, otherwise there will be unnecessary calls to the ORCID API.
The procedure expects the CRIS service to provide the local works in the
ORCID schema, in particular encoding them as works
. Thus,
the meta-data of the CRIS sourced entries in the ORCID profile is exactly
that of the provided local entries that are to be exported. The put-code
of these local entries is assumed to be used as local key identifiers,
and are disregarded during the update of the ORCID profile (new entries
are assigned fresh put-codes and updated entries use the put-code of the
existing ORCID entry).
The provided local activities must pass a quality criteria to be kept
synchronized in ORCID. Currently, this forces the existence of external
identifiers, the title, the publication year and the publication type
(see ORCIDHelper.testMinimalQuality(ElementSummary)
.
The procedure reports the status for each of the input local activities,
identifying them by the provided local put-code, including the ORCID
error if the process failed. See PTCRISyncResult
for the codes.
If the local put-code is empty, returns a default value, which currently
is the put-code remotely assigned by ORCID.
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the list of local productions to be exported that should be
kept synchronized in the ORCID user profilehandler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.IllegalArgumentException
- if null arguments@Deprecated public static java.util.Map<java.math.BigInteger,PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work>> exportForce(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.IllegalArgumentException
exportWorksForced(ORCIDClient, List, ProgressHandler)
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the list of local productions to be exported that should be
kept synchronized in the ORCID user profilehandler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.IllegalArgumentException
- if null argumentspublic static java.util.Map<java.math.BigInteger,PTCRISyncResult<org.um.dsi.gavea.orcid.model.funding.Funding>> exportFundings(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> locals, java.util.Collection<org.um.dsi.gavea.orcid.model.funding.FundingType> types, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.IllegalArgumentException
Exports a list of local CRIS funding entries to an ORCID profile and
keeps them up-to-date. This procedure manages the funding activities in
the ORCID user profile that are sourced by the CRIS, both previously
specified in the client
.
The procedure detects every CRIS sourced funding activity in the ORCID
profile that matches any local entry that is being exported; if there is
no matching local entry, the ORCID activity is deleted from the profile.
Otherwise it will be updated with the meta-data of one of the matching
local entries. Finally, for local entries without any matching ORCID
activity, new ones are created. The matching is performed by detecting
shared external identifiers
(see
ORCIDHelper.getSelfExternalIdsDiffS(ElementSummary, Collection)
).
Activities are only updated if the meta-data is not up-to-date.
Currently, the title, the start year, the funding type and the funding
organization are considered (see
ORCIDHelper.isUpToDateE(ElementSummary, ElementSummary)
).
The procedure expects the CRIS service to provide the local funding
entries in the ORCID schema, in particular encoding them as
funding activities
. Thus, the meta-data of the CRIS
sourced entries in the ORCID profile is exactly that of the provided
local entries that are to be exported. The put-code of these local
entries is assumed to be used as local key identifiers, and are
disregarded during the update of the ORCID profile (new entries are
assigned fresh put-codes and updated entries use the put-code of the
existing ORCID entry).
The provided local activities must pass a quality criteria to be kept
synchronized in ORCID. Currently, this forces the existence of external
identifiers, the title, the start year, the funding type and the funding
organization (see
ORCIDHelper.testMinimalQuality(ElementSummary)
.
A set of funding types can be provided to allow the independent synchronization of different types of entries. Local and remote activities outside the provided types are simply ignored (they are not considered invalid).
The procedure reports the status for each of the input local activities,
identifying them by the provided local put-code, including the ORCID
error if the process failed. See PTCRISyncResult
for the codes.
If the local put-code is empty, returns a default value, which currently
is the put-code remotely assigned by ORCID.
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the list of local productions to be exported that should be
kept synchronized in the ORCID user profiletypes
- the types of ORCID funding entries that should be considered
(others are simply ignored).handler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.IllegalArgumentException
- if null argumentspublic static java.util.List<org.um.dsi.gavea.orcid.model.work.Work> importWorks(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.InterruptedException, java.lang.IllegalArgumentException
Discovers new valid works in an ORCID profile given a set of known local
CRIS productions. Creates creation notifications for each work group at
ORCID (merged into as a single work by the helper
) without matching local productions (i.e., those without shared
external identifiers
). To import updates for works
with shared external identifiers
importWorkUpdates(ORCIDClient, List, ProgressHandler)
should be
used instead.
Currently, these creation notifications simply take the shape of ORCID
works themselves (representing a merged work group). The group merging
selects the meta-data of the preferred activity and the external
identifiers of the whole group (see
ORCIDHelper.group(Object)
). The selection of the
meta-data from a group could be changed without affecting the correction
of the procedure.
Since the put-code attribute is used as a local key of each activity, it is null for these creation notifications (and not the put-code of the remote ORCID activity that gave origin to it). Since only the external identifiers of the local productions are used to search for matches, the remainder meta-data of the input local activities could be left null.
ORCID activities without minimal quality are ignored by this procedure.
Currently, the quality criteria forces the existence of external
identifiers, the title, publication year and publication type (see
ORCIDHelper.testMinimalQuality(ElementSummary)
). Works that do
not match the criteria can be imported with
importInvalid(ORCIDClient, List, ProgressHandler)
. Note that
currently group merging simply collects the meta-data (other than the
external identifiers) from the preferred activity, which is used in the
quality assessment.
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the full list of local productionshandler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.InterruptedException
- if the asynchronous GET process is interruptedjava.lang.IllegalArgumentException
- if null argumentspublic static java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> importFundings(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> locals, java.util.Collection<org.um.dsi.gavea.orcid.model.funding.FundingType> types, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.InterruptedException, java.lang.IllegalArgumentException
Discovers new valid funding activities in an ORCID profile given a set of
known local CRIS funding entries. Creates creation notifications for each
funding group at ORCID (merged into as a single funding entry by the
helper
) without matching local entries (i.e.,
those without shared external identifiers
). To import
updates for funding activities with shared external identifiers
importFundingUpdates(ORCIDClient, List, Collection, ProgressHandler)
should be used instead.
Currently, these creation notifications simply take the shape of ORCID
funding activities themselves (representing a merged activity group). The
group merging selects the meta-data of the preferred activity and the
external identifiers of the whole group (see
ORCIDHelper.group(Object)
). The selection of the meta-data
from a group could be changed without affecting the correction of the
procedure.
Since the put-code attribute is used as a local key of each activity, it is null for these creation notifications (and not the put-code of the remote ORCID activity that gave origin to it). Since only the external identifiers of the local funding entries are used to search for matches, the remainder meta-data of the input local activities could be left null.
ORCID activities without minimal quality are ignored by this procedure.
Currently, the quality criteria forces the existence of external
identifiers, the title, publication year and publication type (see
ORCIDHelper.testMinimalQuality(ElementSummary)
). Funding
entries that do not match the criteria can be imported with
importInvalid(ORCIDClient, List, ProgressHandler)
. Note that
currently group merging simply collects the meta-data (other than the
external identifiers) from the preferred activity, which is used in the
quality assessment.
A set of funding types can be provided to allow the independent synchronization of different types of entries. Local and remote activities outside the provided types are simply ignored (they are not considered invalid).
*client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the full list of local funding entrieshandler
- the progress handler responsible for receiving progress
updatestypes
- the types of ORCID funding activities that should be
considered (others are simply ignored)org.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.InterruptedException
- if the asynchronous GET process is interruptedjava.lang.IllegalArgumentException
- if null argumentspublic static java.lang.Integer importWorkCounter(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.IllegalArgumentException
Counts new valid works in an ORCID profile given a set of
known local CRIS productions, following the criteria of
importWorks(ORCIDClient, List, ProgressHandler)
but is more efficient, generating less API calls.
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the full list of local productionshandler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.IllegalArgumentException
- if null argumentsimportWorks(ORCIDClient, List, ProgressHandler)
@Deprecated public static java.lang.Integer importCounter(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.IllegalArgumentException
importWorkCounter(ORCIDClient, List, ProgressHandler)
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the full list of local productionshandler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.IllegalArgumentException
- if null argumentspublic static java.lang.Integer importFundingCounter(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> locals, java.util.Collection<org.um.dsi.gavea.orcid.model.funding.FundingType> types, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.IllegalArgumentException
Counts new valid funding activities in an ORCID profile given a set of
known local CRIS funding entries, following the criteria of
importFundings(ORCIDClient, List, Collection, ProgressHandler)
but is more efficient, generating less API calls.
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the full list of local funding entriestypes
- the types of ORCID funding entries that should be considered
(others are simply ignored)handler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.IllegalArgumentException
- if null argumentsimportFundings(ORCIDClient, List, Collection, ProgressHandler)
public static java.util.Map<org.um.dsi.gavea.orcid.model.work.Work,java.util.Set<java.lang.String>> importInvalidWorks(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.InterruptedException, java.lang.IllegalArgumentException
Discovers new invalid works (that do not pass the quality criteria, see
ORCIDHelper.testMinimalQuality(ElementSummary)
) in an ORCID
profile given a set of known local CRIS entries, as well as the causes
for invalidity (defined at ORCIDWorkHelper
). Other than the
criteria, the behavior is similar to that of
importWorks(ORCIDClient, List, ProgressHandler)
.
Note that currently group merging simply collects the meta-data (other
than the external identifiers) from the preferred activity, which is used
in the quality assessment.
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the full list of local workshandler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.InterruptedException
- if the asynchronous GET process is interruptedjava.lang.IllegalArgumentException
- if null argumentsimportWorks(ORCIDClient, List, ProgressHandler)
@Deprecated public static java.util.Map<org.um.dsi.gavea.orcid.model.work.Work,java.util.Set<java.lang.String>> importInvalid(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.InterruptedException, java.lang.IllegalArgumentException
importInvalidWorks(ORCIDClient, List, ProgressHandler)
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the full list of local workshandler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.InterruptedException
- if the asynchronous GET process is interruptedjava.lang.IllegalArgumentException
- if null argumentspublic static java.util.Map<org.um.dsi.gavea.orcid.model.funding.Funding,java.util.Set<java.lang.String>> importInvalidFundings(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> locals, java.util.Collection<org.um.dsi.gavea.orcid.model.funding.FundingType> types, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.InterruptedException, java.lang.IllegalArgumentException
Discovers new invalid funding activities (that do not pass the quality
criteria, see
ORCIDHelper.testMinimalQuality(ElementSummary)
) in an
ORCID profile given a set of known local CRIS entries, as well as the
causes for invalidity (defined at ORCIDFundingHelper
). Other than
the criteria, the behavior is similar to that of
importFundings(ORCIDClient, List, Collection, ProgressHandler)
.
Note that currently group merging simply collects the meta-data (other
than the external identifiers) from the preferred activity, which is used
in the quality assessment.
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the full list of local funding activitiestypes
- the types of ORCID funding activities that should be
considered (others are simply ignored)handler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.InterruptedException
- if the asynchronous GET process is interruptedjava.lang.IllegalArgumentException
- if null argumentsimportFundings(ORCIDClient, List, Collection, ProgressHandler)
public static java.util.List<org.um.dsi.gavea.orcid.model.work.Work> importWorkUpdates(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.IllegalArgumentException
Discovers updates to existing local CRIS productions in an ORCID
profile. For each work group at ORCID (merged into as a
single activity by the helper
), finds matching
local entries (i.e., those with shared external
identifiers
) and creates update notifications if not already up to date.
To import works without shared external identifiers,
importWorks(ORCIDClient, List, ProgressHandler)
should be used instead.
These update notifications simply take the shape of ORCID activities themselves (representing a matching activity group). These works contain only the meta-data that needs to be updated locally. Currently, only the introduction of newly found external identifiers is considered (i.e., those that were already present in the local entry that is being updated are removed from the returned update). Thus, the remainder fields are returned null. Since only external identifiers are considered the quality criteria is not enforced on the remote ORCID activities.
The local entries are tested to be up-to-date by simply checking whether
they contain every external identifiers in the ORCID group (see
ORCIDHelper.hasNewSelfIDs(ElementSummary, ElementSummary)
. Thus
the remainder meta-data of the local entries can be currently left null.
The put-code attribute is used as a local key of each CRIS production. This means that the returned activities representing the updates have the put-code of the local entry that is to be updated (and not the put-code of the ORCID activity that gave origin to it).
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the full list of local productionshandler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.IllegalArgumentException
- if null arguments@Deprecated public static java.util.List<org.um.dsi.gavea.orcid.model.work.Work> importUpdates(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.work.Work> locals, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.IllegalArgumentException
importWorkUpdates(ORCIDClient, List, ProgressHandler)
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the full list of local productionshandler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.IllegalArgumentException
- if null argumentspublic static java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> importFundingUpdates(ORCIDClient client, java.util.List<org.um.dsi.gavea.orcid.model.funding.Funding> locals, java.util.Collection<org.um.dsi.gavea.orcid.model.funding.FundingType> types, ProgressHandler handler) throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException, java.lang.IllegalArgumentException
Discovers updates to existing local CRIS funding activities in an ORCID
profile. For each funding activity group at ORCID (merged into as a
single activity by the helper
), finds matching
local entries (i.e., those with shared external
identifiers
) and creates update notifications if not already up to date.
To import funding activities without shared external identifiers,
importFundings(ORCIDClient, List, Collection, ProgressHandler)
should be used instead.
These update notifications simply take the shape of ORCID activities themselves (representing a matching activity group). These works contain only the meta-data that needs to be updated locally. Currently, only the introduction of newly found external identifiers is considered (i.e., those that were already present in the local entry that is being updated are removed from the returned update). Thus, the remainder fields are returned null. Since only external identifiers are considered the quality criteria is not enforced on the remote ORCID activities.
The local entries are tested to be up-to-date by simply checking whether
they contain every external identifiers in the ORCID group (see
ORCIDHelper.hasNewSelfIDs(ElementSummary, ElementSummary)
. Thus
the remainder meta-data of the local entries can be currently left null.
A set of activity types can be provided to allow the independent synchronization of different types of entries. Local and remote activities outside the provided types are simply ignored (they are not considered invalid).
The put-code attribute is used as a local key of each CRIS funding entry. This means that the returned activities representing the updates have the put-code of the local entry that is to be updated (and not the put-code of the ORCID activity that gave origin to it).
client
- the ORCID client defining the CRIS Member API and user the
profile to be managedlocals
- the full list of local funding activitiestypes
- the types of ORCID funding activities that should be
considered (others are simply ignored)handler
- the progress handler responsible for receiving progress
updatesorg.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID fails when getting the
activities summaryjava.lang.IllegalArgumentException
- if null arguments


Custom Fundraising Terms
Working with our team, you are able to customize any terms of your STOs and associated smart contracts, including the target
amount you wish to raise, minimum (and / or maximum) investment lots, duration of the fundraising periods, lockup time on investments, dividend terms, etc.


PTI govt offered me Senate chairmanship: Fazl
by Web DeskJamiat Ulema-e-Islam-Fazl (JUI-F) chief Maulana Fazlur Rehman on Thursday claimed that the Pakistan Tehreek-e-Insaf (PTI) asked him to call off his Azadi March in return for the post of Senate chairman.
“You don’t know what offers they made me,” he said, referring to the government. “I was told to leave my seat and I could get re-elected to the assembly from Dera Ismail Khan,” he claimed.


Credits
Winterwatch
- BBC Studios, Natural History Unit
Connectivity Engineer
2020-23 Springwatch
- BBC Studios, Natural History Unit
Connectivity Engineer
2020-23 Autumnwatch
- BBC Studios, Natural History Unit
Connectivity Engineer
2020-22 Coronation of King Charles
- BBC Studios, Events
Connectivity Engineer
2023 FIFA World Cup, Qatar
- BBC Sport
Connectivity Engineer
2022 Newsnight (various episodes)
- BBC News
Guarantee Engineer
2022-2023


Locals Poster
A poster made reflecting my feelings about home. The good, the bad, and the art from where I'm from.
printed poster with vinyl graphics


Comments
-
Greg Hurrell
The two notifications (both Growl notifications) are coming from two sources:
1. The top one in the screenshot is coming from Synergy Advance. It has no art because there is not art embedded in the track.
2. The bottom one in the screenshot is coming from Synergy. It has art because Synergy has downloaded it for you and stored it in your Library folder.
The solution is to go to your Growl preferences (in the System Preferences application) and turn off notifications for either Synergy or Synergy Advance. Synergy Advance provides more customizability over the formatting of notifications, but it (doesn't yet) know how to find the art already downloaded by Synergy. In the future I will be adding the ability to Synergy Advance to read/find the album art already downloaded by Synergy.
I am going to reword to the summary to reflect what needs to be done.
-
craig ashby
that fixed the double display. thanks. it does show proper art sometimes. is that because the art was already downloaded by syngergy?
-
Greg Hurrell
As I said above:
2. The bottom one in the screenshot is coming from Synergy. It has art because Synergy has downloaded it for you and stored it in your Library folder.
-
Greg Hurrell
See also:
-
Greg Hurrell
Changing assignment to reflect my new email address.
http://wincent.com/a/news/archives/2006/05/change_of_email.php
Add a comment
Comments are now closed for this issue.


--- layout: page title: About header-img: "img/about-bg.png" ---
I am a life-long learner who loves coding, numbers, and coffee. These things tie pretty well with Data Science, a field I have yearned to enter before I even realized it.


Unfortunately, your registration with Facebook was not successful.
For your registration with Facebook an email address is necessary. Please retry and give us release for your email address. If you do not have an email address attached to your Facebook profile yet, please add one to your account and try again.
Login...
To be able to use eharmony, please allow your internet browser to accept cookies.
You are using an outdated browser.
In order to be able to make full use of eharmony and for security reasons, eharmony recommends that you download an updated version.


Below you will find all of my favorite recipes I have made over the years!
French Onion and Apple Grilled Cheese
View the recipe here:
https://www.halfbakedharvest.com/french-onion-and-apple-grilled-cheese/Summer Vegetable Gazpacho Salad
View the recipe here:
https://www.foodandwine.com/recipes/summer-vegetable-gazpacho-saladWhole Roasted Cauliflower
View the recipe here:
https://www.foodandwine.com/recipes/miznons-whole-roasted-cauliflowerTeddy Bear Snickerdoodle Cookies
View the recipe here:
https://www.halfbakedharvest.com/teddy-bear-snickerdoodles/Everything Crusted Salmon
View the recipe here:
https://sweetcsdesigns.com/easy-baked-everything-salmon-recipe/Sesame Ginger Dumplings in Chili Oil
View the recipe here:
https://www.halfbakedharvest.com/sesame-ginger-dumplings/Pull-Apart Garlic Butter Bread Wreath
View the recipe here:
https://www.halfbakedharvest.com/pull-apart-garlic-butter-bread-wreath/Churros
View the recipe here:
https://www.delish.com/cooking/recipe-ideas/a27117110/easy-churros-recipe/Spicy Tuna Crispy Rice Cakes
View the recipe here:
https://whitneybond.com/spicy-tuna-crispy-rice-cakes/Roasted Artichokes with Garlic Butter
View the recipe here:
https://www.fromachefskitchen.com/oven-roasted-artichokes-with-roasted-garlic-butter/Crispy Persian Rice (Tahdig) with Spiced Golden Chickpeas
View the recipe here:
https://www.halfbakedharvest.com/crispy-persian-rice/Herbed Garlic Butter Naan
View the recipe here:
https://www.halfbakedharvest.com/herbed-garlic-butter-naan/Sweet-and-Spicy Mixed Nuts
View the recipe here:
https://www.bonappetit.com/recipe/sweet-and-spicy-mixed-nutsChocolate-Cinnamon "Babkallah"
View the recipe here:
https://www.bonappetit.com/recipe/chocolate-cinnamon-babkallah-doughChipotle Quinoa Sweet Potato Tacos with Roasted Cranberry Pomegranate Salsa
View the recipe here:
https://www.halfbakedharvest.com/chipotle-quinoa-sweet-potato-tacos-roasted-cranberry-pomegranate-salsa/Herb-Whipped Goat Cheese with Harissa and Toast
View the recipe here:
https://www.pinterest.com/pin/38280665570250440/Cedar Plank Salmon with Watermelon Feta Salsa
View the recipe here:
https://www.halfbakedharvest.com/cedar-plank-salmon-watermelon-feta-salsa/Herby French Shallot Soup
View the recipe here:
https://www.halfbakedharvest.com/herby-french-shallot-soup/Sweet Potato Lentil Curry with Crispy Sesame Chickpeas
View the recipe here:
https://www.halfbakedharvest.com/sweet-potato-lentil-curry/Sashimi with Ponzu Sauce
View the recipe here:
https://www.urbancookery.com/tuna-sashimi-ponzu-sauce/Turmeric and Coconut-Braised Cabbage With Chickpeas
View the recipe here:
https://www.bonappetit.com/recipe/turmeric-and-coconut-braised-cabbage-with-chickpeasPastry Wrapped Baked Brie with Thyme Butter Roasted Plums
View the recipe here:
https://www.halfbakedharvest.com/pastry-wrapped-baked-brie-with-thyme-butter-roasted-plums/Crispy Rice Bowl with Browned Butter Sweet Potatoes and Herby Green Tahini
View the recipe here:
https://www.halfbakedharvest.com/crispy-rice-bowl/Shakshuka With Mushrooms
View the recipe here:
https://meal.com/recipes/julie-van-den-kerchove/shakshuka-with-mushrooms2021 New Years Charcuterie Board
View the recipe here:
https://inspirationformoms.porch.com/new-years-eve-charcuterie-board/Shakshuka With Feta
View the recipe here:
https://cooking.nytimes.com/recipes/1014721-shakshuka-with-fetaPoached Egg and Avocado Toast
View the recipe here:
https://pinchofyum.com/simple-poached-egg-avocado-toastSpiced Chickpea And Veggie Rice Bowl With Avocado Dressing
View the recipe here:
https://thefeedfeed.com/lunchesandlittles/spiced-chickpea-and-veggie-rice-bowl-with-avocado-dressingTomato, Peach, and Burrata Salad
View the recipe here:
https://www.halfbakedharvest.com/tomato-peach-and-burrata-salad/Harvest Apple Challah
View the recipe here:
https://www.kingarthurbaking.com/recipes/harvest-apple-challah-recipeRoasted Tomato Caprese Pasta
View the recipe here:
https://ciaochowbambina.com/roasted-tomato-caprese-pasta/Homemade Tomato Sauce
View the recipe here:
https://fountainavenuekitchen.com/shortcut-blender-tomato-sauce/Bread Machine Bagels
View the recipe here:
https://www.allrecipes.com/recipe/7178/bread-machine-bagels/Honey Fig Roasted Salmon
View the recipe here:
https://www.busyinbrooklyn.com/honey-fig-roasted-salmon/Korean Grilled Steak with Toasted Sesame Chimichurri
View the recipe here:
https://www.halfbakedharvest.com/korean-grilled-steak/


FlexTest
Menu
Home
About
Log Out
Log out
Social Media
Github
Create a new Wallet
Your Wallet
×
Enter Your email and password
Submit


Get started
CDN
Paste the following code into the
section of your site's HTML.
<link href="http://bglbruno.github.io/flat-buttons.com/flat-buttons.min.css" rel="stylesheet">
Default CSS
Copy the file into your project. In the
of your html,
reference the location to your flat-buttons.min.css.
<link href="path/to/flat-buttons.min.css" rel="stylesheet">
Variants
Use any of the available button classes to quickly create a styled button. Use the button classes on an
,
<button>
, or
<input>
element.
Default
.btn-default
Inverse
.btn-inverse
Primary
.btn-primary
Success
.btn-success
Info
.btn-info
Warning
.btn-warning
Danger
.btn-danger
Link
.btn-link
Outline variants
Use the class.btn-outline
for outline buttons variants.
Only for <button>
and <input>
.
Inverse
.btn-inverse
and .btn-outline
Primary
.btn-primary
and .btn-outline
Success
.btn-success
and .btn-outline
Info
.btn-info
and .btn-outline
Warning
.btn-warning
and .btn-outline
Danger
.btn-danger
and .btn-outline
Sizes
Add.btn-lg
,
.btn-sm
, or
.btn-xs
for additional sizes.
Block level button
Create block level buttons—those that span the full width of a parent— by adding.btn-block
.
Disabled state
Setting a state disabled for buttons, using the attributedisabled="disabled"
for
<button>
, and the class
.disabled
for
element.
Groups
Group a series of buttons together on a single line with the button group.Using a wrap element

...

.


|
Dancing Hexapod
dancing hexapod
|
Class for communication with Hexapod using Bluetooth. More...
Public Member Functions | |
| CommunicationModule (BluetoothAdapter adapter) | |
| Class Constructor. | |
| boolean | connectToFirebird () |
| Finds the destination bluetooth device, creates a socket for communication, gets the output, input streams. | |
| boolean | sendString (String string) |
| Send a string to Hexapod. | |
| boolean | sendChar (char character) |
| Send a character to Hexapod. | |
| boolean | disconnect () |
| Disconnect from the hexapod. | |
| void | status (String message) |
Public Attributes | |
| BluetoothAdapter | mBluetoothAdapter = null |
| boolean | connected = false |
| Status of connection. | |
Protected Member Functions | |
| boolean | checkConnection () |
| Checks if connection is successful. | |
Package Attributes | |
| final String | TAG = "BluetoothDebug" |
| Tag for Logcat Debug Messages. | |
| final String | MAC_ADDRESS = "00:19:A4:02:C6:7E" |
| Mac Address of Hexapod's bluetooth device. | |
| BluetoothSocket | mmSocket = null |
Private Attributes | |
| OutputStream | mmOutputStream |
| Output stream for sending data to hexapod. | |
| InputStream | mmInputStream |
Class for communication with Hexapod using Bluetooth.
Provides functions for connecting, disconnecting, sending data
Definition at line 23 of file CommunicationModule.java.
| com.iitb.justdance.CommunicationModule.CommunicationModule | ( | BluetoothAdapter | adapter | ) |
Class Constructor.
| adapter | Adapter of the android device |
Definition at line 47 of file CommunicationModule.java.
| boolean com.iitb.justdance.CommunicationModule.checkConnection | ( | ) | [protected] |
Checks if connection is successful.
This function needs to be developed further to send test data to actually verify the connection
Definition at line 115 of file CommunicationModule.java.
Finds the destination bluetooth device, creates a socket for communication, gets the output, input streams.
Checks if the destination device is in the list of paired Devices
If device is not found, search for the device
Create Socket for communication and obtain input, output streams
Standard SerialPortService ID
Definition at line 57 of file CommunicationModule.java.
Disconnect from the hexapod.
Definition at line 167 of file CommunicationModule.java.
| boolean com.iitb.justdance.CommunicationModule.sendChar | ( | char | character | ) |
Send a character to Hexapod.
| character | character to be sent |
Definition at line 149 of file CommunicationModule.java.
| boolean com.iitb.justdance.CommunicationModule.sendString | ( | String | string | ) |
Send a string to Hexapod.
| string | message to be sent |
Definition at line 128 of file CommunicationModule.java.
| void com.iitb.justdance.CommunicationModule.status | ( | String | message | ) |
Definition at line 181 of file CommunicationModule.java.
| boolean com.iitb.justdance.CommunicationModule.connected = false |
Status of connection.
Definition at line 39 of file CommunicationModule.java.
final String com.iitb.justdance.CommunicationModule.MAC_ADDRESS = "00:19:A4:02:C6:7E" [package] |
Mac Address of Hexapod's bluetooth device.
Definition at line 31 of file CommunicationModule.java.
| BluetoothAdapter com.iitb.justdance.CommunicationModule.mBluetoothAdapter = null |
Definition at line 28 of file CommunicationModule.java.
InputStream com.iitb.justdance.CommunicationModule.mmInputStream [private] |
Definition at line 36 of file CommunicationModule.java.
OutputStream com.iitb.justdance.CommunicationModule.mmOutputStream [private] |
Output stream for sending data to hexapod.
Definition at line 35 of file CommunicationModule.java.
BluetoothSocket com.iitb.justdance.CommunicationModule.mmSocket = null [package] |
Definition at line 32 of file CommunicationModule.java.
final String com.iitb.justdance.CommunicationModule.TAG = "BluetoothDebug" [package] |
Tag for Logcat Debug Messages.
Definition at line 26 of file CommunicationModule.java.