Steve Aiken confirmed as new UUP leader
by By Press AssociationFormer submariner Steve Aiken has been confirmed as the new Ulster Unionist Party leader.
He said it was a momentous time for unionism and criticised his Democratic Unionist rivals for “agreeing” a regulatory border between Northern Ireland and the rest of the UK.
The UUP is aiming to win back representation at Westminster in the UK general election next month.
Mr Aiken said: “It would be a momentous time to assume the leadership of any political party but now, for unionism, for those that are pro-union, and those that just believe in Northern Ireland, it has never been more important for the Ulster Unionist Party (UUP) to be ready to go out and fight for what is right for our nation.”
READ MORE
‘Stand Down Nigel,’ Daily Mail says as other UK papers send mixed election messages


- Inflammation is the body’s main line of defense and helps repair damaged tissue
- Inflammation is the body’s response to
- stress
- injury
- illness
- infection
- For example, if you get bitten by a snake, you need inflammation to
- stop bleeding
- fight infection
- escape to preserve your life
- In today’s world however, Inflammation is one of the deadliest causes of disease. Why?
- Inflammation was developed as an evolutionary defense against physical and environmental threats
- It helped us become resistant to insulin, to help us store fat and fight famine
- Inflammation also existed when we primarily lived on whole foods, like grains and nuts, and protein
- In today’s world, we no longer have many physical threats, our food is no longer whole foods and protein, and technology makes us sedentary, where synthetic toxins pollute our body, and our natural rhythms no longer tell us when to sleep or wake.
- Today, too much inflammation causes:
- Rheumatoid arthritis
- Systemic lupus erythematosis (SLE)
- Asthma
- Allergic diseases
- Earlier and more severe strokes, heart attacks, cancer, diabetes, Alzheimers - Inflammation Kills
- Many people suffer from Silent Inflammation
- It is below the threshold of pain
- Like a smoldering fire
- The first sign the body is out of balance
- Damages arteries
- Destabilizes cholesterol deposits
- Destroys nerve cells in brain
- Depresses immune system
- Promotes formation of cancers
- Can activate harmful genes
- Silent Inflammation is caused by
- Hormonal Imbalance - the overproduction of
- Insulin
- Cortisol
- Pro-Inflammatory Prostaglandins
- Glycation (like caramelization of your cells)
- What causes the fire of inflammation to start?
- Genetics - some people have genes which make more inflammation than others
- Obesity
- being overweight decreases growth hormone levels
- fat cells produce over 100 hormones and chemicals which increase inflammation
- Pollution
- Pesticides/herbicides
- Smoking
- Radiation
- EMR
- Physical - exercise, exertion
- Sleep deprivation
- Emotional Stress - negative emotions cause increases in inflammatory chemicals in the body
- when we are unfit, there is a surge in inflammatory chemicals in our body
- inflammatory chemicals cause us to lose muscle and strength associated with aging
- low estrogen, testosterone, growth hormone and thyroid hormones cause an inflammatory state
- high cortisol (stress hormone) and insulin levels cause inflammation
- Too many bad fats
- High glycemic foods
- Over-eating
- Our standard american diet produces 20x more inflammation than what we need!
- We eat too many omega-6 fats, found in fried food, high glycemic foods
- We don’t eat enough omega-3 fats, which protect us against heart disease, stroke, asthma and cancer
- When we eat too many sugary and fried foods, we produce “glycotoxins”
- causes insulin imbalance
- causes accelerated aging
- the process of glycation is irreversible
- Sleep Disturbance causes a 30-60% increase in inflammation
- causes many disorders, and pain to flare up
- gum infections
- stomach ulcers
- Rheumatoid Arthritis
- Lupus
- Asthma
- How to test for inflammation
- get the VM inflammation screen ($499)
- Can predict heart disease and risk for alzheimers, diabetes, macular degeneration (blindness) and stroke
- hs-CRP < 1.0 mg/L < 0.55
- Cytokines (if elevated CRP)
- IL-1B 0-150 pg/mL < 150
- IL-6 2-29 pg/mL < 30
- IL-8 10-80 pg/mL 10-80
- TNF-alpha 0-25 pg/mL < 25
- Homocysteine 5-12 micromol/L < 7.0
- Fibrinogen 200-400 mg/dL 200-300
- Fasting Insulin 0-22 mcIU/mL < 5
- Lipoprotein (a) 0-30 mg/dL < 20
- How to reduce inflammation (ACTION PLAN)
- decrease your calories by 10-25%
- Processed vegetable oils: e.g., corn, safflower, sunflower
- Red meat
- Dairy products
- Egg yolks
- Wheat products
- < 5% of daily calories
- Hydrogenated oil – margarine, chips, packaged baked goods
- Saturated fats – Meats, butter, dairy, coconut/palm oil
- Refined oils – Sunflower, corn, safflower, soybean
- Trim fat off meat
- High glycemic carbohydrates
- Foods cooked at high temperatures
- Nutrient dense/calorie poor foods
- Complex carbohydrates 40-50%
- Colorful fruits & vegetables 8-10/day
- Fiber 30-50 gm/day
- Sugars < 15%
- Desirable lean proteins 25-30%
- Fish, egg whites, soy, legumes
- Healthy fats 25-30%
- Mechanically pressed oils
- Omega-3: fish, walnuts, pumpkin seeds
- Omega-9: olives, olive oil, seeds, avocados
- Meal Frequency 5-6 meals/day
- Protein & carbohydrates together
- Cardiorespiratory Training
- 70-85% Max HR
- 30-60 minutes
- 3-6 times per week
- All major muscle groups
- 75-85% of 1RM
- 2-3 Sets to failure
- 3 days per week
- Strenuous, Prolonged Exercise
- Increases inflammation
- Highly conditioned individual has less inflammatory response
- Anti-Inflammatory Supplements (BUY NOW)
- Fish oil (EPA, DHA) 2500-10000 mg/d
- Vitamin D3 2000-10000 IU/d
- Curcumin 500-4000 mg/d
- Quercitin 500-1600 mg/d
- Ginger 1000-2000 mg/d
- Bromelain 500-2000 mg/d
- Pantothenic acid 500-2000 mg/d
- Vitamin C 500-3000 mg/d
- Vitamin E 400-800 IU/d
- Vitamin K 1-10 mg/d
- N-acetyl-cysteine 600-1800 mg/d
- Bilberry 100-400 mg/d
- Grape seed extract 100-300 mg/d
- Green tea extract 400-800 mg/d
- Balance & Optimize Hormones
- Estrogen
- Testosterone
- Thyroid
- DHEA
- Growth Hormone
- Bioidentical, natural hormones
- Restore to 25-30 year old levels
- Predatory fish
- Fried and processed baked goods
- Air/water pollution
- Pesticides, herbicides
- Radon, EMR
- Xenohormones
- Smoking
- Excess caffeine, alcohol
- Laugh Often
- Have great relationships
- Control your breathing
- Mindfulness
- Dance, sing, play music, play with a pet
- Mix with happy people
- Laugh at the world and yourself
- Let go of things you can live without
- Help Others
- Be thankful
- Forgive and ask forgiveness
- Express love
- Participate in something bigger than yourself
- Don’t be too hard on yourself
- Pain is inevitable, misery is optional
- Acknowledge your Spiritual dimension
- Anything that gives one an experience of the “bigger self” or what is beyond the limited personality
- Spirituality provides a schema for confronting life's difficulties
- It is the experience of connectedness
- Connect with Nature
- Meditate


Home
About
Blog
Resource Hub
Code Documentation
GitHub Code
Trello Board
Resource Hub
A hub for various 3197 Programming Resources.
UNDER CONSTRUCTION


Microsoft has released a specification for C# 3.0. We thought it would be funny to compare what they are planning with what we have already in Nemerle.
This was in Nemerle since the very beginning. We however do not limit
ourselves to the case when the type of initializer expression is known
in detail (or to be precise, if known at all).
An issue reported in the tracker.
Again, this was in Nemerle since the very beginning. The restrictions
on parameter inference don't apply.
We have the Record macro, though this seems somewhat nicer. Will have
to investigate.
Our tuples are more like tuples in math -- the fields don't have names,
only numbers. It is an open issue which design is better.
No kidding.
This seems like a set of macros. Will have to investigate.
This seems like this is needed only for query expressions.
Macros (and specifically quotations) are much more general
and powerful mechanism.
|


Pirate (ARRR) is a real privacy coin that takes financial privacy very serious Pirate (ARRR) is a 100% private send cryptocurrency. Pirate uses a privacy protocol that cannot be compromised by other users activity on the network. Most privacy coins are riddled with holes crea...


Developed by: Filip Ryba Supervised by: dr hab. inż. Lesław Bieniasz Department of Physics, Mathematics and Computer Science Cracow University of Technology 2016


On a Unix system, in which the MPI library is implemented in C, then there are various possible options, of which two of the most obvious are presented here. Which is better depends on whether the linker and compiler support weak symbols.
If the compiler and linker support weak external symbols (e.g. Solaris 2.x, other system V.4 machines), then only a single library is required through the use of #pragma weak thus
#pragma weak MPI_Example = PMPI_ExampleThe effect of this #pragma is to define the external symbol MPI_Example as a weak definition. This means that the linker will not complain if there is another definition of the symbol (for instance in the profiling library), however if no other definition exists, then the linker will use the weak definition.int PMPI_Example(/* appropriate args */) { /* Useful content */ }
In the absence of weak symbols then one possible solution would be to use the C macro pre-processor thus
#ifdef PROFILELIB # ifdef __STDC__ # define FUNCTION(name) P##name # else # define FUNCTION(name) P/**/name # endif #else # define FUNCTION(name) name #endifEach of the user visible functions in the library would then be declared thus
int FUNCTION(MPI_Example)(/* appropriate args */) { /* Useful content */ }The same source file can then be compiled to produce both versions of the library, depending on the state of the PROFILELIB macro symbol.
It is required that the standard MPI library be built in such a way that the inclusion of MPI functions can be achieved one at a time. This is a somewhat unpleasant requirement, since it may mean that each external function has to be compiled from a separate file. However this is necessary so that the author of the profiling library need only define those MPI functions which she wishes to intercept, references to any others being fulfilled by the normal MPI library. Therefore the link step can look something like this
% cc ... -lmyprof -lpmpi -lmpiHere libmyprof.a contains the profiler functions which intercept some of the MPI functions. libpmpi.a contains the ``name shifted'' MPI functions, and libmpi.a contains the normal definitions of the MPI functions.


Setting Up a Web Enabled Lending Library
I started cataloging books for a small community center’s lending library at librarything.com. Librarything.com is a great web site that I highly recommend. If most of your books have ISBNs and you can borrow someone’s barcode scanner, cataloging books at Librarything is a snap: on the “add books page” you scan a books ISBN and all of its information (Title, Author, book cover) will be added by Librarything for you. Of course if you don’t have a bar code scanner or there is no ISBN, you simply type in part of the title or author and select the book from a list of possible matches, this is a bit slower, but perfectly adequate if you are inputting a smaller library.
Once all of the books are added, the social networking goodness begins! You’re library has its own mini-site at Librarything, with a publicly available catalog: Build Up Books catalog and profile: Build Up Books profile. So for a community center, you can send out the URL, and anyone can search the catalog for books they find of interest.
The one problem with this system, is there isn’t a robust system for checking out books. Some libraries have adapted an informal system of tagging books as “checked out” and in the private comments (only visible to the administrator) added the borrowers contact information. This is somewhat acceptable, but first: you would have to give any volunteers access to all of your Librarything account’s permissions (you get all or nothing as far admin rights goes on Librarything). Second there is no way to tell when the book was checked out, when it is due back, and also no way to sort by which books are currently overdue. So I thought I would look into importing the library, once cataloged, into a drupal web site.
Exporting Library from Librarything
Librarything has excellent importing and exporting facilities. To export, sign in to your account and then go to http://librarything.com/more/import. On that page there are links for downloading your catalog as either a comma separated csv file or a tab delimited text file.
Downloading User Uploaded Book Covers
Librarything has over 1,000,000 user uploaded book covers, and it makes them available for free. You need to a developer’s key to access them and there are some restrictions: you can only download 1000 per day and one per second. So with these understandable restrictions, I decided it would be best to download the book covers and store them locally. So yesterday I wrote a python script to download all of the book covers for our library.
The Python Script
I will add a link at the bottom to the script on my Github Repository. So the script I wrote searches through a librarything csv file, finds all of the ISBNs and downloads the book covers from Librarything.
import re, urllib, csv,time
CSV_FILE ='~/Downloads/LibraryThing_export.csv'
IMG_DIR ='~/img/'
DEV_KEY = 'YOUR_LIBRARYTHING_DEV_KEY'
IMG_URL = "http://covers.librarything.com/devkey/" + DEV_KEY + "/large/isbn/"
I use 4 python libraries.
- Re: for regular expressions to search for isbns.
- urllib: for downloading the Book Cover from Librarything
- csv: for creating a map data structure from a parsed csv file.
- time: for limiting the downloads to one per second.
Also I add a couple of variables. The important one to change is DEV_KEY which contains your librarything developers key. Also make sure the CSV_FILE points at your downloaded CSV_FILE and the IMG_DIR exists. Finally IMG_URL points to the web service on librarything where you can download user submitted book covers, all you need to do is slap an ISBN on the end of that URL and the URL will return either a book cover, or a clear 1x1 gif if they do not have that cover.
# read in the Librarything Export File
lt_dict = csv.DictReader(open(CSV_FILE))
#loop through the rows of the dictionary
for row in lt_dict:
# grab the ISBN dictionary field
mystr = row["'ISBN'"]
# search for a matching ISBN
mymatch = re.match(r"\[(\d+)\]",mystr)
# if no match, print the title to STDOUT
if mymatch is None:
print "blank isbn for: %s" % row["'TITLE'"]
else:
# grab the matching string, this is our ISBN!
isbn = mymatch.group(1)
# build the web service request URL
myurl = IMG_URL + isbn
# where we will store the downloaded Book cover image
myfile = "%slarge_%s" % (IMG_DIR,isbn)
# urlretrieve downloads the image and stores it locally
urllib.urlretrieve(myurl,myfile)
print "myurl: %s, myfile: %s" % (myurl,myfile)
# sleep for 2 seconds
time.sleep(2)
The hard work is done by csv.DictReader and urllib.urlretrieve. DictReader takes a csv file, parses the first line of the file for field names and creates a dictionary data type, so you can loop through the rows and have access to the fields by name. Urlretrieve, takes a URL and an optional file name and it grabs the file at the URL and stores it locally as the filename you provided.
In a later blog post I will describe the Drupal end of this project: creating a book CCK content type, importing data into Drupal custom content types, and setting up the check out process.


/*
Some common queries run on an entire collection or on a collection of
indeterminate size. RethinkDB doesn't actually keep track of the
ordering of these queries when sending changes. The initial changes
will be ordered, but subsequent changes come in arbitrary order and
don't respect the ordering of the query. So, for convenience, we add
a very high limit so that the server will keep track of the order for
us.
Note: queries like collection.order(field).watch are not reasonable
in production systems. You should add an explicit limit.
*/
export default function watchRewrites(self, query) {
// The only query type at the moment that doesn't get these rewrites
// is find, since it returns a single document
Iif (query.find === undefined &&
query.order !== undefined &&
query.limit === undefined) {
const limit = self.constructor.IMPLICIT_LIMIT || 100000
// Need to copy the object, since it could be reused
return Object.assign({ limit }, query)
} else {
return query
}
}
|


{{ message }}
{{_("Please click on the following link to set your new password")}}:
{{ update_password_link }}
{{_("The RFQ/Tender can be accessed by clicking on the following link")}}:
Submit your RFQ/Tender
{{_("Thank you")}},


Defy your limits and pursue your fitness goals with a complimentary all-access gym pass! Try our wide-variety of classes, train with world-class coaches, and access the equipment you need. Available at participating locations. Offers vary by location. Terms and conditions may apply.


serve-file
Like serve-static but for individual files. Refactored and decoupled from express res.sendFile
. Can be used standalone with router to support HTTP/2 protocol.
npm i -S serve-file
Usage
import Router from 'router'
import serveFile from 'serve-file'
const app = Router()
app.use('/my-file.txt', serveFile('path/to/my-file.txt'))


[gecode-users] initial domain of Golomb ruler problem
夏维
skymaormaor at hotmail.com
Mon Aug 29 11:41:22 CEST 2011
Dear all,
The initial domain of the Golomn ruler problem is set to be [(1 << (opt.size()+1))-1], while I think it should be [(1 << (opt.size()-1))-1].
Can someone help make sure?
Thanks!
Weii.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20110829/5debe7d2/attachment.htm>
More information about the users
mailing list


class Solution: def slowestKey(self, releaseTimes: List[int], keysPressed: str) -> str: md = 0 ans = 'a' for i in range(len(keysPressed)): d = releaseTimes[i] - (0 if i == 0 else releaseTimes[i-1]) if d > md or (d == md and keysPressed[i] > ans): ans = keysPressed[i] md = d return ans


Notebook
Centralized Version Control Notes
COMPUTING-BLOG
VCS Scientific-computing SVN
Table of Contents
What is?
It is a software to:
- Provide incremental versions (or revisions) of a set of files/directories.
- Explore the changes which resulted in each of those versions.
- Return to any of the previous versions/revisions.
Therefore it is a kind of backup system but also is a kind of file server.
How it works?
It is build over the concept of repository that is a kind of register of all the changes of a set of files. Usually the information is stored as a hierarchy of files (like a tree file-system). Now this repository allows connections of several clients. They can read and write so the version control system should be able to track who, and when, make changes on the files, and give to other users the possibility to read those changes.
Who needs that?
All people who is working with computers and making progressive changes over files in a project. However the main advantage of the version control system is when several clients are working on improve/change the same project.
When several users are working with the same set of files at the same time, the version control software should be able to allow changes but without deleting or incorrectly mixing the changes of the users. For this there are several solutions that depend on how is designed the version control. In those cases where we have a central repository we can allow only one person to change at one time the same file, the other possibility is that all users create a personal copy of the central repository and commit changes. This last process is build over the concept of merge code. This is something that many users are doing (in a not so clean way) when they make several copies of a code to test several changes but they want to preserve the original copy. Version control gives them a more clean a beautiful method to perform all this tasks even if the are just one single user of a given project.
How it works?
The method might depends on the specific version control software. In the case of SVN (subversion) there is a central repository and several working copies. Every time that a user commits changes on the code (using a SVN client) the SVN server creates a new state of the file-system tree (that is, the repository) named revision. Each revision has assigned one unique number (natural number). Note that in SVN each identify number refers to a full state of the file-system (not to a specific commit of a specific file). It is like a instantaneous-photo of the full set of files. In this situation every working copy is private and only the process of commit the changes make them public (open to other users). This is the so named Central Version Control System (CVCS). Other version control systems are based on distributed or decentralized systems, examples are git and mercurial.
Terminology
- Repository It was already explained. In the case of for example Mercurial it is a directory in which a kind of set files are stored: the repository has the files of the project together with the history of changes of the files.
- Trunk The trunk is the directory where all the main development is stored. The idea is that this directory may be evaluated by the developers. Usually it is the last main version under development.
- Tags The tags directory is used to store named snapshots or revisions. Because the unique numbers assigned to each revision are not descriptive of the key points of the snapshot the Tag operation allows to provide descriptive name to specific version in the repository
- Branches Branch operation is used to create another line of development. This is a very important concept when you want your development process to fork off into two different directions.
- Working copy Working copy is a snapshot of the repository. The repository is shared by all the users, but people do not modify it directly. Instead each developer checks out the working copy. The working copy is a private and isolated from the rest of the project users.
- Commit Commit is the process of confirming and storing changes from working copy to central server (repository). After commit, changes are public and other users can retrieve these changes by updating their working copy. Commit is an atomic operation.  Users never see half finished commit.
SVN: subversion
It is one of the most used version control systems. Currently it is a project of the Apache Software Foundation htts://subversion.apache.org/
In those cases where a distribuited version control is not needed then SVN is a robust version control software in particular the last versions.
An example with svn
It is very easy to use svn (subversion) from the terminal. If you have correctly installed svn in a Linux/Unix machine you can follow this example:
First, lets imagine that you wanted to download the last version of a nice open-source code. In my case, I wanted to download and compile from the source a chess-program called scidvspc. I checked that it is a sourceforge project and then it is very easy to obtain a working copy from the official repository.
> mkdir /home/mrmagguu/test_svn
> cd /home/mrmagguu/test_svn
> svn checkout svn://svn.code.sf.net/p/scidvspc/code/ scidvspc-code
Now in your directory test_svn you have a new sub-directory named: scidvspc-code that replicates the online repository stored at sourceforge.net server. Let’s try something:
> svn status
svn: warning: W155007: '/home/mrmagguu/test_svn' is not a working copy
> pwd
/home/mrmagguu/test_svn
> cd scidvspc-code
> svn status
Probably nothing is now returned, this is because simply there is nothing new to report, but as we have seen if we use the command svn in a directory that is not the working copy of a repository svn will complain. Now let’s change a file. For instance in README.txt I have changed some lowercase letters to uppercase.
> vim README.txt
> svn status
M README.txt
And, yes!, it detected that we have changed README.txt. But this change is only effective in our private working copy. Nowbody knows that some lowercase letters were changed to uppercase letters. Let’s try:
> svn diff
Index: README.txt
===================================================================
--- README.txt (revision 2372)
+++ README.txt (working copy)
@@ -6,19 +6,19 @@
Table of Contents
- 1. introduction
- 2. features
+ 1. Introduction
+ 2. Features
2..1 New and Improved features
2..2 Missing Features
- 3. download
- 4. installation
+ 3. Download
+ 4. Installation
4..1 Linux , FreeBSD
4..2 Windows
4..3 Mac OS X
- 5. news
- 6. miscellaneous
+ 5. News
+ 6. Miscellaneous
6.1 docked windows
6.2 how to play
6.3 todo
@@ -27,7 +27,7 @@
6.6 thanks
6.7 scid's history
- 7. changes
+ 7. Changes
7..1 Scid vs. PC 4.14
7..2 Scid vs. PC 4.13
7..3 Scid vs. PC 4.12
@@ -48,8 +48,8 @@
7..18 Scid vs. PC 4.0
7..19 Scid vs. PC <IP_ADDRESS>
- 8. contact
- 9. links
+ 8. Contact
+ 9. Links
Now we begin to see the advantages of version control, we can see exactly the changes with just one command. Let’s say now that we have created also new file. For instance I have created a file called: THANKS.txt with the text ‘Thank you for create this nice software.’
> vim THANKS.txt
> svn status
M README.txt
? THANKS.txt
SVN indicate us that there is a new file in the working copy but its status is unclear. SVN knows that this file is not in the main central repository but don’t know if we want to add it or not.
> svn add THANKS.txt
A THANKS.txt
> svn status
M README.txt
A THANKS.txt
So we have Added a file to the project and we have Modificated another file. If we would think that these changes are convinient we could commit the changes with svn commit -m 'Added a file to say thank you'
. Then we will see something like…
> svn commit -m 'Added a file to say thank you and few lowercase letters...'
Sending README.txt
Adding THANKS.txt
Transmitting file data ..
Committed revision XYZ
The -m command indicates the message that we want to include as information of the new revision, while XYZ is the revision number (that, remember is a unique number describing a full status of the project). Usually our commits will be validated (or not) by a developer holding the project if they are useful (or useless). On the other side, as users, we can try to update our working code to the last revision, but first we can check the status of our version. In this case I will suppose that we have commit our changes to the server and now other user would like to have this revision:
> svn status -u
+ XYZ README.txt
+ THANKS.txt
+ (XYZ-1) .
The + means changed in the repository while XYZ and (XYZ-1) are the revision numbers of the last change and the previous one. If the new user think that these changes should be incorporated to her/his working copy then…
> svn update
U README.txt
A THANKS.txt
… and her her working copy is update with our changes.
Typical working cycle with SVN
- Update your working copy ->
svn update
- Changes in the code ->
svn add
,svn delete
etc… - Check the status/details of our changes ->
svn status
,svn diff
- (This step was not commented before). Restore to an unmodified state ->
svn revert
. - Imagine that we have changes to uppercase some letters but other user replace some letters with numbers in the same. Usually the users realize of possible conflicts when the use svn update, then svn gives them a note indicating that two or more users have changed parts of the same files. To resolve the problem we have the tool ->
svn resolve
- Submitt changes ->
svn commit
COMPUTING-BLOG
VCS Scientific-computing SVN


| File Name | |
|---|---|
| {{file.name}} | |
| No course files |
| {{question.question}}
|
{{ question.yeahs.includes(this.authTokenService.currentUserData.id.toString()) ? "Unyeah! " + question.yeah_count : "Yeah! " + question.yeah_count }} | Mark Answered |
| There are no questions for this course |


--- layout: page title: About ---
Not "blue" like the mood, but blue like the sky or blue like the bird or blue like the ocean.
You have found the home page of Robert Adams. I have been "on the Internet" for nearly 40 years from the days of 110 baud modems and accessing "TIP"s to connect to MIT to play Zork. I ran USENET news servers when a 300 baud modem was all the connection you needed and you could read everything that was posted on one day in less than an hour. I attended the Homebrew Computing Club meetings at Stanford where Steve and Woz were showing off their latest mother boards on folding tables in the lobby. I was never a bigwig and I can't claim to have been an internet mover or shaker, but I was there when the Internet and personal computers happened.
The Internet has grown a bit since those days.
And this is my little area of it. Friends, family and people interested in what I'm interested in will stop by and we can chat and exchange ideas.
My pages list some of the things I've done and seen and thought. It's a bit presumptuous to think that my thoughts would be interesting to anyone but me, but I figured there were two choices: I could write it down and put it in a drawer and it would only be good for me or I could write it down and put it on the web and someday, somehow someone else might get something from it. The latter case is more appealing.
So, for each area, I've recorded for myself notes on the books I've read and the movies I've seen and I've written notes and papers on topics of interest. For me, this serves as a reminder and a place to go back to when I ask "I read an article on X. Ahhhh, were was that?".


AS GOOD AS IT GETS
Review by Luke Buckmaster
Every now and then a truly memorable character enters the movie scheme. In 1995, audiences couldnt help but feel sympathy for the slow-witted Forrest Gump. Last year, Billy Bob Thortons character __ made us think twice about our place in society.
Melvin Udall has a love for simple pleasures. Cleaning his hands meticulously, only ever drinking bottled water and scoffing down a huge breakfast every morning are as important to Melvin as life itself. Racist, sexist, unreasonable and repulsive, he seems to suit the title of a demented grouch perfectly. Working as a romance novelist, Melvin keeps to himself for most of the time and, although his daily traditions are just they way he likes them, ultimately leads an unhappy life.
A dedicated romance novel fan asks Melvin How do you write women so well? I think of a man, he replies, and I take away reason and accountability.
If what you have read so far tends you make you believe that Melvin is somewhat of a tough cookie, youre absolutely correct. And when this type of guy gets a crush on a young, sweet and caring lady, interesting situations will no doubt occur. Our young lady is Christine Cookie (Helen Hunt), who is Melvins favorite waitress at the local restaurant. Well, favorite is an under statement he simply wont eat his morning feast unless Christine is there taking his order. So when she is unable to attend work due to a severe illness of her sons, Melvin does everything in his power to make sure she is at work the next morning and funds all of Christines doctor and hospital bills.
An unlikely relationship forms between the two, and Melvins gay neighbor Simon (Boof Gert) gets thrown in amongst the emotional chaos. Thus a three-way search for happiness begins, where each character craves their own set of desires. Our man Melvin does what mainstream cinema would expect: realizes the error of his ways and begins to change into a nicer human being. As he says to Christine during dinner, You make me want to be a better person.
If youre not impressed by the engaging character that is Melvin, As Good as it Gets wonderful acting and a plot that unravels with beauty and well-placed comedy; there is another factor that seems to have the greatest significance of all. It starts with J and it ends with S.
Although the media spotlight may focus on Jack Nicholson as the selling point for As Good as it Gets, director James L. Brooks also deserves to take much of the credit. His directing career has not gone unnoticed, but there is no doubt that this film is clearly his best work in the 90s.
4 = stars out of 5 Almost as good as it gets
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


--- title: Standard Themes highlights: You can use one of the Referral SaaSquatch standard themes for your referral program. Standard themes provide simple but stylish defaults for your referral program pieces. slug: themes/standard sectionType: themes template: article.html date: '2019-11-18' ---
Percent Discount Theme
|
Preview
|
Preview
|
Dollar Credit Theme
|
Preview
|
Preview
|
Free Month Theme
|
Preview
|
Preview
|


PWM
Pulse Width Modulation (PWM) is a very useful feature found on most microcontrollers. PWM is a method of generating a square wave signal of uniform frequency with variable duty cycle. PWM is often used to generate analog voltages, but has many other uses such as generating digital pulses for driving servo motors or driving infrared LEDs for communication. The ratio of the pulse width to it's period is called the duty cycle. Through software, you can control both the PWM frequency and duty cycle.
Tip
We usually use GetDefault() for most peripherals. For example, there is only one GPIO controller on most systems. This is not the case with PWM. Never use the Default controller and always select the proper channel on the corresponding controller.
Tip
PWM2.3 is channel 3 on controller 2
Energy Level
PWM is perfect for dimming an LED or controlling the speed of a motor. When the duty cycle is 50%, half the energy is transferred to the attached load.
This demo will fade the FEZ LED1 in and out
using System.Threading;
using GHIElectronics.TinyCLR.Devices.Pwm;
using GHIElectronics.TinyCLR.Pins;
class Program {
private static void Main() {
var controller = PwmController.FromName(FEZ.PwmChannel.Controller4.Id);
var led = controller.OpenChannel(FEZ.PwmChannel.Controller4.Led1);
controller.SetDesiredFrequency(10000);
double duty = 0.5, speed = 0.01;
led.Start();
while (true) {
if (duty <= 0 || duty >= 1.0) {
speed *= -1; //Invert direction.
duty += speed;
}
led.SetActiveDutyCyclePercentage(duty);
duty += speed;
Thread.Sleep(10); //Always give the system time to think!
}
}
}
Musical Tones
Musical notes have specific frequencies; C for example is about 261Hz. Plugging these numbers into an array and knowing the length of each tone is all that is needed to play some simple music. When playing notes by changing the frequency, keep the duty cycle set to 0.5.
using System.Threading;
using GHIElectronics.TinyCLR.Devices.Pwm;
using GHIElectronics.TinyCLR.Pins;
class Program {
const int NOTE_C = 261;
const int NOTE_D = 294;
const int NOTE_E = 330;
const int NOTE_F = 349;
const int NOTE_G = 392;
const int WHOLE_DURATION = 1000;
const int EIGHTH = WHOLE_DURATION / 8;
const int QUARTER = WHOLE_DURATION / 4;
const int QUARTERDOT = WHOLE_DURATION / 3;
const int HALF = WHOLE_DURATION / 2;
const int WHOLE = WHOLE_DURATION;
//Make sure the two below arrays match in length. Each duration element corresponds to
// one note element.
private static int[] note = { NOTE_E, NOTE_E, NOTE_F, NOTE_G, NOTE_G, NOTE_F, NOTE_E,
NOTE_D, NOTE_C, NOTE_C, NOTE_D, NOTE_E, NOTE_E, NOTE_D,
NOTE_D, NOTE_E, NOTE_E, NOTE_F, NOTE_G, NOTE_G, NOTE_F,
NOTE_E, NOTE_D, NOTE_C, NOTE_C, NOTE_D, NOTE_E, NOTE_D,
NOTE_C, NOTE_C};
private static int[] duration = { QUARTER, QUARTER, QUARTER, QUARTER, QUARTER, QUARTER, QUARTER,
QUARTER, QUARTER, QUARTER, QUARTER, QUARTER, QUARTERDOT, EIGHTH,
HALF, QUARTER, QUARTER, QUARTER, QUARTER, QUARTER, QUARTER,
QUARTER, QUARTER, QUARTER, QUARTER, QUARTER, QUARTER, QUARTERDOT,
EIGHTH, WHOLE};
private static void Main() {
var controller = PwmController.FromName(FEZ.PwmChannel.Controller1.Id);
var toneOut = controller.OpenChannel(FEZ.PwmChannel.Controller1.D0);
toneOut.SetActiveDutyCyclePercentage(0.5);
toneOut.Start();
while (true) {
for (int i = 0; i < note.Length; i++) {
controller.SetDesiredFrequency(note[i]);
Thread.Sleep(duration[i]);
}
Thread.Sleep(100);
}
}
}
Servo Motors
A servo motor is basically a motor that has a small internal circuit allowing you to control it using electrical pulses. Servo motors are available as either continuous or positional servos. While they look identical, a positional servo only turns to a given position and then holds that position until you tell it to move to another position. A continuous servo motor will rotate continuously in one direction until it is told to either stop or reverse direction.
The pulse that controls servos is sent every 20 ms. This pulse will usually have a width between 1 ms and 2 ms but varies depending on the make and model of the motor. The position of a positional servo is based on the width of the pulse, with a 1.5 ms pulse moving to the middle of travel (90 degree position). With a rotational servo, 1.5ms will stop the motor, 1 ms is full speed, and 2 ms is full speed in the opposite direction.
Tip
As a rule, servos have three wires. Be sure the central wire is connected to 5V. The lighter color wire on one side of the connector is a signal and should be connected to a PWM pin. The third one, which is usually a darker color, is ground.
This example will turn the positional servo to the zero degree position, wait half a second, and then turn it to 180 degrees. It will then rotate the continuous servo at maximum speed for half a second, and then reverse direction for half a second. You must add add the servo class (the code below this example) to your project for it to work.
Tip
Most servos will have a 1 ms minimum pulse width and a 2 ms maximum pulse width, but check the specs of the motor to be sure.
using GHIElectronics.TinyCLR.Pins;
using GHIElectronics.TinyCLR.Devices.Pwm;
using GHIElectronics.TinyCLR.Devices.Servo;
using System.Threading;
class Program {
private static void Main() {
ServoMotor servo1 = new ServoMotor(ServoMotor.ServoType.Positional,
PwmController.FromName(FEZ.PwmChannel.Controller1.Id),
FEZ.PwmChannel.Controller1.D0);
servo1.ConfigurePulseParameters(0.5, 2.4); //Settings for TowerPro SG90 micro servo.
ServoMotor servo2 = new ServoMotor(ServoMotor.ServoType.Continuous,
PwmController.FromName(FEZ.PwmChannel.Controller3.Id),
FEZ.PwmChannel.Controller3.D6);
servo1.Set(0);
Thread.Sleep(500);
servo1.Set(180);
Thread.Sleep(500);
servo1.Stop();
servo2.Set(100);
Thread.Sleep(500);
servo2.Set(-100);
Thread.Sleep(500);
servo2.Stop();
Thread.Sleep(-1);
}
}
This is the servo.cs class that provides the methods used in the above code to control the servos:
using GHIElectronics.TinyCLR.Devices.Pwm;
using System;
namespace GHIElectronics.TinyCLR.Devices.Servo {
public class ServoMotor {
private PwmChannel servo;
private ServoType type;
private double minPulseLength;
private double maxPulseLength;
public double position { get; set; }
public enum ServoType {
Positional,
Continuous
}
public ServoMotor(ServoType type, PwmController controller, int PwmPin) {
this.servo = controller.OpenChannel(PwmPin);
this.ConfigurePulseParameters(1.0, 2.0);
controller.SetDesiredFrequency(50);
this.type = type;
this.position = 0;
}
public void ConfigurePulseParameters(double minimumPulseWidth, double maximumPulseWidth) {
if (minimumPulseWidth > 1.5 || minimumPulseWidth < 0.1) throw new ArgumentOutOfRangeException("Must be between 0.1 and 1.5 ms");
if (maximumPulseWidth > 3 || maximumPulseWidth < 1.6) throw new ArgumentOutOfRangeException("Must be between 1.6 and 3 ms");
this.minPulseLength = minimumPulseWidth;
this.maxPulseLength = maximumPulseWidth;
}
public void Set(double value) {
if (this.type == ServoType.Positional) {
this.PositionalSetPosition(value);
this.position = value;
}
else
this.ContinousSetSpeed(value);
}
private void PositionalSetPosition(double angle) {
if (angle < 0 || angle > 180) throw new ArgumentOutOfRangeException("degrees", "degrees must be between 0 and 180.");
var duty = ((angle / 180.0 * (this.maxPulseLength - this.minPulseLength)) + this.minPulseLength) / 20;
this.servo.SetActiveDutyCyclePercentage(duty);
this.servo.Start();
}
private void ContinousSetSpeed(double speed) {
if (speed < -100 || speed > 100) throw new ArgumentOutOfRangeException("speed", "speed must be between -100 and 100.");
PositionalSetPosition(speed / 100 * 90 + 90);
}
public void Stop() => this.servo.Stop();
}
}


Tell the recipient of your photo to go to soonsnap.com, press "Receive a Photo", then enter their secret key:
x
Waiting for them to start…
Share just-taken photos with people standing next to you.
Soonsnap is open source & is licensed under the Apache License 2.0
Created by Stuart Langridge & designed by Sam Hewitt
Tell the recipient of your photo to go to soonsnap.com, press "Receive a Photo", then enter their secret key:
x
Waiting for them to start…
There was a problem. :-(


Notebooks
Story: |a!karaken killed by a lion
|a!karaken killed by a lion
Title
|a!karaken killed by a lion
Collection
Summary
A lion sits waiting for the sun to set so he can stalk people. The people lie down to sleep and the lion steals up on them and drags |a!karaken into the grove. The people name the grove '|a!karaken's grove' after |a!karaken who was carried there by the lion.
Comments
1) |han≠kass'o heard this story from his mother (|xabbi-an); the dead woman's little sister, whose name |han≠kass'o does not remember as they lived at his place before he was born, 2) p.7364v: on Driedoorn trees (or !nabba), 3) pp.7375v-7375 1/2v: (29 August) |han≠kass'o feared the grove of !nabba trees (|a!karaken's grove) because his grandfather had warned him that lions were lying in wait there; speaking to and escaping death from a lion, 4) This story is found in Book VIII-15
Contributors
|han≠kass'o (Klein Jantje) (VIII)
Date
28 August 1878 (started)
Categories
Keywords
lion (what |han≠kass'o's grandfather told him about) , lion (|a!karaken killed by a) , lion (waits in the grove) , lion (is feared) , lion (the actions and habits of) , lion (comes at night) , lion (waits for the dark) , lion (kills people) , lion ('wants to be a red ball to us') , Driedoorn tree (!nabba) , Driedoorn tree (and|a!karaken killed by a lion) , grove (accounting for the name of) , grove (called '|a!karaken's grove') , grove (the people fear) , grove (lions wait in) , grove (what |han≠kass'o's grandfather told him about) , grove (and |a!karaken killed by a lion) , |a!karaken (killed by the lion) , |a!karaken (the grove named after her) , name (of the Driedoorn tree is !nabba) , name (accounting for the naming of |a!karaken's grove) , name (and |a!karaken killed by a lion) , tree (called Driedoorn or !nabba) , tree (and |a!karaken's grove) , tree (and |a!karaken killed by a lion)
Story Pages
7364-7375 1/2


Class: Concurrent::Condition Deprecated
- Inherits:
-
Object
- Object
- Concurrent::Condition
- Defined in:
- lib/concurrent/atomic/condition.rb
Overview
Condition is a better implementation of standard Ruby ConditionVariable. The biggest difference is the wait return value: Condition#wait returns Condition::Result which make possible to know if waiting thread has been woken up by an another thread (using #signal or #broadcast) or due to timeout.
Every #wait must be guarded by a locked Mutex or a ThreadError will be risen. Although it's not mandatory, it's recommended to call also #signal and #broadcast within the same mutex
Defined Under Namespace
Classes: Result
Instance Method Summary (collapse)
-
- (true) broadcast
Wakes up all waiting threads.
- - (Object) deprecated(message, strip = 2) included from Concurrent::Concern::Deprecation
- - (Object) deprecated_method(old_name, new_name) included from Concurrent::Concern::Deprecation
-
- (Condition) initialize
constructor
A new instance of Condition.
-
- (Object) log(level, progname, message = nil, &block)
included
from Concurrent::Concern::Logging
Logs through Concurrent::Configuration#logger, it can be overridden by setting @logger.
-
- (true) signal
Wakes up a waiting thread.
- - (Result) wait(mutex, timeout = nil)
Constructor Details
- (Condition) initialize
Returns a new instance of Condition
43 44 45 46 |
# File 'lib/concurrent/atomic/condition.rb', line 43 def initialize deprecated 'Will be replaced with Synchronization::Object in v1.0.' @condition = ConditionVariable.new end |
Instance Method Details
- (true) broadcast
Wakes up all waiting threads
73 74 75 76 |
# File 'lib/concurrent/atomic/condition.rb', line 73 def broadcast @condition.broadcast true end |
- (Object) deprecated(message, strip = 2) Originally defined in module Concurrent::Concern::Deprecation
- (Object) deprecated_method(old_name, new_name) Originally defined in module Concurrent::Concern::Deprecation
- (Object) log(level, progname, message = nil, &block) Originally defined in module Concurrent::Concern::Logging
Logs through Concurrent::Configuration#logger, it can be overridden by setting @logger
- (true) signal
Wakes up a waiting thread
66 67 68 69 |
# File 'lib/concurrent/atomic/condition.rb', line 66 def signal @condition.signal true end |
- (Result) wait(mutex, timeout = nil)
Time calculations one all platforms and languages are sensitive to changes to the system clock. To alleviate the potential problems associated with changing the system clock while an application is running, most modern operating systems provide a monotonic clock that operates independently of the system clock. A monotonic clock cannot be used to determine human-friendly clock times. A monotonic clock is used exclusively for calculating time intervals. Not all Ruby platforms provide access to an operating system monotonic clock. On these platforms a pure-Ruby monotonic clock will be used as a fallback. An operating system monotonic clock is both faster and more reliable than the pure-Ruby implementation. The pure-Ruby implementation should be fast and reliable enough for most non-realtime operations. At this time the common Ruby platforms that provide access to an operating system monotonic clock are MRI 2.1 and above and JRuby (all versions).
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/concurrent/atomic/condition.rb', line 53 def wait(mutex, timeout = nil) start_time = Concurrent.monotonic_time @condition.wait(mutex, timeout) if timeout.nil? Result.new(nil) else Result.new(start_time + timeout - Concurrent.monotonic_time) end end |


QMRITools GUIDE
CardiacTools
QMRITools package: Functions that are used to process cardiac data.
ReferenceReference
HelixAngleCalc — Calculates the fiber architecture matrix (10.1186/1532-429X-17-S1-P15).
BullseyePlot — Makes a bullseye-plot (10.1161/hc0402.102975).
ExcludeSlices — Excludes unreliable slices from cardiac DTI data.
CardiacSegment ▪ CentralAxes ▪ RadialSample ▪ CalculateWallMap
CreateHeart ▪ CardiacCoordinateSystem


pyade package¶
Submodules¶
pyade.commons module¶
-
pyade.commons.
apply_fitness
(population: numpy.ndarray, func: Callable[[numpy.ndarray], float]) → numpy.ndarray[source]¶ Applies the given fitness function to each individual of the population. :param population: Population to apply the current fitness function. :type population: np.ndarray :param func: Function that is used to calculate the fitness. :type func: np.ndarray :rtype np.ndarray :return: Numpy array of fitness for each individual.
-
pyade.commons.
binary_mutation
(population: numpy.ndarray, f: Union[int, float], bounds: numpy.ndarray) → numpy.ndarray[source]¶ Calculate the binary mutation of the population. For each individual (n), 3 random parents (x,y,z) are selected. The parents are guaranteed to not be in the same position than the original. New individual are created by n = z + F * (x-y) :param population: Population to apply the mutation :type population: np.ndarray :param f: Parameter of control of the mutation. Must be in [0, 2]. :type f: Union[int, float] :param bounds: Numpy array of tuples (min, max).
Each tuple represents a gen of an individual.Return type: np.ndarray Returns: Mutated population
-
pyade.commons.
crossover
(population: numpy.ndarray, mutated: numpy.ndarray, cr: Union[int, float]) → numpy.ndarray[source]¶ Crosses gens from individuals of the last generation and the mutated ones based on the crossover rate. Binary crossover :param population: Previous generation population. :type population: np.ndarray :param mutated: Mutated population. :type population: np.ndarray :param cr: Crossover rate. Must be in [0,1]. :type population: Union[int, float] :rtype: np.ndarray :return: Current generation population.
-
pyade.commons.
current_to_best_2_binary_mutation
(population: numpy.ndarray, population_fitness: numpy.ndarray, f: Union[int, float], bounds: numpy.ndarray) → numpy.ndarray[source]¶ Calculates the mutation of the entire population based on the “current to best/2/bin” mutation. This is V_{i, G} = X_{i, G} + F * (X_{best, G} - X_{i, G} + F * (X_{r1. G} - X_{r2, G} :param population: Population to apply the mutation :type population: np.ndarray :param population_fitness: Fitness of the given population :type population_fitness: np.ndarray :param f: Parameter of control of the mutation. Must be in [0, 2]. :type f: Union[int, float] :param bounds: Numpy array of tuples (min, max).
Each tuple represents a gen of an individual.Return type: np.ndarray Returns: Mutated population
-
pyade.commons.
current_to_pbest_mutation
(population: numpy.ndarray, population_fitness: numpy.ndarray, f: List[float], p: Union[float, numpy.ndarray, int], bounds: numpy.ndarray) → numpy.ndarray[source]¶ Calculates the mutation of the entire population based on the “current to p-best” mutation. This is V_{i, G} = X_{i, G} + F * (X_{p_best, G} - X_{i, G} + F * (X_{r1. G} - X_{r2, G} :param population: Population to apply the mutation :type population: np.ndarray :param population_fitness: Fitness of the given population :type population_fitness: np.ndarray :param f: Parameter of control of the mutation. Must be in [0, 2]. :type f: Union[int, float] :param p: Percentage of population that can be a p-best. Muest be in (0, 1). :type p: Union[int, float, np.ndarray] :param bounds: Numpy array of tuples (min, max).
Each tuple represents a gen of an individual.Return type: np.ndarray Returns: Mutated population
-
pyade.commons.
current_to_pbest_weighted_mutation
(population: numpy.ndarray, population_fitness: numpy.ndarray, f: numpy.ndarray, f_w: numpy.ndarray, p: float, bounds: numpy.ndarray) → numpy.ndarray[source]¶ Calculates the mutation of the entire population based on the “current to p-best weighted” mutation. This is V_{i, G} = X_{i, G} + F_w * (X_{p_best, G} - X_{i, G} + F * (X_{r1. G} - X_{r2, G} :param population: Population to apply the mutation :type population: np.ndarray :param population_fitness: Fitness of the given population :type population_fitness: np.ndarray :param f: Parameter of control of the mutation. Must be in [0, 2]. :type f: np.ndarray :param f_w: NumPy Array with the weighted version of the mutation array :type f_w: np.ndarray :param p: Percentage of population that can be a p-best. Muest be in (0, 1). :type p: Union[int, float] :param bounds: Numpy array of tuples (min, max).
Each tuple represents a gen of an individual.Return type: np.ndarray Returns: Mutated population
-
pyade.commons.
current_to_rand_1_mutation
(population: numpy.ndarray, population_fitness: numpy.ndarray, k: List[float], f: List[float], bounds: numpy.ndarray) → numpy.ndarray[source]¶ Calculates the mutation of the entire population based on the “current to rand/1” mutation. This is U_{i, G} = X_{i, G} + K * (X_{r1, G} - X_{i, G} + F * (X_{r2. G} - X_{r3, G} :param population: Population to apply the mutation :type population: np.ndarray :param population_fitness: Fitness of the given population :type population_fitness: np.ndarray :param f: Parameter of control of the mutation. Must be in [0, 2]. :type f: Union[int, float] :param p: Percentage of population that can be a p-best. Muest be in (0, 1). :type p: Union[int, float] :param bounds: Numpy array of tuples (min, max).
Each tuple represents a gen of an individual.Return type: np.ndarray Returns: Mutated population
-
pyade.commons.
exponential_crossover
(population: numpy.ndarray, mutated: numpy.ndarray, cr: Union[int, float]) → numpy.ndarray[source]¶ Crosses gens from individuals of the last generation and the mutated ones based on the crossover rate. Exponential crossover. :param population: Previous generation population. :type population: np.ndarray :param mutated: Mutated population. :type population: np.ndarray :param cr: Crossover rate. Must be in [0,1]. :type population: Union[int, float] :rtype: np.ndarray :return: Current generation population.
-
pyade.commons.
init_population
(population_size: int, individual_size: int, bounds: Union[numpy.ndarray, list]) → numpy.ndarray[source]¶ Creates a random population within its constrained bounds. :param population_size: Number of individuals desired in the population. :type population_size: int :param individual_size: Number of features/gens. :type individual_size: int :param bounds: Numpy array of tuples (min, max).
Each tuple represents a gen of an individual.Return type: np.ndarray Returns: Initialized population.
-
pyade.commons.
keep_bounds
(population: numpy.ndarray, bounds: numpy.ndarray) → numpy.ndarray[source]¶ Constrains the population to its proper limits. Any value outside its bounded ranged is clipped. :param population: Current population that may not be constrained. :type population: np.ndarray :param bounds: Numpy array of tuples (min, max).
Each tuple represents a gen of an individual.:rtype np.ndarray :return: Population constrained within its bounds.
-
pyade.commons.
selection
(population: numpy.ndarray, new_population: numpy.ndarray, fitness: numpy.ndarray, new_fitness: numpy.ndarray, return_indexes: bool = False) → Union[numpy.ndarray, Tuple[numpy.ndarray, numpy.ndarray]][source]¶ Selects the best individuals based on their fitness. :param population: Last generation population. :type population: np.ndarray :param new_population: Current generation population. :type new_population: np.ndarray :param fitness: Last generation fitness. :type fitness: np.ndarray :param new_fitness: Current generation fitness :param return_indexes: When active the function also returns the individual indexes that have been modified :type return_indexes: bool :rtype: ndarray :return: The selection of the best of previous generation
and mutated individual for the entire population and optionally, the indexes changed
pyade.de module¶
-
pyade.de.
apply
(population_size: int, individual_size: int, f: Union[float, int], cr: Union[float, int], bounds: numpy.ndarray, func: Callable[[numpy.ndarray], float], callback: Callable[[Dict[KT, VT]], Any], cross: str, max_evals: int, seed: Optional[int]) → [<class 'numpy.ndarray'>, <class 'int'>][source]¶ Applies the standard differential evolution algorithm. :param population_size: Size of the population. :type population_size: int :param individual_size: Number of gens/features of an individual. :type individual_size: int :param f: Mutation parameter. Must be in [0, 2]. :type f: Union[float, int] :param cr: Crossover Ratio. Must be in [0, 1]. :type cr: Union[float, int] :param bounds: Numpy ndarray with individual_size rows and 2 columns. First column represents the minimum value for the row feature. Second column represent the maximum value for the row feature. :type bounds: np.ndarray :param func: Evaluation function. The function used must receive one
parameter.This parameter will be a numpy array representing an individual.Parameters: - callback (Callable[[Dict], Any]) – Optional function that allows read access to the state of all variables once each generation.
- cross (str) – Indicates whether to use the binary crossover(‘bin’) or the exponential crossover(‘exp’).
- max_evals (int) – Number of evaluations after the algorithm is stopped.
- seed – Random number generation seed. Fix a number to reproduce the
same results in later experiments. :type seed: Union[int, None] :return: A pair with the best solution found and its fitness. :rtype [np.ndarray, int]
pyade.ilshade module¶
-
pyade.ilshade.
apply
(population_size: int, individual_size: int, bounds: numpy.ndarray, func: Callable[[numpy.ndarray], float], memory_size: int, callback: Callable[[Dict[KT, VT]], Any], max_evals: int, seed: Optional[int]) → [<class 'numpy.ndarray'>, <class 'int'>][source]¶ Applies the iL-SHADE differential evolution algorithm. :param population_size: Size of the population. :type population_size: int :param individual_size: Number of gens/features of an individual. :type individual_size: int :param bounds: Numpy ndarray with individual_size rows and 2 columns. First column represents the minimum value for the row feature. Second column represent the maximum value for the row feature. :type bounds: np.ndarray :param func: Evaluation function. The function used must receive one
parameter.This parameter will be a numpy array representing an individual.Parameters: - memory_size (int) – Size of the internal memory.
- callback (Callable[[Dict], Any]) – Optional function that allows read access to the state of all variables once each generation.
- max_evals (int) – Number of evaluations after the algorithm is stopped.
- seed – Random number generation seed. Fix a number to reproduce the
same results in later experiments. :type seed: Union[int, None] :return: A pair with the best solution found and its fitness. :rtype [np.ndarray, int]
pyade.jade module¶
-
pyade.jade.
apply
(population_size: int, individual_size: int, bounds: numpy.ndarray, func: Callable[[numpy.ndarray], float], p: Union[int, float], c: Union[int, float], callback: Callable[[Dict[KT, VT]], Any], max_evals: int, seed: Optional[int]) → [<class 'numpy.ndarray'>, <class 'int'>][source]¶ Applies the JADE Differential Evolution algorithm. :param population_size: Size of the population. :type population_size: int :param individual_size: Number of gens/features of an individual. :type individual_size: int :param bounds: Numpy ndarray with individual_size rows and 2 columns. First column represents the minimum value for the row feature. Second column represent the maximum value for the row feature. :type bounds: np.ndarray :param func: Evaluation function. The function used must receive one
parameter.This parameter will be a numpy array representing an individual.Parameters: - p (Union[int, float]) – Parameter to choose the best vectors. Must be in (0, 1].
- c (Union[int, float]) – Variable to control parameter adoption. Must be in [0, 1].
- callback (Callable[[Dict], Any]) – Optional function that allows read access to the state of all variables once each generation.
- max_evals (int) – Number of evaluations after the algorithm is stopped.
- seed – Random number generation seed. Fix a number to reproduce the
same results in later experiments. :type seed: Union[int, None] :return: A pair with the best solution found and its fitness. :rtype [np.ndarray, int]
pyade.jso module¶
-
pyade.jso.
apply
(population_size: int, individual_size: int, bounds: numpy.ndarray, func: Callable[[numpy.ndarray], float], memory_size: int, callback: Callable[[Dict[KT, VT]], Any], max_evals: int, seed: Optional[int]) → [<class 'numpy.ndarray'>, <class 'int'>][source]¶ Applies the jSO differential evolution algorithm. :param population_size: Size of the population. :type population_size: int :param individual_size: Number of gens/features of an individual. :type individual_size: int :param bounds: Numpy ndarray with individual_size rows and 2 columns. First column represents the minimum value for the row feature. Second column represent the maximum value for the row feature. :type bounds: np.ndarray :param func: Evaluation function. The function used must receive one
parameter.This parameter will be a numpy array representing an individual.Parameters: - memory_size (int) – Size of the internal memory.
- callback (Callable[[Dict], Any]) – Optional function that allows read access to the state of all variables once each generation.
- max_evals (int) – Number of evaluations after the algorithm is stopped.
- seed – Random number generation seed. Fix a number to reproduce the
same results in later experiments. :type seed: Union[int, None] :return: A pair with the best solution found and its fitness. :rtype [np.ndarray, int]
pyade.lshade module¶
-
pyade.lshade.
apply
(population_size: int, individual_size: int, bounds: numpy.ndarray, func: Callable[[numpy.ndarray], float], memory_size: int, callback: Callable[[Dict[KT, VT]], Any], max_evals: int, seed: Optional[int]) → [<class 'numpy.ndarray'>, <class 'int'>][source]¶ Applies the L-SHADE Differential Evolution Algorithm. :param population_size: Size of the population. :type population_size: int :param individual_size: Number of gens/features of an individual. :type individual_size: int :param bounds: Numpy ndarray with individual_size rows and 2 columns. First column represents the minimum value for the row feature. Second column represent the maximum value for the row feature. :type bounds: np.ndarray :param func: Evaluation function. The function used must receive one
parameter.This parameter will be a numpy array representing an individual.Parameters: - memory_size (int) – Size of the internal memory.
- callback (Callable[[Dict], Any]) – Optional function that allows read access to the state of all variables once each generation.
- max_evals (int) – Number of evaluations after the algorithm is stopped.
- seed – Random number generation seed. Fix a number to reproduce the
same results in later experiments. :type seed: Union[int, None] :return: A pair with the best solution found and its fitness. :rtype [np.ndarray, int]
pyade.lshadecnepsin module¶
-
pyade.lshadecnepsin.
apply
(population_size: int, individual_size: int, bounds: numpy.ndarray, func: Callable[[numpy.ndarray], float], memory_size: int, callback: Callable[[Dict[KT, VT]], Any], min_population_size: int, max_evals: int, seed: Optional[int]) → [<class 'numpy.ndarray'>, <class 'int'>][source]¶ Applies the L-SHADE-cnEpSin differential evolution algorithm. :param population_size: Size of the population (NP-max) :type population_size: int :param min_population_size: Lowest size of the population (NP-min) :param individual_size: Number of gens/features of an individual. :type individual_size: int :param bounds: Numpy ndarray with individual_size rows and 2 columns. First column represents the minimum value for the row feature. Second column represent the maximum value for the row feature. :type bounds: np.ndarray :param func: Evaluation function. The function used must receive one
parameter.This parameter will be a numpy array representing an individual.Parameters: - memory_size (int) – Size of the internal memory.
- callback (Callable[[Dict], Any]) – Optional function that allows read access to the state of all variables once each generation.
- max_evals (int) – Number of evaluations after the algorithm is stopped.
- seed – Random number generation seed. Fix a number to reproduce the
same results in later experiments. :type seed: Union[int, None] :return: A pair with the best solution found and its fitness. :rtype [np.ndarray, int]
-
pyade.lshadecnepsin.
get_default_params
(dim: int)[source]¶ Returns the default parameters of the L-SHADE-cnEpSin Differential Evolution Algorithm :param dim: Size of the problem (or individual). :type dim: int :return: Dict with the default parameters of the L-SHADE-cnEpSin Differential Evolution Algorithm. :rtype dict
pyade.main module¶
pyade.mmts module¶
-
pyade.mmts.
local_search_1
(individual: numpy.ndarray, reset_sr: numpy.ndarray, search_range: Union[int, float], improve: numpy.ndarray, k: int, func: Callable, fitness: float, best_solution, best_fitness)[source]¶
-
pyade.mmts.
local_search_2
(individual: numpy.ndarray, reset_sr: numpy.ndarray, search_range: Union[int, float], improve: numpy.ndarray, k: int, func: Callable, fitness: float, best_solution, best_fitness)[source]¶
pyade.mpede module¶
-
pyade.mpede.
apply
(population_size: int, individual_size: int, bounds: numpy.ndarray, func: Callable[[numpy.ndarray], float], callback: Callable[[Dict[KT, VT]], Any], lambdas: Union[list, numpy.core.multiarray.array], ng: int, c: Union[int, float], p: Union[int, float], max_evals: int, seed: Optional[int]) → [<class 'numpy.ndarray'>, <class 'int'>][source]¶ Applies the MPEDE differential evolution algorithm. :param population_size: Size of the population (NP-max) :type population_size: int :param ng: Number of generations after the best strategy is updated. :type ng: int :param lambdas: Percentages of each of the 4 subpopulations. :type lambdas: Union[list, np.array] :param individual_size: Number of gens/features of an individual. :type individual_size: int :param bounds: Numpy ndarray with individual_size rows and 2 columns. First column represents the minimum value for the row feature. Second column represent the maximum value for the row feature. :type bounds: np.ndarray :param func: Evaluation function. The function used must receive one
parameter.This parameter will be a numpy array representing an individual.Parameters: - callback (Callable[[Dict], Any]) – Optional function that allows read access to the state of all variables once each generation.
- max_evals (int) – Number of evaluations after the algorithm is stopped.
- seed – Random number generation seed. Fix a number to reproduce the
same results in later experiments. :param p: Parameter to choose the best vectors. Must be in (0, 1]. :type p: Union[int, float] :param c: Variable to control parameter adoption. Must be in [0, 1]. :type c: Union[int, float] :type seed: Union[int, None] :return: A pair with the best solution found and its fitness. :rtype [np.ndarray, int]
pyade.sade module¶
-
pyade.sade.
apply
(population_size: int, individual_size: int, bounds: numpy.ndarray, func: Callable[[numpy.ndarray], float], callback: Callable[[Dict[KT, VT]], Any], max_evals: int, seed: Optional[int])[source]¶ Applies the Self-adaptive differential evolution algorithm (SaDE). :param population_size: Size of the population. :type population_size: int :param individual_size: Number of gens/features of an individual. :type individual_size: int :param bounds: Numpy ndarray with individual_size rows and 2 columns. First column represents the minimum value for the row feature. Second column represent the maximum value for the row feature. :type bounds: np.ndarray :param func: Evaluation function. The function used must receive one
parameter.This parameter will be a numpy array representing an individual.Parameters: - callback (Callable[[Dict], Any]) – Optional function that allows read access to the state of all variables once each generation.
- max_evals (int) – Number of evaluatios after the algorithm is stopped.
- seed – Random number generation seed. Fix a number to reproduce the
same results in later experiments. :type seed: Union[int, None] :return: A pair with the best solution found and its fitness. :rtype [np.ndarray, int]
pyade.saepsdemmts module¶
-
pyade.saepsdemmts.
apply
(population_size: int, individual_size: int, bounds: numpy.ndarray, func: Callable[[numpy.ndarray], float], callback: Callable[[Dict[KT, VT]], Any], max_evals: int, seed: Optional[int])[source]¶ Applies the Self-adaptive differential evolution algorithm (SaDE). :param population_size: Size of the population. :type population_size: int :param individual_size: Number of gens/features of an individual. :type individual_size: int :param bounds: Numpy ndarray with individual_size rows and 2 columns. First column represents the minimum value for the row feature. Second column represent the maximum value for the row feature. :type bounds: np.ndarray :param func: Evaluation function. The function used must receive one
parameter.This parameter will be a numpy array representing an individual.Parameters: - callback (Callable[[Dict], Any]) – Optional function that allows read access to the state of all variables once each generation.
- max_evals (int) – Number of evaluatios after the algorithm is stopped.
- seed – Random number generation seed. Fix a number to reproduce the
same results in later experiments. :type seed: Union[int, None] :return: A pair with the best solution found and its fitness. :rtype [np.ndarray, int]
pyade.shade module¶
-
pyade.shade.
apply
(population_size: int, individual_size: int, bounds: numpy.ndarray, func: Callable[[numpy.ndarray], float], memory_size: int, callback: Callable[[Dict[KT, VT]], Any], max_evals: int, seed: Optional[int]) → [<class 'numpy.ndarray'>, <class 'int'>][source]¶ Applies the SHADE differential evolution algorithm. :param population_size: Size of the population. :type population_size: int :param individual_size: Number of gens/features of an individual. :type individual_size: int :param bounds: Numpy ndarray with individual_size rows and 2 columns. First column represents the minimum value for the row feature. Second column represent the maximum value for the row feature. :type bounds: np.ndarray :param func: Evaluation function. The function used must receive one
parameter.This parameter will be a numpy array representing an individual.Parameters: - memory_size (int) – Size of the internal memory.
- callback (Callable[[Dict], Any]) – Optional function that allows read access to the state of all variables once each generation.
- max_evals (int) – Number of evaluations after the algorithm is stopped.
- seed – Random number generation seed. Fix a number to reproduce the
same results in later experiments. :type seed: Union[int, None] :return: A pair with the best solution found and its fitness. :rtype [np.ndarray, int]


The frequency plot above marks each occurence of the word(s) indicated on the above left.
The axis runs from the first to the last word of the text.
The brighter the color of the marks, the more frequently that word occurs in that section of the text.


The basic building blocks of programming
By the end of this lesson you should:
In this lesson we'll be meeting Java, and its syntax that corresponds to our pseudocode
We'll be meeting a few more aspects of programming, alongside some old ones:
The first program everyone writes:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
There are a few new things here that we'll explain
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
Lines 1 and 5 define a class
A class lets you bundle related functionality into one file, and can then be used in another class.
All code must be defined inside a class!
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
Lines 2 and 4 define the main method
The main method is the starting point of every Java program, and must be written in this way.
When the program is run, whatever is inside the main runs.
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
Line 3 is a method call which prints (outputs) a piece of text (a String) to the terminal/console.
public static void main(String[] args) {
// Your code here
}
The main method is made of a few key words:
As we've seen before, variables are for storing values we can refer to and update later in our program.
Java is strictly typed - meaning the type of value stored cannot change.
We can either define our variable by first declaring the type, or with var
, we will prefer var
for the course.
This is the general pattern:
ObjectType myVariable = value;
or
var myVariable = value;
Here are some concrete examples:
public class VariablesAndTypes {
public static void main(String[] args) {
var greeting = "Hello";
System.out.println(greeting);
var myFavouriteNumber = 17;
System.out.println(myFavouriteNumber);
var isThisJava = true;
System.out.println(isThisJava);
}
}
Java provides the fundamental types with which people can (and have) built everything
Among those are basic data types that we are concerned with:
Represents text in your program, they must be enclosed in quote marks ("")
public class UsingStrings {
public static void main(String[] args) {
var teacherName = "Ben";
var courseName = "Java for beginners";
var statement = teacherName + " teaches " + courseName;
System.out.println(statement);
}
}
Notice that we can use + to append/glue Strings to each other.
Create a new file Greeting.java
, write a class and a main method in it.
In the main method, define a String variable myName that has your own name as a value.
Java lets you to choose between a number that:
By default Java uses Integer
and Double
, which will happen when you use var
to define variables.
public class UsingNumbers {
public static void main(String[] args) {
// These can all be defined using var too
Integer i1 = 123;
System.out.println(i1);
Long l1 = 123l; // Notice the "l" after the Long
System.out.println(l1);
Float f1 = 123.45f; // Notice the "f" after the Float
System.out.println(f1);
Double d1 = 123.45;
System.out.println(d1);
}
}
(Variable types declared for emphasis only, var also works)
In Greeting.java
, define an Integer variable myAge that has your own age as a value.
Print a message using your name and age variables, e.g. "I'm Ben and I'm definitely 24"
A true/false value
These are used in all decision making, i.e.
public class UsingBooleans {
public static void main(String[] args) {
var enabled = true;
System.out.println(enabled);
}
}
In Greeting.java
, define a Boolean variable isHungry with the value true or false depending on whether or not you are hungry.
Along with the fundamental number types, Java gives us convenient operators to do math:
public class MathOperators {
public static void main(String[] args) {
var plus = 1 + 2;
var minus = 1 - 2;
var divide = 1 / 2;
var multiply = 1 * 2;
var power = Math.pow(1, 2); // 1 to the power of 2
// Modulus % gives you the remainder of division
var modulus = 1 % 2; // remainder of 1 divided by 2
}
}
These operators follow BODMAS, you can use brackets as normal to control the order.
In addition to mathematical calculators, Java also provides handy number comparison:
public class MathComparisons {
public static void main(String[] args) {
var lessThan = 1 < 2;
var greaterThan = 1 > 2;
var lessThanOrEqual = 1 <= 2;
var greaterThanOrEqual = 1 >= 2;
var equal = 1 == 2; // note it is double equals signs
}
}
Java also provides operators for booleans:
public class BooleanOperators {
public static void main(String[] args) {
var inclusiveOr = true || false;
var and = true && false;
var not = !true;
}
}
AND is only true if both the left and right value are true.
| true | false | |
|---|---|---|
| true | true | false |
| false | false | false |
OR is true if either the left or right value are true.
It is only false when both values are false.
This is also known as inclusive OR
| true | false | |
|---|---|---|
| true | true | true |
| false | true | false |
NOT reverses the boolean it is applied to.
| original | !original |
|---|---|
| true | false |
| false | true |
Another familiar tool, if gives us conditional execution in our code.
public class IfStatements {
public static void main(String[] args) {
var condition = true;
if (condition) {
System.out.println("The condition is true");
}
if (condition) {
System.out.println("The condition is still true");
} else {
System.out.println("The condition is false");
}
}
}
In these examples we're using a Boolean variable, but you can use any expression that returns a Boolean.
This example compares numbers
public class IfStatementsContinued {
public static void main(String[] args) {
var numberToCheck = 5;
if (numberToCheck < 0) {
System.out.println("The number is too small");
} else if (numberToCheck > 100){
System.out.println("The number is too large");
} else {
System.out.println("The number is between 0 and 100");
}
}
}
Using isHungry in Greeting.java
. Write an if statement to print "Food time!" if true and "No snacking!" if
false.
The lines of code you write need to know what context they are being run in.
{Braces} group statements in a dedicated block with its own context.
Variables declared inside a set of braces cannot be used after that set has ended, e.g.
public class Braces {
public static void main(String[] args) {
var sayHello = true;
if (sayHello) {
// sayHello is accessible here, because this block is inside main
var helloMessage = "Hello there!";
System.out.println(helloMessage);
}
// helloMessage is inaccessible here, we're not in the if statement's context
}
}
[Brackets] let you define and access arrays - fixed-size lists that are very efficient.
public class Brackets {
public static void main(String[] args) {
// Create an array containing 1, 2, and 3
var numbers = new Integer[] { 1, 2, 3 };
var firstNumber = numbers[0];
System.out.println(firstNumber);
var secondNumber = numbers[1];
System.out.println(secondNumber);
var thirdNumber = numbers[2];
System.out.println(thirdNumber);
}
}
(Parentheses):
public class Parentheses {
public static void main(String[] args) {
var day = "Wednesday";
if (day.toLowerCase().equals("wednesday")) {
System.out.println("It is Wednesday my dudes");
}
}
}
In this example, toLowerCase
takes no arguments.
equals
takes one, a string to compare the day
.
System.out.println
takes one, a string to print to the console
To make reading other peoples' code easier, programming languages have agreed coding conventions.
Naming conventions differ for certain cases:
Some other essential rules for Java:
public class Calculator { ... }
must exist in Calculator.java
.


Material Means
Authors
Mette Agger Eriksen
Notes
Field of Study
Concepts
Material Means, Re-representing, Mock-ups, Scenarios, Key Issues
Quotations
References


A simple single player tic tac toe game. Tic-Tac-Toesy
Use this area of the page to describe your project. Local Weather
Use this area of the page to describe your project. NewsApp
Application for keeping track of mileage, maintenance, gas cost, repair cost and upload image of receipts. AutoLogInit
Use this area of the page to describe your project. Yoda Quotes
Use this area of the page to describe your project. Tell A Tale


PARKING BUDDY
Parking 1
93
/270
Address Line 1
Address Line 2
1.5 km away
Parking 2
15
/128
Address Line 1
Address Line 2
1.2 km away
Parking 3
0
/832
Address Line 1
Address Line 2
0.5 km away
Parking 4
13
/15
Address Line 1
Address Line 2
1.3 km away
Parking 5
10
/520
Address Line 1
Address Line 2
0.7 km away
Parking 6
5
/100
Address Line 1
Address Line 2
2.8 km away


I’ve been experiencing MSBuild a bit at work lately. Ignoring the mortal sin of designing a programming language within XML, MSBuild fails on usability in another fundamental way: control flow has to flow.
In general, there are two key approaches to control flow. One approach is the procedural “jump” approach. This includes all manner of conditionals, loops, and more. The second approach involves functional constructs such as recursion and pattern matching. These two approaches are blended between procedural languages, functional languages, and everything in between and beyond.
The procedural and functional mechanisms can be visualized in terms of forwards and backwards. Procedural control flow moves forward in a set of steps which are executed in sequence as defined. Functional control flow begins with the results and works its way backwards pulling in bits and pieces of data and logic along the way.
MSBuild uses neither of these approaches.
That was a lie. MSBuild targets are executed in sequence procedurally. Targets can also define a “DependsOn” property which works functionally to pull in pre-requisite tasks.
The truth is that MSBuild introduces (and often requires) a very unwelcome third approach in the form of the “Condition” property. The “Condition” property is neither forwards nor backwards control flow. It is sideways. MSBuild has only one global namespace of variables (confusingly, called “properties”) which can be set or tested at any time.
With either a procedural or functional control flow, you can follow the flow simply in your text editor. In a structured procedure, you simply trace through the code pretending to be a human interpreter. In a functional method or when dealing with sub-procedures, you can trivially search for functions by name as they are called. In a sense, you are “flowing” through the code like water though pipes. You are either pumping water through or sucking water out.
With sideways control flow, you need to search for all references to every variable at every step of both the procedural and functional code flows. This is a laborious and error prone operation because after finding a relevant “Condition”, you need to analyze the forward and backwards control flow which led to that sideways control flow construct! There is no “flowing”.
Sideways control flow leads to a combinatorial explosion of forward and backwards control flows. The developer is required to keep all of these flows in their heads all at once. Meanwhile, in normal programming languages, you only ever need to deal with just two: forwards and backwards.


The JCCC Web Technologies style guide is a resource for designers. The purpose is to maintain consistency through all platforms, browsers, and updates.
Some text will go here. I love bacon and cheese and tomatoes and blankets.
Some text will go here. I love bacon and cheese and tomatoes and blankets.
Some text will go here. I love bacon and cheese and tomatoes and blankets.
Some text will go here. I love bacon and cheese and tomatoes and blankets.
Some text will go here. I love bacon and cheese and tomatoes and blankets.
Some text will go here. I love bacon and cheese and tomatoes and blankets.
Some text will go here. I love bacon and cheese and tomatoes and blankets.
Some text will go here. I love bacon and cheese and tomatoes and blankets.
Some text will go here. I love bacon and cheese and tomatoes and blankets.
Some text goes here...
Some more text goes here...
Copyright © JCCC Web Tech. Terms and Conditions


Sukosan is just 6nm south of Zadar and has the largest marina in Croatia. It is a tourist resort on a very attractive part of the coast.
Position 44°03'N, 15°18.4'E.
Sukosan Marina :©www.yacht-chartercroatia.com
This is not a Port of Entry.
The huge marina here is the principal reason for visiting this village.
Berth in the marina where directd. It is advisable to use a dinghy to reach the harbour office and other services as it is a very long way round from the visitors' berths.
It is possible to anchor in the bay to the SE of the marina, or in the harbour by the village (to the east of the ruins), both in about 2m.
Last updated February 2014.


SweetFreeStuff.com
///////////////////////////////////////////
Free $5 off $5 at Sears or Kmart Coupon
Posted: 13 Aug 2015 09:54 AM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
Text message: SURPRISEME to 73277 to possibly get a coupon for $5 off $5 at
Sears or Kmart. Expires 8/18/2015. If youre already subscribed, text
message STOP to 73277 first.
The post Free $5 off $5 at Sears or Kmart Coupon appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Mission Network News 2015-2016 Calendar
Posted: 13 Aug 2015 08:38 AM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
Free Mission Network News 2015-2016 Calendar
The post Free Mission Network News 2015-2016 Calendar appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
FREE Medium Two-Topping Handmade Pan Pizza at Dominos (8/13 @ 3PM ET!)
Posted: 12 Aug 2015 04:00 PM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
*Update: A no hitter has been thrown and this offer goes live Thursday,
August 13th at 3pm ET! When a pitcher throws a no-hitter this season, visit
MLB.com/Dominono and enter your mlb.com account. after Each of the first 2
no-hitters, THE FIRST 20,000 MLB.COM USERS TO ENTER THEIR MLB.COM ACCOUNTS
will receive a code valid for Continue reading FREE Medium Two-Topping
Handmade Pan Pizza at Dominos (8/13 @ 3PM ET!)
The post FREE Medium Two-Topping Handmade Pan Pizza at Dominos (8/13 @ 3PM
ET!) appeared first on SweetFreeStuff.com.
///////////////////////////////////////////
Free Pack of Wymans Wildflower Seeds
Posted: 12 Aug 2015 12:51 PM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
Free Pack of Wyman’s Wildflower Seeds
The post Free Pack of Wyman’s Wildflower Seeds appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free RedBox DVD Rental
Posted: 12 Aug 2015 11:00 AM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
Text message: FREEBIE to 727272 for a free 1 night rental. Expires
September 30th. Free RedBox DVD Rental
The post Free RedBox DVD Rental appeared first on SweetFreeStuff.com.
///////////////////////////////////////////
Free LOreal Hair Care Samples
Posted: 12 Aug 2015 09:42 AM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
Free L’Oreal Hair Care Samples
The post Free L’Oreal Hair Care Samples appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Ice Elements 2 Minute Miracle Gel Sample
Posted: 12 Aug 2015 09:30 AM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
Sign up for a FREE Ice Elements 2 Minute Miracle Gel Sample.
The post Free Ice Elements 2 Minute Miracle Gel Sample appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Simple Micellar Cleansing Water Sample
Posted: 12 Aug 2015 09:00 AM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
Free Simple Micellar Cleansing Water Sample
The post Free Simple Micellar Cleansing Water Sample appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Rachael Ray Nutrish for Cats Sample
Posted: 11 Aug 2015 11:00 PM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
Select the free sample offer and complete the form. Free Rachael Ray
Nutrish for Cats Sample
The post Free Rachael Ray Nutrish for Cats Sample appeared first on
SweetFreeStuff.com.


This is a really weird chat room. I keep getting strange responses. :S
Why don't you tell us more about what's bothering you?
But if we don't talk about it, we won't know why this chatroom is so weird.
Point taken. What do you guys want to do?
Well... we could talk about it...
No one talks about... the Other...


Status: Passed, Jan 89 X3J13Forum: Cleanup
Issue: IEEE-ATAN-BRANCH-CUT
References: CLtL p.203-214
Related issues: COMPLEX-ATAN-BRANCH-CUT
Category: CHANGE
Edit history: Version 1, 13-Dec-88, Steele
Version 2, 11-Jan-89, Masinter
Problem description:
If an implementation provides a floating-point minus zero as well as a
floating-point plus zero, most notably as in IEEE 754 floating-point
arithmetic, then slight adjustments in the branch cuts of transcendental
functions are appropriate.
If there is a minus zero and a plus zero, then *no* complex number
is actually "on the axis" whether real or imaginary. Instead,
numbers of the form x+0i and x-0i straddle the real axis, and those
of the form 0+xi and -0+xi straddle the imginary axis. Branch cuts
that lie on the axes therefore run between such numbers, and directions
of continuity are not an issue.
Proposal (IEEE-ATAN-BRANCH-CUT:SPLIT):
Redefine the branch cut for two-argument ATAN, covering
the cases where there is or is not a minus zero, and then redefine *all*
other functions that have branch cuts in terms of two-argument ATAN.
Specifically, we first define PHASE in terms of two-argument ATAN,
and complex ABS in terms of real SQRT (which has no branch cut problems);
then define complex LOG in terms of PHASE, ABS, and real LOG; then define
complex SQRT in terms of LOG; and then define all others in terms of these.
In this propoal Lisp expressions should be taken as mathematical
formulas that actually are implemented in other ways for improved accuracy.
(1) If there is no minus zero, two-argument ATAN behaves as in CLtL.
If there is a minus zero, then some cases are modified:
Condition result
y=+0 x>0 +0
y=-0 x>0 -0
y=+0 x<0 +pi
y=-0 x<0 -pi
y=+0 x=+0 +0
y=-0 x=+0 -0
y=+0 x=-0 +pi
y=-0 x=-0 -pi
The range of two-argument atan therefore includes -pi in this case.
Note that the case y=0 x=0 is an error in the absence of minus zero,
but is defined in the presence of minus zero.
(2) (PHASE X) = (ATAN (IMAGPART X) (REALPART X)), as before, but now
the range of PHASE may include -PI if there is a minus zero.
(3) (ABS X) = (SQRT (+ (* (REALPART X) (REALPART X))
(* (IMAGPART X) (IMAGPART X)))), as before
(4) (LOG X) = (COMPLEX (LOG (ABS X)) (PHASE X))
(5) (SQRT X) = (EXP (/ (LOG X) 2))
(6) For EXPT, ASIN, ACOS, ATAN, ASINH, ACOSH, ATANH use the formulas
in CLtL pp. 211-213, but use the formulas (1-5) above as the
definitions of LOG and SQRT in order to determine the branch cuts
properly.
Examples:
(LOG #c(-1.0 +0.0)) => #c(0.0 3.14159...) ;Current
(LOG #c(-1.0 -0.0)) => #c(0.0 3.14159...) ;Current
(LOG #c(-1.0 +0.0)) => #c(0.0 3.14159...) ;Proposed (= current)
(LOG #c(-1.0 -0.0)) => #c(0.0 -3.14159...) ;Proposed (conjugate)
Rationale:
The current specification ignores some natural consequences of IEEE
floating-point arithmetic. The proposed specification produces results
more natural to that arithmetic.
Current practice:
Of implementations that support a minus zero that I have checked,
such as Sun-4 CL 2.1.3 of 10-Nov-88 and Symbolics CL, all follow
the current CLtL specification.
The IEEE trig library atan2 routine written by K.C. Ng (with the advice
or supervision of W. Kahan, I believe), and distributed with BSD UNIX
(it is file /usr/src/usr.lib/libm/IEEE/atan2.c on my machine) follows
this proposal for treatment of minus zero.
Cost to Implementors:
Some of the trig routines will require some rewriting. Probably certain
tests that are now written using ZEROP need to be rewritten to use
FLOAT-SIGN instead.
Cost to Users:
It is barely conceivable that some user code could depend on this.
Probably there is no cost.
The compatibility note on p. 210 of CLtL gave users fair warning that
a change of this kind might be adopted.
Cost of non-adoption:
Unnatural treatment of some functions on machines supporting IEEE
floating-point arithmetic.
Benefits:
Natural treatment, etc.
Esthetics:
A toss-up, except to those who care.
Discussion:
Steele has sent a letter to W. Kahan at Berkeley to get any last
comments he may have on the matter.


1. Join your ucp-node0 and ucp-node1 nodes to the controller
2. Run three containers of your choice and take note of which nodes they are scheduled on
3. Between node0 and node1, SSH into the node that has more containers running
4. Stop the ucp-swarm-join container and wait a few minutes. Then refresh open the Nodes page in UCP. What do you notice?
5. Open the Containers page in UCP. What do you notice?
6. Start the ucp-swarm-join container and refresh your Nodes page to find the node again. Then check your containers on the node. Notice they are still running
7. Run a new container and set the restart policy on it to "always"
8. Take note of which node the container is on. SSH into that node and reboot it.$ sudo reboot
9. Wait a few minutes until the node has rebooted.
10. Go into the containers page and check the containers on the node. Which container is still running after the reboot and which one has stopped?


|
BeanIO 2.1.0.M2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SelectorConfig
This interface is implemented by configuration components used to select
a record for marshalling or unmarshalling, namely RecordConfig
and
GroupConfig
components.
| Method Summary | |
|---|---|
char |
getComponentType()
Returns the component type of this selector. |
Integer |
getMaxOccurs()
Returns the maximum occurrences of this component. |
Integer |
getMinOccurs()
Returns the minimum occurrences of this component. |
String |
getName()
Returns the name of this component. |
Integer |
getOrder()
Returns the order of this component within the context of its parent group. |
void |
setOrder(Integer order)
Sets the order of this component within the context of its parent group. |
| Method Detail |
|---|
char getComponentType()
ComponentConfig.RECORD
or ComponentConfig.GROUP
String getName()
Integer getMinOccurs()
Integer getMaxOccurs()
Integer getOrder()
void setOrder(Integer order)
order
- the component order (starting at 1)
|
Copyright © 2010-2013 Kevin Seim | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |