My name is David Cole and I was born in the Seattle area.
BA in philosophy from Seattle University
Job Experience:
Goals:


Features:*
Multibrowser/Multiplatform support
Full controll with JavaScript - wide API
Loading content with AJAX or in Iframes
Top, bottom, right and left oriented tabs
Multi-line tabbars
Scrollable
XML support
Fully customizable
Various predefined skins
Easy initialization
Detailed documentation


WebSiteName
Home
About Us
Book Blog
Services
Contact Us
Full Name
FULL NAME
username
Edit
Books Read:
Books Partially Read:
Books Reviewed:
Books Recently Read
Books Recently Reviewed
Books Currently Reading


Extends
Members
max :BigInt
Maximum value of RNG based on bits: (2^this.bits) - 1.
Type:
- BigInt
- Overrides:
- Source:
min :BigInt
Minimum value for RNG based on bits.
Type:
- BigInt
- Overrides:
- Source:
Methods
bool() → {Boolean}
Outputs a random boolean
- Overrides:
- Source:
Returns:
- Type
- Boolean
character(string)
Selects a random character from a string
Parameters:
| Name | Type | Description |
|---|---|---|
string |
String |
- Overrides:
- Source:
fixBits(value, bitsopt) → {BigInt}
Ensures the value is this.bits in size.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value |
BigInt | Value to be coerced into this.bits of data. | ||
bits |
Number |
<optional> |
this.bits | Bit length to convert to. |
- Overrides:
- Source:
Returns:
- Type
- BigInt
fixSeed(seedopt) → {BigInt}
Coerces the seed into a BigInt and ensures it's not equivalent to 0.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
seed |
BigInt | Number | String | Buffer |
<optional> |
If not entered, a random seed will be generated. |
- Overrides:
- Source:
Returns:
- Type
- BigInt
float(precisionopt)
Outputs a random floating point number between 0 (inclusive) and 1 (exclusive) with optional precision.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
precision |
Number |
<optional> |
How many digits to keep after decimal point. |
- Overrides:
- Source:
leftShift(value, amount, bitsopt) → {BigInt}
Simulates a left shift to a BigInt. When left shifting a BigInt it doesn't lose its leftmost bits, so we have to do that ourselves.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value |
BigInt | The value to shift. | ||
amount |
BigInt | The amount to shift. | ||
bits |
Number |
<optional> |
this.bits | The number of bits value should be. |
- Overrides:
- Source:
Returns:
- The number left shifted.
- Type
- BigInt
number() → {BigInt}
Alias for this.random()
- Overrides:
- Source:
Returns:
- A random number based on this.generator
- Type
- BigInt
numberBetween(min, max) → {BigInt}
Outputs a random number between two values, inclusive.
Parameters:
| Name | Type | Description |
|---|---|---|
min |
BigInt | Smallest number the values can be |
max |
BigInt | Largest number the values can be |
- Overrides:
- Source:
Returns:
- Type
- BigInt
random() → {BigInt}
Uses XOR and bit shifts to generate a pseudorandom number.
- Overrides:
- Source:
Returns:
- Type
- BigInt
randSeed(seedLength) → {BigInt}
Generates a random seed by getting random bytes from Crypto.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
seedLength |
Number | 64 | Length of the seed to generate. |
- Overrides:
- Source:
Returns:
- Type
- BigInt
reverseBits(value) → {BigInt}
Flips the binary representation of the input value. The final digit becomes the first, the second to last becomes the second, etc.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
BigInt |
- Overrides:
- Source:
Returns:
- Type
- BigInt
splitSeed(countopt) → {Array.<BigInt>}
Splits a seed into multiple parts
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
count |
Number |
<optional> |
1 | Number of splits to make |
- Overrides:
- Source:
Returns:
- Type
- Array.<BigInt>
toBigInt(value, bitsopt) → {BigInt}
Attempts to Convert the input value to BigInt.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value |
BigInt | Number | String | Buffer | Value to be converted to BigInt. | ||
bits |
Number |
<optional> |
this.bits | Bit length to convert to. |
- Overrides:
- Source:
Returns:
- Type
- BigInt


digital design + media art club // home
→ about
→ DDMA Library
→ workshop schedule
↗ are.na
↗ instagram
↗ github


on what the Buddha taught
Aṅguttara Nikāya
Dukanipātapāḷi
Paṭhamapaṇṇāsakaṃ
AN2.32
These two, almsmen, principles have a share in knowing.
What two?
And calm and insight.
Calm, almsmen, when developed, what gain does it partake in?
Mind is developed.
Mind developed; what gain does it partake in?
What is passion, that is gotten rid of.
Insight, almsmen, when developed, what gain does it partake in?
Wisdom is developed.
Wisdom developed; what gain does it partake in?
What is ignorance, that is gotten rid of.
Or, depraved by passion, almsmen, mind is not emancipated or,
depraved by ignorance, wisdom is not developed.
Thus now, almsmen, with passion fading away: emancipation through mentality,
with ignorance fading away: emancipation through wisdom.


I really would like to built a dwarven slayer, but alas, i'm not very good at it. Can someone please post an epic buildt for a dwarven slayer. I would like it to have barbarian(rage) and ranger{for favoured enemies) as his classes. Maybey DWD too? Thx in advance.
oh almost forgot and a great axe as his main weapon.
Edited By Kraven Khor on 05/03/05 18:32
hmm, iafter a little research maybe it would be better to have two battleaxes because of the free dual wield.and favoured enemies should be greenskins offcourse. and also DWD is not an option cause char has to be chaotic neutraul, and you have to lawfull for DWD.


Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
| Modifiers | Name | Description |
|---|---|---|
static String |
TEST_SCRIPT_NAME_PREFIX |
|
protected static Logger |
log |
| Type | Name and description |
|---|---|
protected void |
assertArrayEquals(Object[] expected, Object[] value) Asserts that the arrays are equivalent and contain the same values |
protected void |
assertContains(char expected, char[] array) Asserts that the array of characters contains a given char |
protected void |
assertContains(int expected, int[] array) Asserts that the array of ints contains a given int |
static void |
assertEquals(String message, Object expected, Object actual) |
static void |
assertEquals(Object expected, Object actual) |
static void |
assertEquals(String expected, String actual) |
protected void |
assertInspect(Object value, String expected) Asserts that the value of inspect() on the given object matches the given text string |
protected void |
assertLength(int length, char[] array) Asserts that the array of characters has a given length |
protected void |
assertLength(int length, int[] array) Asserts that the array of ints has a given length |
protected void |
assertLength(int length, Object[] array) Asserts that the array of objects has a given length |
protected void |
assertScript(String script) see GroovyAssert.assertScript |
protected void |
assertToString(Object value, String expected) Asserts that the value of toString() on the given object matches the given text string |
protected String |
fixEOLs(String value) Returns a copy of a string in which all EOLs are \n. |
String |
getMethodName() |
String |
getName() Overload the getName() method to make the test cases look more like AgileDox (thanks to Joe Walnes for this tip!) |
protected String |
getTestClassName() |
static boolean |
notYetImplemented(Object caller) see GroovyAssert.notYetImplemented |
boolean |
notYetImplemented() Convenience method for subclasses of GroovyTestCase, identical to GroovyTestCase.notYetImplemented(this);. |
protected String |
shouldFail(Closure code) see GroovyAssert.shouldFail |
protected String |
shouldFail(Class clazz, Closure code) see GroovyAssert.shouldFail |
protected String |
shouldFail(Class clazz, String script) see GroovyAssert.shouldFail |
protected String |
shouldFail(String script) see GroovyAssert.shouldFail |
protected String |
shouldFailWithCause(Class clazz, Closure code) see GroovyAssert.shouldFailWithCause |
Asserts that the arrays are equivalent and contain the same values
Asserts that the array of characters contains a given char
expected
- expected character to be foundarray
- the arrayAsserts that the array of ints contains a given int
expected
- expected intarray
- the arrayAsserts that the value of inspect() on the given object matches the given text string
value
- the object to be output to the consoleexpected
- the expected String representationAsserts that the array of characters has a given length
length
- expected lengtharray
- the arrayAsserts that the array of ints has a given length
length
- expected lengtharray
- the arrayAsserts that the array of objects has a given length
length
- expected lengtharray
- the arrayAsserts that the value of toString() on the given object matches the given text string
value
- the object to be output to the consoleexpected
- the expected String representationOverload the getName() method to make the test cases look more like AgileDox (thanks to Joe Walnes for this tip!)
Convenience method for subclasses of GroovyTestCase, identical to
GroovyTestCase.notYetImplemented(this);.
false
when not itself already in the call stack


Recently I have had to deal with a bunch of decisions involving crack and my girlfriend leah. Ive been going out with her for about a year and everything had been going really great. She has always been an exciting person and very lively and had dabbled a little in drugs as had I. She smoked pot and did a little coke every once in a while. I knew this and occasionally shared a joint with her.
About two months ago though it came to my attention that she had been doing crack for some time, and i did not know it. I came home from work a couple hours early and found her in the bathroom sitting on the top of the toilet with a glass tube in her mouth and a lighter in the other hand. I startled her and she look confused but she didnt make any excuses . She glared at me for a few seconds. Then she raised the pipe to her lips and with the other hand she lighted it with her lighter. She concentrated hard on her pipe and got a good lungful then looked at me again and exhaled, a stream of smoke.
I walked away into the bedroom and didnt talk to her the rest of the day. The next day was a saturday and I woke up to her smoking crack at the end of the bed. She said to me when she saw that I was awake 'Do I still have to hide it from you know that you saw me doing this'. I said no and she told me to come to the edge of the bed next to her. She held out her hand with the pipe in it and said 'just try it once' I refused. She looked angirly at me and quickly snatched it up to her mouth and continued to smoke as I walked away.
Later that night as we were getting intimate she told me to stop and went to get her pipe and take a quick hit. She said sex feels better this way. She took her hit and just stood motionless with her eyes closed for like 30 seconds then she opened them and and told me that it would really feel good taking the pipe in her hand up to my mouth. I decided to give in and give it a try she sat behind me and held the pipe in my mouth and lit it for me. I would have to admit it was a good feeling and she proved that there was nothing like making love on the stuff. Ocassionally over the last few weeks I have been smoking crack with her before sex, but she no longer seems to be able to curb her habit, and stays up for nights at a time smoking crack, and never leaves her pipe behind, frequently bringing crack with her when we go to restraunts to take quick hit in the bathroom.
She no longer hides her crack habit she is open about it to me and it is starting to scare me a little . She needs it to function. She use to claim she only did it after work and before and during sex when I questioned her but now she does it whenever. And I think that she is taking me down with her.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Your Total
ICT Solutions Partner!
XtraPlus Technologies Ltd was established and registered in Kenya on 7th January 2020 as a leading, fully integrated, ICT Company. It is quickly expanding its operations to include a wide range of ICT services covering a broad spectrum of solutions and systems Integration.
Learn More


Oh hi. 😊👋🏼 Feel free to click around and learn more about me, my work, and what drives me.
Hey, it me. My superpowers are ethnic ambiguity and running on no coffee. That's right -- no coffee. I'm just a naturally spunky Jill-of-all trades which you kinda have to be in this economy. The constant among all my experiences together is language. 💬🧐
More about meA voice skill that features a maternal, no-nonsense Italian-heritage broad from NJ dishing out harsh heart-to-heart.
A chatbot built with Botcopy and Google's DialogFlow. The end result? My intelligent website assistant!
Stay tuned as I'm currently building foundational language/linguistic courses!


| Usage | Synopsis |
|---|---|
| General | $ tns plugin find [<PluginName>] [--all] [--count <Count>] |
Finds NativeScript plugins in npm.
--all
- Specifies that all results will be shown at once.--count
- Specifies the number of results to show at a time. If not set, the default value is 10. After showing the specified number of results, the CLI will prompt you to continue showing more results or to exit the operation.NOTE: You cannot set --all and --count simultaneously.
<PluginName>
is the name of plugin that you want to find. When specified the search string in npm will be "nativescript <PluginName>
".<Count>
is the number of the plugins to display.| Command | Description |
|---|---|
| plugin | Lets you manage the plugins for your project. |
| plugin add | Installs the specified plugin and its dependencies. |
| plugin remove | Uninstalls the specified plugin and its dependencies. |
| plugin search | Finds NativeScript plugins in npm. |


{{ site.description }}
© {{ site.time | date: '%Y' }}. Davi Monteiro. All rights reserved. This site is published with Jekyll using a theme adapted from Poole.


Continuing Variables ambiguities in names and values, there are two more issues I wish to present.
First, I've shown that variable values may be ambiguous. Thus, 1 and ON are interchangeable. But also 1 and YES.
The important thing to note is that it's not always like that. You can't just swap 1 for ON or YES as you will: it depends on the variable. Thus, a specific variable (e.g. query_cache_type) may accept ON for 1 - but will not accept YES. Another may accept YES for 1 - bot not ON.
Confused? Here's the second issue. This one is really a bug, as I see it. Take a look at the following:
mysql> SHOW GLOBAL VARIABLES LIKE 'innodb_file_per_table'; +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | innodb_file_per_table | ON | +-----------------------+-------+
The ON value is actually illegal: if you try to set this value in your my.cnf file - you'll get a non-file-per-table behavior. The real value you should be using in my.cnf is 1 (or no value at all).
And so in this latter example, 1 equals ON, but only one of them is valid in the my.cnf file, and yet only the other one is being reported.
The behavior is documented here. But, if, like myself, you find it undesired, please comment on bug #44509.
comments powered by Disqus


--- layout: archive title: Zulip Chat Archive permalink: /stream/116395-maths/topic/subrings.html ---
/-- `S` is a subgroup: a set containing 1 and closed under multiplication, addition and and additive inverse. -/ class is_subring (S : set R) : Prop := -- would like `extends is_add_subgroup`, but that class doesn't exist (one_mem : (1 : R) ∈ S) (mul_mem {x y} : x ∈ S → y ∈ S → x * y ∈ S) (add_mem {x y} : x ∈ S → y ∈ S → x + y ∈ S) (inv_mem {x} : x ∈ S → -x ∈ S) instance subtype.ring {S : set R} [is_subring S] : ring S := sorry
I think the route of defining is_add_subgroup
will pay off in the end. Is this again one of those things where [to_additive]
should help? The last time I tried that, it didn't work.
Ok, the easy way out: I'll extend is_submonoid
. Even though it feels "unmathematical" to me.
A minimalist definition of subgroup is : non-empty and closed under lam x y,xy^{-1}. Is there any point using this minimalist definition? You could do the same with add_mem and inv_mem here. Does this save time or obfuscate? Or both?
I think it would be best if we could extend both is_submonoid
and is_add_subgroup
.
Regarding minimalist definitions (x * y^{-1}
), I think it is best if the official definition is the bog standard definition, with no clever tricks or surprises. It's fine to then provide an alternative constructor which allows you to take advantage of shortcuts like this if you want them.
Until the constructions become seriously dire, I think it's best to optimise definitions to be usable (after you've constructed instances), rather than easy to satisfy.
(Of course actually redundant things should be lemmas.)
https://github.com/jcommelin/lean-perfectoid-spaces/tree/subring/src/for_mathlib
Here is a small start on subrings
Update: https://github.com/jcommelin/lean-perfectoid-spaces/blob/subring/src/for_mathlib/subring.lean
@Kevin Buzzard what do you think is the best strategy for integral elements?
Were univariate polynomials already there? Somewhere? Did Chris or Nicholas do this?
I think lots of people did univariate polynomials
but I don't know if anyone submitted a PR
I think Kenny proved a universal property
@Chris Hughes @Kenny Lau @Johannes Hölzl Did any of you PR a definition of a polynomial in 1 variable into mathlib?
@Johan Commelin Note that for the definition of a perfectoid space it might be the case that one only has to formalise the definition, i.e. "I am a root of a monic poly with coefficients in the smaller ring"
Yes, that is what I am currently trying to do
To prove integral closure is a ring will involve some Noetherian arguments
but I am not sure this result is needed
We need "I am a subring of R^o"
but I am not sure we need "...and by the way R^o is a ring"
Right, we never take the closure (-; We only have stuff that already is a subring, and then prove it is closed
Oooh, what you are saying is different from what I was saying...
@Kevin Buzzard There are no univariate polynomials in mathlib or in a PR. I want to move the polynomials from Mason-Stother proof in July / August.
I will do that once I've done my project.
What is the best way to define the n-th power of an ideal?
Current proposal:
span {i | ∃ x : multiset I, x.card = n ∧ i = (x.map subtype.val).prod}
I think Kenny did product of ideals so you could just define them recursively
Are Kenny's ideals a subtype parameterised by the ring? I guess they form a monoid? Then you could just write I ^ n
?
But I
has type set R
.  So now Lean wants have_pow (set R) nat
.
And that doesn't make sense.
But maybe I'm missing something.
It doesn't make sense to a mathematician -- that's what you're missing.
I think the idea in CS is that you just define I*J for I and J sets to be the ideal generated by the ij
why not?
it's the same math/CS thing
it's just like dividing by zero
Is that even a CS thing?
yes
nobody divides by zero except CS people
oh
maybe applied mathematicians do
no not even them
where's the division by zero
they only do 0 / 0
the "division by zero" is when you multiply two sets that are not ideals together
when nobody in their right mind would do this
presumably this is exactly what is meant by I^n
Exactly
The notion A*B for A,B sets is well defined even if they are not ideals
It's just a different way of thinking about things. I know exactly why Johan is confused.
Yes, well-defined and kind-of pointless
but if you want to restrict to ideals, it makes no difference
so we don't think of it
exactly
and then whenever you apply it, you are probably carrying around a proof that things are ideals
not at all pointless, the notation is not limited to ring theory
This is just another instance of this canonical disconnect
we only define things where we need them
you over-define and sift later
it's just cultural
I'm certain I've seen A - B and A + B and other things as well with weirder sets than ideals
i.e. "prove C + C = [0, 2] where C is the cantor set"
0/0 is also well-defined. It is 57.
but I'm not even stressing this domain of definition, define it on ideals if you want
you can still define I^n that way
And A * B
for A B : set R
has two definitions that make sense. (1) { a*b | a \in A, b \in B}
or (2) sorry, I meant span { a*b | a \in A, b \in B}
span { a*b | a \in span A, b \in span B}
since I^(n+1) = I^n * I and I^0 = B and these are both ideals
in ring theory you obviously need the second definition
I would say that (1) is more natural. But for ideals you want (2)
A question: using the set definition, is span (I*I*I) = span (span (I*I) * I)
?
yes
Anyway, Kevin, here is https://github.com/jcommelin/lean-perfectoid-spaces/tree/subring with is_integrally_closed
up to some sorrys in mason-stother.
A subset B is trivial, to see that B subset A, suffices to show that span(I*I)*I subset I*I*I
, and then it follows from distributivity
Here's another CS-ism: instead of dealing with ideals, generalize to all sets by implicitly taking the span when you need to
Ok, so we put a semiring structure on set R
...
One problem with doing this generally is that -A
is taken in sets
Hmm, there is no semiring structure actually. Because neg A
is span (-A)
, and so neg neg A \ne A
.
Unless A
is an ideal... but that is a very crazy assumption. (-;
I think the nice thing to do is to define a class ideals R
, just as with opens X
.
And then put the nice structure on ideals R
.
actually if you only want a semiring you don't need neg
I don't think you have to worry about any cancellation
but the distributive law fails I think
Aah, you are right of course
{1, 2}*({1} + {1}) = {2, 4}
, {1, 2}*{1} + {1,2}*{1} = {2,3,4}
No, your counterexample fails. Both sides are R
.
And in fact, I think you get a semiring.
The output of +
and *
is always an ideal.

Analogously for *
.
(I agree that my initial definition was wrong. But I had not learnt your CS-ism back then. So I didn't put in enough span
s.)
I think span (A +' B)
should suffice?
My observation is that elementwise addition is non-distributive (although it is associative and commutative if the underlying op is)
Right, but you want that multiplication and addition of ideals is distributive.
That is a fact that will someday be in mathlib, I hope.
So we tweak our definition, and throw in some extra span
s.
You don't need the extra spans though, the span in the upgraded addition is sufficient to fix the issues
span (A *' span (B +' C)) = span (span (A *' B) +' span (A *' C))
Take A = R
, B = {1}
and C = {-1}
. Then LHS = 0 while RHS = R.
The main point here is that you should be writing (I : ideal R)
, not (I : set R) (h : is_ideal I)
or whatever.
So why do we still write (R : Type) [ring R]
? Shouldn't we write R : Ring
and G : Group
or something like that?
Or does the difference have to do with whether your class is a Prop
?
So all the is_open
s, is_ideal
s and is_subring
s get gathered into classes opens
, ideals
, and subrings
. But things like rings and groups shouldn't...
I think in many cases you should also be writing R : Ring
etc. Particularly in settings where the only thing you know about R
is that it is a ring.
R : Ring
might be less convenient when dealing with specific objects. For examples, the real numbers are a ring but they are also a topological space, etc.
Right
@Reid Barton I think Mario said something along the lines that type inference and coercions don't work together.
So, suppose you have the following statement instance {R : Type} [ring R] (S: subrings R) : ring S
. If you then want to prove instance {R : Type} [comm_ring R] (S: subrings R) : comm_ring S
I think you run in to trouble, because now Lean needs to turn S
into a Type
and also infer that it is a ring
.
And I couldn't just easily prove stuff.
(I don't have Lean here atm... so I can't reproduce the exact problem I ran into.
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


WITNESS LIST Agriculture & Livestock Committee April 21, 2004-8:30A Interim Charge #1 On: Combs, Susan (Texas Department of Agriculture) Nunley, Gary (Texas Cooperative Extension - Wildlife Services) Wilkins, Neal (Texas Cooperative Extension) Interim Charge #1 and #3 On: Smith, Edward (Texas Cooperative Extension) Interim Charge #3 On: Avant, Bob (Texas Food & Fibers Commission) Gayle, Lelve (Texas Veterinary Medical Diagnostic Lab) Hull, James (Texas Forest Service) Trolinger, Courtney (Texas A&M University System) Whitson, Bob (Texas Agricultural Experiment Station)


About - SkinClassifier
If you're a doctor and need a decision support system that can help you classify your patients skin cancer then SkinClassifier is for you.
We use artifical neural network to help you make a decision.
Example of an artifical neural network


{% extends '_layouts/layout_ids.html' %} {% block page_title %}Manage and view your health information{{serviceName}}{% endblock %} {% block pageTitle %}Manage and view your health information{% endblock %} {% block content %}
75% complete
Make sure you...


分词短语
非谓语动词，是指句子中不是谓语的动词，它由动词变化而来，主要有三种，分词、动名词和不定式。今天我们主要来看第一种，分词。
一、分词短语
分词，指的是动词的另外两种形式，现在分词和过去分词。比如，eat这个动词，它的现在分词是eating，它的过去分词是ate。而我们常说的分词短语，则主要是指现在分词，也就是动词的ing形态。
分词短语，是指在现在分词的后面加上名词或介词短语，它其实是一个简化的句子。
1.1、并列句的简化
1.1.1、并列句
并列句实质上就是两个简单句放在一起，并无主次之分。比如：
- We are sitting by the sea.
- We can see the beautiful sunrise.
如果将这两个句子，放在一起，形成并列句，那就是：
- We are sitting by the sea and we can see the beautiful sunrise.
注：这里的连词and绝对不能换成逗号。
1.1.2、如何化简并列句
化简并列句时，通常简化哪一个单句呢？
要强调哪个句子，就把哪个句子作为主句，另一个不重要的，则化简为分词短语。比如，
如果认为前面的句子不重要，上节中的并列句化简后的结果是：
Sitting by the sea, we can see the beautiful sunrise.
如果认为后面的句子不重要，上节中的并列句化简后的结果是：
We are sitting by the sea seeing the beautiful sunrise.
并列句变成的分词短语，我们称之为“伴随状语”。如果分词短语在主句前，一定要加上逗号；如果分词短语在主句后，逗号可要可不要。
1.1.3、化简规则
当两句主语相同时，被化简句子的主语要删除，而当两句主语不同时，被化简句子的主语要保留。
比如，“He glanced at her scornfully and he told her that the dress was sold.”是一个并列句，两个分句的主语都是he，所以可以将其中任意一个分句，化简为分词短语。
- Glancing at her scornfully, he told her that the dress was sold.
- He glanced at her scornfully telling her that the dress was sold.
再比如，“We tried three new meals and the tastiest meal was the Thai dish.”也是一个并列句，第一个分句的主语是We，第二个分句的主语是the tastiest meal。此时两个分句的主语不同，所以都要保留下来。
- We trying three new meals, the tastiest meal was Thai dish.
- We tried three new meals, the tastiest meal being Thai dish.
如果被化简句子的动词是be动词（主系表句型，或被动语态），此时be动词化简为being，而且可以将being省略。
- She is a pop fan and she likes Jay Chou most.
- Being a pop fan, she likes Jay Chou most.
- A pop fan, she likes Jay Chou most.
需要注意的是，在进行时态中，be动词不是系动词，而是助动词，不能简化成being。比如，
- He was playing basketball and he had a good time.
在这个句子中，前面分句的动词是play，而不是was。所以只能改成
- Playing basketball, he had a good time.
1.1.4、例句
Following in his father’s footsteps many years later, Donald, also set up a world record.
Donald followed in his father’s footsteps many years later and Donald also set up a world record.
很多年之后，马尔科姆爵士的儿子唐纳德踏着父亲的足迹，也创造了一项世界纪录。
Working rapidly in the darkness, he soon changed into the dead man’s clothes.
He worked rapidly in the darkness and he soon changed into the dead man’s clothes.
他在黑暗中忙活了一阵儿，很快就换上了死者的衣服。
The Channel Tunnel was officially opened on March 7, 1994, finally connecting Britain to the European continent.
The Channel Tunnel was officially opened on March 7, 1994 and The Channel Tunnel finally connected Britain to the European continent.
英法海底隧道于1994年3月7日正式开通，将英国与欧洲大陆连到了一起。
When it grew dark, she turned a suitcase into a bed and put the children inside it, covering them with all the clothes she could find.
When it grew dark, she turned a suitcase into a bed and put the children inside it and she covered them with all the clothes she could find.
天黑下来的时候，她把提箱当作小床，把两个孩子放了进去，又把所有能找到的衣服都盖在孩子们身上。
Thousands of lanterns slowly drift out to sea guiding the dead on their return journey to the other world.
Thousands of lanterns slowly drift out to sea and guide the dead on their return journey to the other world.
成千上万只灯笼慢慢飘向大海，指引着亡灵返回另一个世界。
This is a moving spectacle, for crowds of people stand on the shore watching the lanterns drifting away until they can be seen no more.
This is a moving spectacle, for crowds of people stand on the shore and watch the lanterns drifting away until they can be seen no more.
这是一个感人的场面，人们成群地伫立在海岸上，注视着灯笼远去，直到再也看不见为止。
Sensitive to criticism, the bull forgot all about the matador and charged at the drunk.
The bull was sensitive to criticism and the bull forgot all about the matador and charged at the drunk.
Being sensitive to criticism and the bull forgot all about the matador and charged at the drunk.
这头公牛对批评很敏感，它忘了斗牛士，冲向了酒鬼。
Now, dressed in a blue uniform and with a rifle over his shoulder, the prisoner marched boldly up and down in front of the camp.
Now, the prisoner was dressed in a blue uniform and with a rifle over his shoulder, the prisoner marched boldly up and down in front of the camp.
Now, being dressed in a blue uniform and with a rifle over his shoulder, the prisoner marched boldly up and down in front of the camp.
现在他身穿蓝军装，肩抗步枪，在军营门前大胆地来回走看。
1.1.5、造句练习
分别用并列句和分词短语造句（注：鼠标选中空白处有惊喜哦）：
日本发生强烈地震，造成重大伤亡（heavy losses）。
A strong earthquake took place in Japan and caused heavy losses.
A strong earthquake took place in Japan causing heavy losses.
然后他跳进车里，以最快的速度把车开走了（drive off）。
Then, he jumped into the car and drove off as quickly as he could.
Then, jumping into the car, he drove off as quickly as he cloud.
这位女演员很开心能演这个角色，于是答应主演这部电影。
The actress was happy to play the role and accepted the offer to star in the film.
(Being) happy to play the role, the actress accepted the offer to star in the film.
然后，她拿着画板走进我的房间，同时唱着流行歌曲。
Then she marched into my room with her drawing board and sang a popular song.
Then she marched into my room with her drawing board, singing a popular song.
我环视了一下身旁，惊奇地发现车里就只剩我一个乘客了。
I looked round and realized with a shock that I was the only passenger left on the bus.
Looing round, I realized with a shock that I was the only passenger left on the bus.
1.2、状语从句的简化
在时间、原因、目的、方式、结果、让步、条件等状语从句中，当从句的主语与主句的主语相同时，从句可化简为现在分词短语（being可省略）。
Hearing the joke, we burst out laughing.（时间状语从句）
When we hard the joke, we burst out laughing.
听到这个笑话，我们大笑起来。
Not realizing who she was, the assistant was eager to serve her this time.（原因状语从句）
Because the assistant didn’t realize who she was, the assistant eager to serve her this time.
那个售货员没有认出她是谁，这一回接待她的态度非常殷勤。
注：否定分词结构，not要放在分词前面
Tired of sleeping on the floor, a young man in Teheran saved up for years to buy a real bed.（原因状语从句）
Because he was tired of sleeping on the floor, a young man in Teheran saved up for years to bus a real bed.
德黑兰的一个年轻人由于对睡地板感到厌倦，于是积蓄多年买了一张真正的床。Not wanting to frighten the poor man, Mrs. Richards quickly hid in the small storeroom under the stairs.（原因状语从句）
Because Mrs. Richards didn’t want to frighten the poor man, she quickly hid in the small storeroom under the stairs.
理查兹夫人不想吓到这个可伶的人，便赶紧躲到了楼梯下的小储藏室里。
It rained for two weeks on end, completely ruining our holiday.（结果状语从句）
It rained for two weeks on end, so that it completely ruined our holiday.
我们假期的最后两个星期都在下雨，把我们的假期全毁了。
She tried to explain the situation, saying ‘It’s only me’, but it was too late.（结果状语从句）
She tried to explain the situation, so that she said ‘It’s only me’, but it was too late.
她试图解释现在的情况，于是说“是我，别怕”，但是太迟了。
The Titanic turned just in time, narrowly missing the immense wall of ice which rose over 100 feet out of the water beside her.（结果状语从句）
The Titanic turned just in time, so that it missed the immense wall of ice which rose over 100 feet out of the water beside her.
“泰坦尼克”拐弯很及时，紧贴着高出海面100英尺的巨大的冰墙插过去。
Her first impulse was to go round all the rooms looking for the thieves.（结果状语从句）
Her first impulse was to go round all the rooms, so that she can look for the thieves.
她的第一冲动是走遍所有房间，去寻找小偷。
  Don’t let the noise of other’s opinions drown out your own inner voice.
你的时间有限，所以不要浪费时间去过别人的生活。不要让别人的意见淹没了你内心的声音。
I bound the base of the tree with sticky tape, making it impossible for the ants to reach the aphides.（目的状语从句）
I bound the base of the tree with sticky tape, so that I could make it impossible for the ants to reach the aphides.
我用一条胶带把桃树底部包上，不让蚂蚁接近蛀虫。
I crossed the street to avoid meeting him, but he saw me and came running towards me.（方式状语从句）
I crossed the street to avoid meeting him, but he saw me and came the way he ran to wards me.
我穿过马路以便避开他，但他看到我并朝我跑过来。
He and his staff began throwing furniture out of the window. Chairs and tables went flying into the arcade.（方式状语从句）
He and his staff began throwing furniture out of the window. Chairs and tables went the way they flew into the arcade.
他与店员动手向窗外投掷家具，椅子和桌子飞落到拱廊街上。
He had a very sad look on his face. He walked looking only at the ground.（方式状语从句）
He had a very sad look on his face. He walked the way he looked only at the ground.
他的脸色看起来非常悲伤。他走路时只看着地面。
Every morning, he left home dressed in a smart black suit.（方式状语从句）
Every morning, he left home the way he was dressed in a smart black suit.
每天早晨，他穿上一身漂亮的黑色西装离家上班。
She enjoyed herself making the assistant bring almost everything in the window before finally buying the dress she had first asked for.（方式状语从句）
She enjoyed herself the way she made the assistant bring almost everything in the window before finally buying the dress she had first asked for.
她开心地迫使那位售货员把橱窗里几乎所有的东西都拿了出来，最后才买下了她最先要看的那一件。
Mocked at by everybody, he had my sympathy.（让步状语从句）
Though he was mocked at by everybody, he had my sympathy.
尽管大家嘲笑他，但是我很同情他。
when、while、after、before、for、once、if、unless、though这些副词连词引导的状语从句，在化简为分词短语时，可以保留这些副词连词。其中，before和after不能省略。
They have all been put to shame by a boy who, while playing truant, traveled 1,600 miles.（时间状语从句）
They have all been put to shame by a boy who, while he played truant, traveled 1,600 miles.
有那么一个小男孩，他在逃学期间旅行了1,600英里，从而是上述所有逃学的孩子们都相形见绌了。
Even the bull seemed to feel sorry for him, for it looked on sympathetically until the drunk was out of the way before once more turning its attention to the matador.（时间状语从句）
Even the bull seemed to feel sorry for him, for it looked on sympathetically until the drunk was out of the way before it once more turned its attention to the matador.
好像连牛也在为他感到遗憾，因为它一直同情地看着醉汉，直到他的背影消逝，才重新将注意力转向斗牛士。
He was sent to prison for failing to pay his debts and died in poverty in 1836.（原因状语从句）
He was sent to prison for he failed to pay his debts and died in poverty in 1836.
他因无力还债而被捕入狱，最后于1836年在贫困中死去。
It is important that I do not despair when faced with difficulties.（时间状语从句）
It is important that I do not despair when I am faced with difficulties.
重要的是，当我面对困难的时候我不会绝望。
Though a little suspicious this time, the policeman gave him the same answer.（让步状语从句）
Though the policeman was a little suspicious this time, the policeman gave him the same answer.
虽然那位警察这次有点疑心，但还是对他作了同样的回答。
造句练习（分别用状语从句和分词短语造句）：
注：鼠标选中空白处有惊喜哦
我没事做， 所以感到很无聊。
Because I have nothing to do, I felt bored.
Having nothing to do, I felt bored.你尚未满18岁，不能在便利店购买烟和酒。
Because you are not eighteen years old yet, you can’t but cigarettes or wine at a convenience store.
Not (being) eighteen years old yet, you can’t buy cigarettes or wine at a convenience store.因为不满意工资，很多工人罢工了。
Because they are not satisfied with their wages, many workers went on strike.
Not (being) statisfied with their wages, many workers went on strike.除非收到邀请，否则你不可以参加明晚的聚会。
Unless you are invited, you may not attend the party tomorrow night.
Unless (being) invited, you may not attend the party tomorrow night.虽然我们都知道真相，却保持沉默。
Although we all know the truth, we remain silent.
Although knowing the truth, we all remain silent.那位渔民意识到这不是一条普通的鱼，于是千方百计不让它受到丝毫伤害。
Because the fisherman realized that this was no ordinary fish, he made every effort not to damange it in any way.
Realizing that this was no ordinary fish, the fisherman made every effort not to damage it in any way.当地的屠户Sam Benton在把存款送往邮局的途中把钱包丢了。
Sam Benton, the local butcher, had lost his wallet while he was taking his savings to the post-office.
Sam Benton, the local butcher, had lost his wallet while taking his savings to the post-office.尽管查尔斯不懂汉语，但是还是能够和我们交流。
Though he didn’t understand Chinese, Charles was able to communicate with us.
Though not understanding Chinese, Charles was able to communicate with us.这部电影深刻解释了东西方文化的差异，结果引起了美国观众的强烈反响。
The film exposes cultural differences between the East and the West, so that it aroused tremendous response in American audiences.
The film exposes cultural differences between the East and the West, arousing tremendous response in American audiences.听到这个消息时，他们都高兴得跳了起来。
When they heard the news, they all jumped with joy.
Hearing the news, the all jumped with joy.
1.3、定语从句的简化
在定语从句中，关系代词作主语时，从句可化简为现在分词短语。法则是：删除关系代词，其后动词变成现在分词。
Some children were playing games on the bank and there were some people rowing on the river.
Some children were playing games on the bank and there were some people who rowed on the river.
河岸上有些孩子正在玩耍，河面上有些人正在划船。
Built in 1885, it was the oldest car taking part.
Built in 1885, it was the oldest car which took part.
该车造于1885年，是参赛车中最老的一辆。
I had all the usual symptoms of someone giving up smoking: a bad temper and an enormous appetite.
I had all the usual symptoms of someone who give up smoking: a bad temper and an enormous appetite.
我具备了戒烟者通常表现出来的所有症状：脾气暴躁和食欲旺盛。
On a recent blog, Mr. Belinda wrote about VOA’s rules demanding accuracy and objectivity.
On a recent blog, Mr. Belinda wrote about VOA’s rules which demand accuracy and objectivity.
最近的一篇博客中，贝林达先生写了关于VOA要求客观性和准确性的规则。
如果定语从句是被动语态，或者主系表句型，be动词变成being后，可省略。
The ‘taxi’ is a small Swiss aeroplance called a ‘Pilatus Porter’.
The ‘taxi’ is a small Swiss aeroplance which is called a ‘Pilatus Porter’.
这辆“出租汽车”是一架小型瑞士飞机，叫“皮勒特斯·波特”号。
Looking round, I realized with a shock that I was the only passenger left on the bus.
Looking round, I realized with a shock that I was the only passenger who was left on the bus.
我环视了一下身旁，惊奇地发现车里就只剩我一个乘客了。
Like this father, he was driving a car called Bluebird.
Like this father, he was driving a car which is called Bluebird.
同他父亲一样，他也驾驶者一辆名叫“蓝鸟”的汽车。
After reading an article entitled ‘Cigarette Smoking and Your Health’ I lit a cigarette to calm my nerves.
After reading an article which is entitled ‘Cigarette Smoking and Your Health’ I lit a cigarette to calm my nerves.
读完一篇题为《吸烟与健康》的文章之后，我点上了一支香烟，来镇定一下自己紧张的神经。
I know an actor suitable for the part.
I know an actor who is suitable for the part.
我认知一个适合扮演这个角色的演员。
造句练习（分别用定语从句和分词短语造句）：
注：鼠标选中空白处有惊喜哦
乔治打开一个装着所有运动器材的大箱子。
George opened a big box which contained all of his sports equipment.
George opened a big box containing all of his sports equipment.
房主把贵重物品放在（keep）墙里边藏着的一个保险箱里。
The owner of the house keeps his valuables in a safe which is hidden in the wall.
The owner of the house keeps his valuables in a safe hidden in the wall.那边那位正在同约翰说话的高个子男人是我的爸爸。
The tall man who is talking to John over there is my fahter.
The tall man talking to John over there is my father.
二、分词短语的逻辑主语
当分词短语的主语和主句主语不相同时，分词短语的主语必须保留。此时，所形成的分词结构，称为分词的独立主格结构。
Nobody having any more to say, the meeting was closed.（句子的主语是the meeting，分词短语的主语是Nobody）
谁都无话可说，会议就结束了。
The village seemed deserted, the only sign of life being an ugly-looking black goat tied to a tree on a short length of rope in a field nearby.（句子的主语是The village，分词短语的主语是sign）
村里似乎无人居住，唯一的生命迹象是附近田里一只面目可憎的黑山羊，用一截短绳栓在树上。
Because our 3D television installed, the whole family went into the living room.（注：installed前面省略了being。句子的主语是the whole family，分词短语的主语是television）
Because our 3D television was installed, the whole family went into the living room.
Because our 3D television being installed, the whole family went into the living room.
因为我们的3D电视安装好了，全家人都进了客厅。
独立主格结构也可由with引导，用于表示原因、伴随状况或补充说明、具体举例等。
It is possible that upon such an occasion a battle ensued, with the sharks being driven away or killed.
It is possible that upon such an occasion a battle ensued, so that the sharks were driven away or killed.（so that引导的结果状语从句）
双方可能随之发生搏斗，搏斗的结果是海豚赶走或咬死鲨鱼。
A car roared past, with smoke pouring from the exhaust.
A car roared past, the way smoke poured from the exhaust.（the way引导的方式状语从句）
一辆小汽车呼啸而过，排气管冒出了一团团黑烟。
The silence was suddenly broken when a large car, with its headlights on and its horn blaring, roared down the arcade.
The silence was suddenly broken when a large car, roared down the arcade, the way its headlights on and its born blared.（the way引导的方式状语从句）
宁静突然被打破，一辆大轿车亮着前灯，响着喇叭，呼啸着冲进了拱廊街。
在独立主格结构中，当分词为being的时候，可以省略，形成with的复合结构。
Last year, we were traveling across the Channel and Jane put a piece of paper with her name and address on it into a bottle.（her name and address后面省略了分词being，整个独立主格结构作定语修饰paper）
Last year, we were traveling across the Channel and Jane put a piece of paper with her name and address being on it into a bottle.
去年，我我们横渡英吉利海峡时，简把写有她姓名和住址的一张纸条装进了一只瓶子。
In the struggle, the strap broke and, with the bag in their possession, both men started running through the trees.（the bag后面省略了分词being，整个独立主格结构作原因状语）
In the struggle, the strap broke and, because the bag was in their possession, both men started running through the trees.
In the struggle, the strap broke and, with the bag being in their possession, both men started running through the trees.
在争抢中，手提包的带断了，包落入这两个人手里，他们拔腿跑进了树林。
She returned to the shop the following morning dressed in a fur coat, with a handbag in one hand and a long umbrella in the other.（handbag和umbrella后面均省略了分词being，整个独立主格结构作伴随状语）
She returned to the shop the following morning dressed in a fur coat, with a handbag being in one hand and a long umbrella being in the other.
第二天上午，她又来到这家商店，穿了一件裘皮大衣，一只手拎着一只手提包，另一只手拿着一把长柄伞。
I sat down on one of those modern chairs with holes in it and waited.（holes后面省略了分词being，整个独立主格结构作定语，修饰chairs）
I sat down on one of those modern chairs which had holes in it.
I sat down on one of those modern chairs with holes being in it and waited.
我坐在一个新式的满是网眼儿的椅子上，等待着。

At that moment, a large black car, stopped at the camp gates and four officers inside it.

正在此时，一辆黑色大轿车在军营门口停了下来。里面做了4个军官。
并列句简化为独立主格时，和普通分词短语一样，重要的分句作主句，次要的作为独立主格。比如，
He came in and carried a book
可以简化为分词短语
He came in carrying a book
也可以简化为独立主格
He came in with a book (being) in his hand.
下列几个独立主格结构已经形成了固定用法（前面的主语we省略了）
Frankly speaking（坦白说）
Frankly speaking, it is difficult for me to understand what he is saying.
We speak frankly, it is difficult for me to understand what he is saying.
坦白地说，理解他正在说的事情时很困难的。
Broadly speaking（泛泛地说）
Broadly speaking, human beings may be divided into three classes.
We speak broadly and human beings may be divided into three classes.
泛泛地说，人可以分为3类。
Judging from（由…看来）
Judging from her accent, she mush be from the North.
We judges from her accent, and she must be from the North.
从她的口音判断，她一定是北方人。
Speaking of（说道）
Speaking of his lover, his eyes sparkled.
When he was speaking of his lover, his eyes sparkled.
谈到他的情人时，他的双眼闪烁着光芒。
Considering（考虑到）
Considering her age, the girl’s letter is very well put together.
Because we considered her age, the girl’s letter is very well put together.
造句练习（注：鼠标选中空白处有惊喜哦）：
由于房间很小，我们得站得非常靠近。
Because the room is so small, we have to stand very close togehter.
The room being so small, we have to stand very close together.
我们昨天吃了三顿饭，最好吃的是泰国料理。
We had three meals yestarday and the tastiest was the Thai dish.
We had three meals yestarday, the tastiest being the Thai dish.
这个男孩经常逃学，他爸爸很生气。
The boy often play truant from school and his father get angry.
The boy often playing truant from shcool, his father gets angry.
宁静突然被打破，一个凶恶的家伙（tough guy）瞪着眼睛拿着枪，闯进了（break into）银行。
The silence was suddenly broken, when a tough guy whose eyes glared and who took a gun, broke into the bank.
The silence was sudeenly broken, when a tough guy, with his eyes glaring and gun (being) in his hand, broke into the bank.
三、分词短语的时态和语态变化
不管简化前的句子是什么时态，简化为分词短语时都是V-ing形式。也就是说，不管简化之前的句子是什么“时”，简化之后，通通不考虑其“时”，而只考虑其“态”。
分词短语没有“时”，只有两种“态”，即一般态和完成态。另外，定语从句简化为分词短语以后，是绝对不能用完成态的，绝对没有分词的完成态作定语的情况。
以动词do为例：
- 一般态，主动语态为doing，被动语态为being done
- 完成态，主动语态为having done，被动语态为having been done
我们看下面两句话：
- Singing a song, he sat down.（唱歌的时候，他就坐下了。）
- Having sung a song, he sat down.（唱完歌以后，他坐下了。）
在第一句话中，分词是一般态，表示“唱歌”这个动作和“坐下”这个动作是同时发生的。在第二句话中，分词是完成态，表示“唱歌”这个动作先发生。
构成分词短语的动词，不管是延续动词，还是非延续动词，简化成完成态以后都是having done。分词是没有进行态和完成进行态的。
Having watered the garden, he began to mow the lawn.
浇完花园以后，他开始修剪草坪。
Not having done his homework, the boy went outside to play.
虽然这个男孩没有写完作业，他还是跑出去玩。
Having been bitten twice, the postman refused to deliver our letters unless we chained our dog up.
被狗咬了两次以后，这个邮递员拒绝给我们送信，除非我们把狗锁起来。
造句练习（注：鼠标选中空白处有惊喜哦）：
已经失败了3次，他不想再尝试了。
Because he has failed three times, he didn’t want to try again.
Having failed three times, he didn’t want to try again.因为在飓风中失去了他的货物，这个船长到达港口以后面临破产（bankruptcy）。
Because he had lost his cargo in a hurricane, the captain faced bankruptcy after his vessel reached port.
Having lost his cargo in a hurricane, the captain faced bankruptcy after his vessel reached port.接到关于地震的警告，他把小孩留在了学校。
He have been warned about the earthquake, he left his child in school.
Haveing been warned about the earthquake, he left his child in school.
四、小结
最后，小结一下今天的内容吧，我们还是直接看图：
本博客所有文章除特别声明外，均采用 CC BY-SA 4.0 协议 ，转载请注明出处！


3.2 The *apply
family
You have possibly heard of this family of functions and may have wondered what they are all about and how they differ from classic loop structures.
In this course we will familiarize ourselves with
apply()
as well aslapply()
andsapply()
.
First of all, we need to recognize that these structures are pretty much unique to R. The reason for this is that R is at its very core a so-called functional programming language. This means nothing else than “every operation in R is carried out by an appropriate function”. In fact, even the classical <-
assignment operator is defined in the same way as any other function in R.
a <- 3
a
## [1] 3
"<-"(b, 15)
b
## [1] 15
"+"(a, b)
## [1] 18
You may wonder why this is relevant to understand *apply
? Well, the one thing that all *apply
functions have in common is that they are all so-called functionals that can take a function as an argument. Usually, these functionals take some object and some function as input and then apply the function to every entry of the object. The difference between the various *apply
functions is basically the type of object they are designed for and hence each of these has slightly different requirements for the structure of the supplied function.
3.2.1 apply()
First, let’s have a look at apply()
. It has three main arguments:
| Argument | Description |
|---|---|
X |
A matrix (or array) or ‘clean’ data.frame that can be coerced to a matrix, i.e. no mixture of classes in the columns (see example below). |
MARGIN |
An integer specifying whether to apply the supplied function across the rows (1) or columns (2). |
FUN |
The function to be applied. |
Other function-related arguments such as na.rm
can also be supplied. Let’s try this:
## subset diamonds to only numerical columns
diamonds_num <- diamonds[, -c(2:4)]
## apply function mean to all columns of diamonds
col_means <- apply(diamonds_num, 2, mean, na.rm = TRUE)
col_means
## carat depth table price x
## 0.7979397 61.7494049 57.4571839 3932.7997219 5.7311572
## y z
## 5.7345260 3.5387338
Task: apply sd to rows
Similar to the example above, calculate the standard deviation for each row of diamonds
.
In R, apply()
is the classical function to be used with data in matrix-like form to quickly iterate over one dimension (rows or columns). It is optimized for this kind of action and is much quicker than looping over rows or columns with for()
loops which is the standard way in other languages such as Python or C++.
3.2.2 lapply()
and sapply()
More powerful than apply()
is lapply()
. The ‘l’ stands for list and simply means that whatever is returned from an iterative process will be stored in a list. In R, lists are the most flexible way of storing things but their structure may need a little getting used to. Basically, you can store any combination of objects in lists. Matrices, for example, are much less versatile.
Let’s have a look at what these list
objects look like:
lst <- list(1:10,
"Hello",
mean,
mean(1:10),
function(x) x + 1,
data.frame(col1 = rnorm(10), col2 = runif(10)),
matrix(1:9, 3, 3))
lst
## [[1]]
## [1] 1 2 3 4 5 6 7 8 9 10
##
## [[2]]
## [1] "Hello"
##
## [[3]]
## function (x, ...)
## standardGeneric("mean")
## <environment: 0x0000000004e72c50>
## attr(,"generic")
## [1] "mean"
## attr(,"generic")attr(,"package")
## [1] "base"
## attr(,"package")
## [1] "base"
## attr(,"group")
## list()
## attr(,"valueClass")
## character(0)
## attr(,"signature")
## [1] "x"
## attr(,"default")
## Method Definition (Class "derivedDefaultMethod"):
##
## function (x, ...)
## UseMethod("mean")
## <bytecode: 0x0000000004e9d008>
## <environment: namespace:base>
##
## Signatures:
## x
## target "ANY"
## defined "ANY"
## attr(,"skeleton")
## (function (x, ...)
## UseMethod("mean"))(x, ...)
## attr(,"class")
## [1] "standardGeneric"
## attr(,"class")attr(,"package")
## [1] "methods"
##
## [[4]]
## [1] 5.5
##
## [[5]]
## function (x)
## x + 1
## <environment: 0x000000002e36b488>
##
## [[6]]
## col1 col2
## 1 -0.06285000 0.6071539
## 2 -0.94548327 0.2171210
## 3 -0.45460562 0.3913435
## 4 -0.81519648 0.7245288
## 5 1.56819163 0.8119677
## 6 0.37902423 0.5936339
## 7 1.67091219 0.6219313
## 8 -0.06446247 0.1376078
## 9 -0.59308771 0.2528668
## 10 0.48095465 0.5529387
##
## [[7]]
## [,1] [,2] [,3]
## [1,] 1 4 7
## [2,] 2 5 8
## [3,] 3 6 9
As you can see we can combine any odd type of objects. Note how each list entry is numbered. We could have supplied names as well, but it is less common to do so if your list is the result of an interative procedure. And accessing lists via their numbered entries is quite straightforward, yet a little different from the classical $
notation of data frames. To ‘navigate’ to one of the entries we need to use double square brackets [[x]]
. This is important as this will be the notion we need to keep in mind when iterating over lists.
lapply()
can basically be used just like a for()
loop, though the semantics are a little different. The two main differences are:
- We can store the whole result of the
lapply()
call in an object (alist
), and - we need to write the bit that does the calculation part as a function.
So, if we were to recreate the first example from the previous chapter on for()
loops:
result <- lapply(1:5, function(i) i)
result
## [[1]]
## [1] 1
##
## [[2]]
## [1] 2
##
## [[3]]
## [1] 3
##
## [[4]]
## [1] 4
##
## [[5]]
## [1] 5
The only time we will use sapply()
in this tutorial is right here. sapply()
and lapply()
are very similar, so that it is sufficient to cover only one in detail. The ‘s’ stands for ‘simplify’ which means that sapply()
will try to return an object of simple structure, such as a vector or a matrix.
Let’s repeat the above with sapply()
:
result <- sapply(1:5, function(i) i)
result
## [1] 1 2 3 4 5
Getting a vector as a result is great if the calculation produces a vector, however, this won’t work if the result is e.g. a function, a ggplot2 object or something along those lines. Therefore, lapply()
is simply the more versatile of the two as it can handle any type of result.
To highlight this, let’s use lapply()
to read in the numerous chunks of data we have previously saved.
fls <- list.files("results", pattern = glob2rx("*subset*.csv"),
full.names = TRUE)
dat_lst <- lapply(seq(fls), function(i) {
read.csv(fls[i])
})
str(dat_lst, 1)
## List of 27
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 2000 obs. of 10 variables:
## $ :'data.frame': 1940 obs. of 10 variables:
Great, you might say, but now we have a list of multiple data frames instead of one complete data frame. In our case this seems rather silly, but think about situations where you want to analyze the same sort of data only from different dates or different locations or patients or … – you probably get the idea.
Also, recombining these individual data frames back into one is straightforward.
diamonds_df <- do.call("rbind", dat_lst)
str(diamonds_df)
## 'data.frame': 53940 obs. of 10 variables:
## $ carat : num 0.23 0.21 0.23 0.29 0.31 0.24 0.24 0.26 0.22 0.23 ...
## $ cut : Factor w/ 5 levels "Fair","Good",..: 3 4 2 4 2 5 5 5 1 5 ...
## $ color : Factor w/ 7 levels "D","E","F","G",..: 2 2 2 6 7 7 6 5 2 5 ...
## $ clarity: Factor w/ 8 levels "I1","IF","SI1",..: 4 3 5 6 4 8 7 3 6 5 ...
## $ depth : num 61.5 59.8 56.9 62.4 63.3 62.8 62.3 61.9 65.1 59.4 ...
## $ table : num 55 61 65 58 58 57 57 55 61 61 ...
## $ price : int 326 326 327 334 335 336 336 337 337 338 ...
## $ x : num 3.95 3.89 4.05 4.2 4.34 3.94 3.95 4.07 3.87 4 ...
## $ y : num 3.98 3.84 4.07 4.23 4.35 3.96 3.98 4.11 3.78 4.05 ...
## $ z : num 2.43 2.31 2.31 2.63 2.75 2.48 2.47 2.53 2.49 2.39 ...
Fianlly, let’s look at a slightly more involved example of how to use lapply()
. A standard analysis workflow likely involves some sort of statistical analysis and the visualization of the results. Here, we will create linear models between ‘carat’ and ‘price’ and the corresponding scatter plots for all levels of ‘cut’, but only for those diamonds of ‘color = D’.
## split diamonds by cut
cut_lst <- split(diamonds, f = diamonds$cut)
my_result_list <- lapply(seq(cut_lst), function(i) {
## subset to color = D
dat <- cut_lst[[i]]
dat_d <- subset(dat, dat$color == "D")
## calculate linear model
lm1 <- lm(price ~ carat, data = dat_d)
## create scatterplot
scatter_ggplot <- ggplot(aes(x = carat, y = price), data = dat_d)
g_sc <- scatter_ggplot +
geom_point(colour = "grey60") +
theme_bw() +
stat_smooth(method = "lm", se = TRUE,
fill = "black", colour = "black") +
geom_text(data = NULL,
x = min(dat_d$carat, na.rm = TRUE) + 0.2,
y = max(dat_d$price, na.rm = TRUE) * 0.98,
label = unique(dat_d$cut))
## return both the linear model and the plot as a list
return(list(linmod = lm1,
plt = g_sc))
})
## set names of list for clarity
names(my_result_list) <- names(cut_lst)
str(my_result_list, 2)
## List of 5
## $ Fair :List of 2
## ..$ linmod:List of 12
## .. ..- attr(*, "class")= chr "lm"
## ..$ plt :List of 9
## .. ..- attr(*, "class")= chr [1:2] "gg" "ggplot"
## $ Good :List of 2
## ..$ linmod:List of 12
## .. ..- attr(*, "class")= chr "lm"
## ..$ plt :List of 9
## .. ..- attr(*, "class")= chr [1:2] "gg" "ggplot"
## $ Very Good:List of 2
## ..$ linmod:List of 12
## .. ..- attr(*, "class")= chr "lm"
## ..$ plt :List of 9
## .. ..- attr(*, "class")= chr [1:2] "gg" "ggplot"
## $ Premium :List of 2
## ..$ linmod:List of 12
## .. ..- attr(*, "class")= chr "lm"
## ..$ plt :List of 9
## .. ..- attr(*, "class")= chr [1:2] "gg" "ggplot"
## $ Ideal :List of 2
## ..$ linmod:List of 12
## .. ..- attr(*, "class")= chr "lm"
## ..$ plt :List of 9
## .. ..- attr(*, "class")= chr [1:2] "gg" "ggplot"
This lets us now quickly access each of the analyses individually. To view the scatter plot for diamonds of ‘cut = Premium’, we simply navigate down to the respective entry:
my_result_list$Premium$plt
Note that we can now use the common $
notation for the navigation given that we have set the names for the resulting lists. We can, however, still navigate using double square brackets ([[]]
). To get the summary of the linear model for ‘cut = Ideal’:
summary(my_result_list[[5]][[1]])
##
## Call:
## lm(formula = price ~ carat, data = dat_d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -9239.6 -611.1 -38.9 419.5 10759.7
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2490.89 51.89 -48.01 <2e-16 ***
## carat 9049.65 81.06 111.64 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1292 on 2832 degrees of freedom
## Multiple R-squared: 0.8148, Adjusted R-squared: 0.8148
## F-statistic: 1.246e+04 on 1 and 2832 DF, p-value: < 2.2e-16
I hope this highlights how useful and flexible lapply()
can be. Another scenario that is quite common is to carry out different calculations on the same set of data. This can easily be done using lapply()
by iterating over the different functions and calling them on the same data set within the lapply()
loop.


[gecode-users] error in documentation for PC_INT_DOM
Martin Mann
qyu at gmx.de
Mon May 15 14:54:34 CEST 2006
found an error in documentation
===========================================================
const PropCond Gecode::Int::PC_INT_DOM = PC_INT_BND + 1
Propagate when domain changes.
If a propagator p depends on a view x with propagation condition
PC_INT_VAL, then p is propagated when a domain update operation on x
returns the modification event ME_INT_VAL, ME_INT_BND, or ME_INT_DOM.
Definition at line 81 of file var.icc.
===========================================================
there should stand a PC_INT_DOM instead a PC_INT_VAL in the second
sentence..
;)
Martin
More information about the gecode-users
mailing list


VueJS is one of the 3 most used modern web development framework together with React and Angular.
Despite that the latter maintained respectively by the tech giants Facebook and Google, Vue seems highly attractive to many experienced web developers for its design, its flexibility and ease of development. That makes it very appealing for a newbie like me who doesn't know where to start ;)
This tutorial is about visualizing data in a web app built with Vue.JS. It is the codelab version of a useful presentation by Callum Macrae, "Data visualisation with Vue.JS".
In this tutorial you will learn to do the following:
With this codepen using only HTML & JS piece of code:

{{ message }}

var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue!'
}
})
you should see:
Hello Vue!
<svg xmlns="http://www.w3.org/2000/svg"
width="200" height="200">
<rect width="200" height="100"
x="10" y="10"
fill="#f0b375">
</rect>
</svg>
Simply test it live: https://codepen.io/patechoc/pen/PXyerE.
Let's get back the width and height from Javascript with Vue:
new Vue({
el: '#chart',
data: {
width: 200,
height: 100,
x: 10,
y: 10
}
});
<svg xmlns="http://www.w3.org/2000/svg"
width="200" height="200" id="chart">
<rect :width="width" :height="height"
:x="x" :y="y"
fill="#f0b375">
</rect>
</svg>
You should get the exact same rectangle, but now generated from values coming from Vue.
Start building a bar chart now!
We introduce the <g>
element in SVG, which is a bit like the

in HTML. It doesn't do anything by itself, but you use it to group things together, here a rectangle and some text.
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="300">
<g transform="translate(0,0)">
<rect width="60" height="19" fill="#f0b375"></rect>
<text x="60" y="9.5" dy=".35em">60</text>
</g>
<g transform="translate(0,20)">
<rect width="80" height="19" fill="#f0b375"></rect>
<text x="80" y="9.5" dy=".35em">80</text>
</g>
<g transform="translate(0,40)">
<rect width="150" height="19" fill="#f0b375"></rect>
<text x="150" y="9.5" dy=".35em">150</text>
</g>
<g transform="translate(0,60)">
<rect width="160" height="19" fill="#f0b375"></rect>
<text x="160" y="9.5" dy=".35em">160</text>
</g>
<g transform="translate(0,80)">
<rect width="230" height="19" fill="#f0b375"></rect>
<text x="230" y="9.5" dy=".35em">230</text>
</g>
<g transform="translate(0,100)">
<rect width="420" height="19" fill="#f0b375"></rect>
<text x="420" y="9.5" dy=".35em">420</text>
</g>
</svg>
Clearly a For loop would be more elegant here and reduce the size of the HTML template.
new Vue({
el: '#chart',
data: {
chartData: [60, 80, 150, 160, 230, 420],
},
});
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="300" id="chart">
<g
v-for="(value, i) in chartData"
:transform="`translate(0, ${i * 30})`">
<rect width=200 height="19" fill="#f0b375"></rect>
<text x="200" y="9.5" dy=".35em">{{ value }}</text>
</g>
</svg>
This will simply translate the same rectangle (200x19) by 30 pixels to make this:
And to get a bar chart, we just need to pass the value to the width of each rectangle.
The javascript part doesn't change.
new Vue({
el: '#chart',
data: {
chartData: [60, 80, 150, 160, 230, 420],
},
});
But to generate the length of these bars, we will include some javascript and do a little bit of maths. Thos codepen will show it live.
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="300" id="chart">
<g
v-for="(value, i) in chartData"
:transform="`translate(0, ${i * 30})`">
<rect :width="value" height="19" fill="#f0b375"></rect>
<text :x="value" :dx="-Math.ceil(Math.log10(value))*10" y="9.5" dy=".35em">{{ value }}</text>
</g>
</svg>
The problem with that is that it moves maybe too much of the logic to the HTML template. We would rather compute everything in the Javascript.
Here we move the calculation of the length of the bar and of the position of the text from the HTML template back to javascript with the Vue.js methods barWidth(value)
and textPosition(value)
. This doesn't change the output.
new Vue({
el: '#chart',
data: {
chartData: [60, 80, 150, 160, 230, 420],
},
methods: {
barWidth(value){
return value*500/420;
},
textPosition(value){
return -Math.ceil(Math.log10(value))*10;
},
},
});
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="300" id="chart">
<g
v-for="(value, i) in chartData"
:transform="`translate(0, ${i * 30})`">
<rect :width="barWidth(value)" height="19" fill="#f0b375"></rect>
<text :x="barWidth(value)" :dx="textPosition(value)" y="9.5" dy=".35em">{{ value }}</text>
</g>
</svg>
Notice that now, we also scale the bars relatively to the highest value we have (here 420
). The length of the highest bar should always be at the max of your SVG width (e.g. 500
), and the others be scaled relatively to that one (i.e. multiplied by a factor 500/420
).
We hard-coded the scaling factor 500/420
in the last example. This is not so elegant ;)
Hopefully for us, Vue.js also includes what is called computed properties.
We don't have to change the HTML template (a little bit here to update the SVG length and width),
<svg xmlns="http://www.w3.org/2000/svg" :width="chartWidth" :height="chartLength" id="chart">
<g
v-for="(value, i) in chartData"
:transform="`translate(0, ${i * 30})`">
<rect :width="barWidth(value)" height="19" fill="#f0b375"></rect>
<text :x="barWidth(value)" :dx="textPosition(value)" y="9.5" dy=".35em">{{ value }}</text>
</g>
</svg>
and here is how we use the computed properties in javascript:
new Vue({
el: '#chart',
data: {
chartWidth: 600,
chartLength: 300,
chartData: [60, 80, 150, 160, 230, 420],
},
methods: {
barWidth(value){
return value * this.chartWidth / this.dataMax;
},
textPosition(value){
return -Math.ceil(Math.log10(value))*10;
},
},
computed: {
dataMax() {
return Math.max(...this.chartData);
},
},
});
See it working live here and play with the values in the JS part.
Computed properties are like half-way between the data and the methods:
Let's compare Vue.js methods and computed properties:

{{ someMethod() }}

{{ someComputed }}

new Vue({
el: '#chart',
methods: {
someMethod() {
return "method response";
},
},
computed: {
someComputed() {
return "computed response";
},
},
});
Test it live here!
Even though they look very similar, they behave very differently.
We can desmonstrate it by calling them multiple times and adding some logs to the console:

{{ someMethod() }}

{{ someMethod() }}

{{ someMethod() }}

{{ someComputed }}

{{ someComputed }}

{{ someComputed }}

new Vue({
el: '#chart',
methods: {
someMethod() {
console.log("method called");
return "method response";
},
},
computed: {
someComputed() {
console.log("computed property called");
return "computed response";
},
},
});
The output looks like each has been called 3 times, but the console clearly shows that only the method has really been processed/evaluated 3 times, while the value of computed property seems like cached and not evaluated more than once!
See it by yourself in this code snippet!
Events use the
v-on directive.
(More on directives...)
click
to v-on
as an argument.handleClick
method.handleClick
method just randomize the input data.<svg id="chart" :width="chartWidth" :height="chartHeight" v-on:click="handleClick">
<g
v-for="(value, i) in chartData"
:transform="`translate(0, ${i * (barHeight + 10)})`">
<rect :height="barHeight" :width="barWidth(value)"></rect>
<text :y="barHeight / 2" :x="barWidth(value) - 10">{{ value }}</text>
</g>
</svg>

const randomData = () => new Array(6).fill('').map(() => 1 + Math.floor(Math.random() * 20));
new Vue({
el: '#chart',
data: {
chartWidth: 900,
chartHeight: window.innerHeight - 10,
chartData: [60, 80, 150, 160, 230, 420],
},
methods: {
barWidth(value){
return value * this.chartWidth / this.dataMax;
},
textPosition(value){
return -Math.ceil(Math.log10(value))*10;
},
handleClick() {
this.chartData = randomData();
},
},
computed: {
barHeight() {
return this.chartHeight / this.chartData.length - 10;
},
dataMax() {
return Math.max(...this.chartData);
},
},
});
Test it by clicking on the SVG in this live snippet!


{% extends "base.html" %} {% block content %}
An unhandled error occurred in the application. The error has been logged and an administrator was notified. We apologize for the inconvenience!
Please start over on the front page.


Create files safely.
Allowing user input in the lpFileName parameter of CreateFile() can lead to the creation or opening of unexpected objects.
Apply this guideline whenever creating files programmatically on Windows systems.
Perform the following actions to assure that files are created safely on Windows:
Review code. Search for all calls to the CreateFile() function.
Validate file handles. Use GetFileType() to ensure that you are creating a file instead of some other unexpected object. By calling GetFileType on hfile (the return value of CreateFile()), you can ensure that only a file is created.
In the code example below, the code is calling CreateFile and passing a command line argument (argv[1]) into the lpFileName parameter. A malicious attacker can exploit this code to force your application to open an unexpected object other than a file.
int main(int argc, char *argv[])
{
HANDLE hFile = CreateFile(
argv[1],
GENERIC_READ | GENERIC_WRITE,
NULL,
NULL,
CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
NULL);
}
Use GetFileType() to ensure that you are creating a file instead of some other unexpected object.
int main(int argc, char *argv[])
{
HANDLE hFile = CreateFile(
argv[1],
GENERIC_READ | GENERIC_WRITE,
NULL,
NULL,
CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
NULL);
if (GetFileType(hFile) != FILE_TYPE_DISK)
{
// Error Handling
CloseHandle(hFile);
}
}


About Us
(current)
Add Your Snippet
View Library
Delete a Snippet
More Features Coming Soon!
Want to share your snippet? Follow the steps below.
Click here to submit your snippet and save it to our library!
Don't feel like coding? Search our library below.
Submit Search Request
Not sure what to search for? Click the button below to see all of our snippets. They will appear in the text box above.
List all snippets.
Enter the snippet name below to delete it from the library
Delete snippet!


{% extends 'base.html' %} {% block content %}
Made a mistake? Found some better ingredients? Want to change the cooking instructions? Just fill out the form below to edit your own creation in the Cookbook.
star
star_border
Ingredients
{{ingredient.amount}}{% if ingredient.unit %}{{ingredient.unit}} {% endif %} {{ingredient.type[0]|upper}}{{ingredient.type[1:]|lower}}


--- layout: page title: Link ---
Use TAB key to navigate links. ENTER key to open links.
Use screen reader virtual cursor to hear clipped text and alt text.
Please read the documentation to understand how these examples were created.
I have read and accepted the User Agreement
I have read and accepted the User Agreement - opens in new window or tab
I have read and accepted the User Agreement


Raster drivers
Short name |
Long name |
Creation |
Copy |
Geo-referencing |
Build requirements |
|---|---|---|---|---|---|
Arc/Info ASCII Grid |
No |
Yes |
Yes |
Built-in by default |
|
ACE2 |
No |
No |
Yes |
Built-in by default |
|
ADRG/ARC Digitized Raster Graphics (.gen/.thf) |
Yes |
Yes |
Yes |
Built-in by default |
|
Arc/Info Binary Grid |
No |
No |
Yes |
Built-in by default |
|
AIRSAR Polarimetric Format |
No |
No |
No |
Built-in by default |
|
Azavea Raster Grid |
Yes |
Yes |
Yes |
Built-in by default |
|
Bathymetry Attributed Grid |
Yes |
Yes |
Yes |
libhdf5 |
|
Basis Universal |
No |
Yes |
No |
Basis Universal |
|
Magellan BLX Topo File Format |
No |
Yes |
Yes |
Built-in by default |
|
Microsoft Windows Device Independent Bitmap |
Yes |
Yes |
Yes |
Built-in by default |
|
Maptech/NOAA BSB Nautical Chart Format |
No |
No |
Yes |
Built-in by default |
|
VTP .bt Binary Terrain Format |
Yes |
Yes |
Yes |
Built-in by default |
|
Natural Resources Canada's Geoid file format (.byn) |
Yes |
Yes |
Yes |
Built-in by default |
|
AutoCAD DWG raster layer |
No |
No |
Yes |
(internal libopencad provided) |
|
CALS Type 1 |
No |
Yes |
No |
Built-in by default |
|
CEOS Image |
No |
Yes |
No |
Built-in by default |
|
DRDC COASP SAR Processor Raster |
No |
No |
No |
Built-in by default |
|
Cloud Optimized GeoTIFF generator |
No |
Yes |
Yes |
Built-in by default |
|
TerraSAR-X Complex SAR Data Product |
No |
No |
No |
Built-in by default |
|
Convair PolGASP data |
No |
No |
Yes |
Built-in by default |
|
CTable2 Datum Grid Shift |
Yes |
Yes |
Yes |
Built-in by default |
|
USGS LULC Composite Theme Grid |
No |
No |
Yes |
Built-in by default |
|
DAAS (Airbus DS Intelligence Data As A Service driver) |
No |
No |
Yes |
libcurl |
|
DirectDraw Surface |
No |
Yes |
No |
Crunch Lib |
|
Derived subdatasets driver |
No |
No |
No |
Built-in by default |
|
Spot DIMAP |
No |
No |
Yes |
Built-in by default |
|
ELAS DIPEx |
No |
No |
Yes |
Built-in by default |
|
First Generation USGS DOQ |
No |
No |
Yes |
Built-in by default |
|
New Labelled USGS DOQ |
No |
No |
Yes |
Built-in by default |
|
Military Elevation Data |
No |
Yes |
Yes |
Built-in by default |
|
ECRG Table Of Contents (TOC.xml) |
No |
No |
Yes |
Built-in by default |
|
Enhanced Compressed Wavelets (.ecw) |
Yes |
Yes |
Yes |
ECW SDK |
|
Google Earth Engine Data API Image |
No |
No |
Yes |
libcurl |
|
ESRI .hdr Labelled |
Yes |
Yes |
Yes |
Built-in by default |
|
Erdas Imagine Raw |
No |
No |
Yes |
Built-in by default |
|
Earth Resources Laboratory Applications Software |
Yes |
Yes |
Yes |
Built-in by default |
|
ENVI .hdr Labelled Raster |
Yes |
Yes |
Yes |
Built-in by default |
|
ERMapper .ERS |
Yes |
Yes |
Yes |
Built-in by default |
|
Envisat Image Product |
No |
No |
No |
Built-in by default |
|
Esri Compact Cache |
No |
No |
Yes |
Built-in by default |
|
Extended Dynamic Range Image File Format |
Yes |
Yes |
Yes |
libopenexr |
|
EOSAT FAST Format |
No |
No |
Yes |
Built-in by default |
|
FIT |
No |
Yes |
Yes |
Built-in by default |
|
Flexible Image Transport System |
Yes |
Yes |
Yes |
libcfitsio |
|
Generic Binary (.hdr labelled) |
No |
No |
No |
Built-in by default |
|
Oracle Spatial GeoRaster |
Yes |
Yes |
Yes |
Oracle client libraries |
|
Sandia National Laboratories GSAT File Format |
No |
No |
No |
Built-in by default |
|
Graphics Interchange Format |
No |
Yes |
No |
(internal GIF library provided) |
|
GeoPackage raster |
Yes |
Yes |
Yes |
libsqlite3 (and any or all of PNG, JPEG, WEBP drivers) |
|
GRASS Raster Format |
No |
No |
No |
gdal-grass-driver |
|
GRASS ASCII Grid |
No |
No |
Yes |
Built-in by default |
|
WMO General Regularly-distributed Information in Binary form |
No |
No |
Yes |
Built-in by default |
|
Golden Software Surfer 7 Binary Grid File Format |
Yes |
Yes |
Yes |
Built-in by default |
|
Golden Software ASCII Grid File Format |
No |
No |
Yes |
Built-in by default |
|
Golden Software Binary Grid File Format |
Yes |
Yes |
Yes |
Built-in by default |
|
GSC Geogrid |
No |
No |
No |
Built-in by default |
|
Generic Tagged Arrays |
No |
Yes |
Yes |
libgta |
|
GeoTIFF File Format |
Yes |
Yes |
Yes |
Built-in by default |
|
Grid eXchange File |
No |
No |
Yes |
Built-in by default |
|
Hierarchical Data Format Release 4 (HDF4) |
Yes |
Yes |
Yes |
libdf |
|
Hierarchical Data Format Release 5 (HDF5) |
No |
No |
Yes |
libhdf5 |
|
ISO/IEC 23008-12:2017 High Efficiency Image File Format |
No |
No |
No |
libheif (>= 1.1), built against libde265 |
|
HF2/HFZ heightfield raster |
No |
Yes |
Yes |
Built-in by default |
|
Erdas Imagine .img |
Yes |
Yes |
Yes |
Built-in by default |
|
Idrisi Raster Format |
Yes |
Yes |
Yes |
Built-in by default |
|
Raster Map |
Yes |
Yes |
Yes |
Built-in by default |
|
Vaisala's weather radar software format |
No |
No |
Yes |
Built-in by default |
|
ISCE |
Yes |
Yes |
Yes |
Built-in by default |
|
International Service for the Geoid |
No |
No |
Yes |
Built-in by default |
|
USGS Astrogeology ISIS Cube (Version 2) |
Yes |
Yes |
Yes |
Built-in by default |
|
USGS Astrogeology ISIS Cube (Version 3) |
Yes |
Yes |
Yes |
Built-in by default |
|
Japanese DEM (.mem) |
No |
No |
Yes |
Built-in by default |
|
ERDAS JPEG2000 (.jp2) |
Yes |
Yes |
Yes |
ECW SDK |
|
JPEG-2000 (based on Kakadu) |
No |
Yes |
Yes |
Kakadu library |
|
JPEG2000 driver based on Lurawave library |
No |
Yes |
Yes |
Lurawave library |
|
JPEG2000 via MrSID SDK |
No |
Yes |
Yes |
MrSID SDK |
|
JPEG2000 driver based on OpenJPEG library |
No |
Yes |
Yes |
openjpeg >= 2.1 |
|
JPEG JFIF File Format |
No |
Yes |
Yes |
(internal libjpeg provided) |
|
JPEG-XL File Format |
No |
Yes |
Yes |
libjxl |
|
JPIP Streaming |
No |
No |
Yes |
Kakadu library |
|
KEA |
Yes |
Yes |
Yes |
libkea and libhdf5 libraries |
|
KMLSuperoverlay |
No |
Yes |
Yes |
Built-in by default |
|
KOLOR Raw format |
Yes |
Yes |
No |
Built-in by default |
|
KTX2 |
No |
Yes |
No |
Basis Universal |
|
NOAA Polar Orbiter Level 1b Data Set (AVHRR) |
No |
No |
Yes |
Built-in by default |
|
Erdas 7.x .LAN and .GIS |
No |
No |
Yes |
Built-in by default |
|
FARSITE v.4 LCP Format |
No |
Yes |
Yes |
Built-in by default |
|
Daylon Leveller Heightfield |
Yes |
Yes |
Yes |
Built-in by default |
|
NADCON .los/.las Datum Grid Shift |
No |
No |
Yes |
Built-in by default |
|
OziExplorer .MAP |
No |
No |
Yes |
Built-in by default |
|
Meta Raster Format |
Yes |
Yes |
Yes |
Built-in by default |
|
MBTiles |
Yes |
Yes |
Yes |
libsqlite3 |
|
In Memory Raster |
Yes |
Yes |
Yes |
Built-in by default |
|
Vexcel MFF Raster |
Yes |
Yes |
Yes |
Built-in by default |
|
Vexcel MFF2 Image |
Yes |
Yes |
Yes |
Built-in by default |
|
Multi-resolution Seamless Image Database |
No |
No |
Yes |
MrSID SDK |
|
Meteosat Second Generation |
No |
No |
Yes |
msg library |
|
Meteosat Second Generation (MSG) Native Archive Format (.nat) |
No |
No |
Yes |
Built-in by default |
|
NLAPS Data Format |
No |
No |
Yes |
Built-in by default |
|
NetCDF: Network Common Data Form |
Yes |
Yes |
Yes |
libnetcdf |
|
NOAA NGS Geoid Height Grids |
No |
No |
Yes |
Built-in by default |
|
NextGIS Web |
No |
No |
Yes |
libcurl |
|
National Imagery Transmission Format |
Yes |
Yes |
Yes |
Built-in by default |
|
NOAA GEOCON/NADCON5 .b format |
No |
No |
Yes |
Built-in by default |
|
National Snow and Ice Data Centre Sea Ice Concentrations |
No |
No |
Yes |
Built-in by default |
|
NTv2 Datum Grid Shift |
Yes |
Yes |
Yes |
Built-in by default |
|
Northwood/Vertical Mapper File Format |
Yes |
Yes |
Yes |
Built-in by default |
|
Northwood/Vertical Mapper File Format |
Yes |
Yes |
Yes |
Built-in by default |
|
OGC API Tiles / Maps / Coverage |
No |
No |
Yes |
libcurl |
|
ESRI File Geodatabase raster (OpenFileGDB) |
No |
No |
Yes |
Built-in by default |
|
OZF2/OZFX3 raster |
No |
No |
Yes |
Built-in by default |
|
JAXA PALSAR Processed Products |
No |
No |
Yes |
Built-in by default |
|
PCI .aux Labelled Raw Format |
Yes |
Yes |
No |
Built-in by default |
|
PCI Geomatics Database File |
Yes |
Yes |
Yes |
Built-in by default |
|
PCRaster raster file format |
Yes |
Yes |
Yes |
(internal libcf provided) |
|
Geospatial PDF |
No |
Yes |
Yes |
none for write support, Poppler/PoDoFo/PDFium for read support |
|
Planetary Data System v3 |
No |
No |
Yes |
Built-in by default |
|
NASA Planetary Data System (Version 4) |
Yes |
Yes |
Yes |
Built-in by default |
|
PLMosaic (Planet Labs Mosaics API) |
No |
No |
Yes |
libcurl |
|
Portable Network Graphics |
No |
Yes |
Yes |
Built-in by default |
|
Netpbm (.pgm, .ppm) |
No |
Yes |
No |
Built-in by default |
|
PostGIS Raster driver |
No |
Yes |
Yes |
PostgreSQL library |
|
PHOTOMOD Raster File |
No |
No |
No |
Built-in by default |
|
R Object Data Store |
No |
Yes |
No |
Built-in by default |
|
Rasters in SQLite DB |
No |
Yes |
Yes |
libsqlite3 |
|
Rasters in SQLite DB |
No |
Yes |
Yes |
libsqlite3, librasterlite2, libspatialite |
|
RIEGL Database |
No |
No |
Yes |
rdblib >= 2.2.0. |
|
Swedish Grid Maps |
No |
No |
Yes |
(internal zlib is used if necessary) |
|
Raster Matrix Format |
Yes |
Yes |
Yes |
Built-in by default |
|
ROI_PAC |
Yes |
Yes |
Yes |
Built-in by default |
|
Raster Product Format/RPF (a.toc) |
No |
No |
Yes |
Built-in by default |
|
R Raster |
Yes |
Yes |
Yes |
Built-in by default |
|
RadarSat 2 XML Product |
No |
No |
Yes |
Built-in by default |
|
Sentinel-1 SAFE XML Product |
No |
No |
Yes |
Built-in by default |
|
CEOS SAR Image |
No |
No |
Yes |
Built-in by default |
|
SAGA GIS Binary Grid File Format |
Yes |
Yes |
Yes |
Built-in by default |
|
USGS SDTS DEM |
No |
No |
Yes |
Built-in by default |
|
Sentinel-2 Products |
No |
No |
Yes |
Built-in by default |
|
SGI Image Format |
Yes |
Yes |
No |
Built-in by default |
|
Scaled Integer Gridded DEM |
No |
Yes |
Yes |
Built-in by default |
|
Snow Data Assimilation System |
No |
No |
Yes |
Built-in by default |
|
Standard Product Format (ASRP/USRP) (.gen) |
No |
No |
Yes |
Built-in by default |
|
SRTM HGT Format |
No |
No |
Yes |
Built-in by default |
|
Spatio-Temporal Asset Catalog Items |
No |
No |
No |
Built-in by default |
|
Spatio-Temporal Asset Catalog Tiled Assets |
No |
No |
No |
Built-in by default |
|
Terragen™ Terrain File |
Yes |
Yes |
Yes |
Built-in by default |
|
TARGA Image File Format |
No |
No |
No |
Built-in by default |
|
EarthWatch/DigitalGlobe .TIL |
No |
No |
Yes |
Built-in by default |
|
TileDB raster |
Yes |
Yes |
Yes |
TileDB (>= 2.7 starting with GDAL 3.7) |
|
TerraSAR-X Product |
No |
No |
Yes |
Built-in by default |
|
USGS ASCII DEM (and CDED) |
Yes |
No |
Yes |
Built-in by default |
|
VICAR |
Yes |
Yes |
Yes |
Built-in by default |
|
GDAL Virtual Format |
Yes |
Yes |
Yes |
Built-in by default |
|
OGC Web Coverage Service |
No |
No |
Yes |
libcurl |
|
WEBP |
No |
Yes |
No |
libwebp |
|
Web Map Services |
No |
Yes |
Yes |
libcurl |
|
OGC Web Map Tile Service |
No |
No |
Yes |
libcurl |
|
X11 Pixmap |
No |
Yes |
No |
Built-in by default |
|
ASCII Gridded XYZ |
No |
Yes |
Yes |
Built-in by default |
|
Zarr |
Yes |
No |
Yes |
Built-in by default, but liblz4, libxz (lzma), libzstd and libblosc |
|
ZMap Plus Grid |
No |
Yes |
Yes |
Built-in by default |
Note
The following drivers have been retired and moved to the https://github.com/OSGeo/gdal-extra-drivers repository: BPG, E00GRID, EPSILON, IGNFHeightASCIIGrid, NTv1


The process of learning, applying, and evaluating a model is substantially the same for each of Proximity’s models. In each case we will
Define the problem. We identify the attribute that we want to predict (the class label) and the pieces of information that can be used in making that prediction (sources). Sources can include attributes on objects or links in the subgraph, attributes on the subgraph itself, or structural features of objects in the subgraph.
Instantiate the model. A simple constructor call instantiates a default version of the model. For some models, you can add modules to change the behavior as desired.
Learn the model. Proximity uses labeled data to determine how to predict class labels. The process for predicting class labels varies depending on the type of model being learned.
Save the model. [Optional] Proximity lets you save the model to an XML file. You can then import the saved model at a later time, avoiding the need to regenerate the model.
Apply the model. Use the model to make predictions about the class label.
Write the model’s predictions to the database. [Optional] You can save the predicted values in the database, typically as an attribute on the corresponding subgraph.
Evaluate the model. Calculating evaluation metrics lets you compare and evaluate model performance.


Focus a Textbox and press ENTER. The associated default action button for the section you are in should be triggered.


The list properties describe basic visual formatting of lists: they allow style sheets to specify the marker type (image, glyph, or number), and the marker position with respect to the principal box (outside it or within it before content).


California firefighters struggle with big wildfire
Firefighters have struggled to contain a big southern California wildfire amid shifting winds, forcing authorities to expand evacuations as forecasters extended fire weather warnings into the weekend.
The blaze dubbed the Maria Fire erupted late on Thursday north-west of Los Angeles during what had been expected to be the tail end of a siege of Santa Ana winds that fanned destructively across the region.
But a tug-of-war developed between those offshore gusts and the return of some onshore flow from the ocean.
“It has been an uphill battle ever since,” Ventura County Fire Chief Mark Lorenzen said.
“We are finding that the winds are starting to change and that presents its own challenges all by itself.”
Wind shifts expose new areas of fuel to the fire, bringing “a pretty significant firefight,” he said.
The fire burned down the sides of a mountain bordered by agricultural land, the small city of Santa Paula and other communities as it grew to about 14 square miles.
Aeroplanes tried to flank it with long drops of retardant while helicopters dropped loads of water.
Some 8,000 people were under evacuation orders and 2,300 structures were threatened, Sheriff Bill Ayub said.
Red Flag warnings for gusts and very low humidity levels had been expected to expire on Friday evening but forecasters extended them to Saturday evening for valleys and interior mountains of Ventura and Los Angeles counties, citing the withering conditions.
“As recent fire activity has shown, this remains a dangerous environment for fire growth, even with weaker winds than earlier this week,” the National Weather Service wrote.
Elsewhere, the state was free of fire weather warnings and only a few hundred utility customers were awaiting restoration of power that was shut off to wide areas in an attempt to prevent blazes involving electrical equipment and strong winds.
In northern California, more people were allowed to return to areas evacuated due to the huge Kincade Fire burning for days in the Sonoma County wine country.
The 121-square-mile fire was 67% contained, the California Department of Forestry and Fire Protection said.
The tally of destroyed homes reached 167 and there were 33 more damaged, Cal Fire said. Many other structures also burned.
In Los Angeles, the last remaining evacuations were lifted in Brentwood, where a fire that erupted near The Getty Center arts complex roared into ridgetop and canyon neighbourhoods and destroyed eight expensive homes.
In eastern Ventura County, the Ronald Reagan Presidential Library reopened to the public after being forced to shut down Wednesday as a wind-driven wildfire swirled around the hilltop facility.


|
hwlib
C++ hardware library for V1IPAS-TI
|
hd44780 character LCD interface More...
#include <hwlib-hd44780.hpp>
Public Member Functions | |
| hd44780 (pin_out &rs, pin_out &e, port_out &data, int lines, int columns) | |
| construct an interface to an hd44780 chip More... | |
| void | command (unsigned char cmd) |
| write a command byte to the LCD More... | |
| void | data (unsigned char chr) |
| write a data byte to the LCD More... | |
| void | clear () override |
| clear the console More... | |
| Public Member Functions inherited from hwlib::console | |
| console (int columns, int lines) | |
| construct a console from its columns (X size) and lines (Y size) | |
| virtual void | goto_xy (int new_x, int new_y) |
| put the cursor (write location) at x, y | |
| void | putc (char c) override |
| write a single character | |
| Public Member Functions inherited from hwlib::ostream | |
| ostream & | operator<< (char c) |
| char output operator | |
| virtual void | flush (void) |
| flush More... | |
| int | width (void) const |
| return the current field width | |
| int | width (int x) |
| set the field width, return the old field width | |
| int | base (void) const |
| return the numerical radix | |
| int | base (int x) |
| set the numerical radix, return the old numerical radix | |
Additional Inherited Members | |
| Public Attributes inherited from hwlib::console | |
| const int | columns |
| the number of colums in the console | |
| const int | lines |
| the number of lines (rows) in the console | |
| int | x |
| the current write column; | |
| int | y |
| the current write line; | |
| Related Functions inherited from hwlib::ostream | |
| bool | showpos (void) const |
| return the current showpos setting More... | |
| bool | showpos (bool x) |
| set the showpos setting, return the old showpos setting More... | |
| bool | showbase (void) const |
| return the current showbae setting More... | |
| bool | showbase (bool x) |
| set the showbase setting, return the old showbase setting More... | |
| bool | boolalpha (void) const |
| return the current boolalpha setting More... | |
| bool | boolalpha (bool x) |
| set the noboolalpha setting, return the old noboolalpha setting More... | |
| char | fill (void) const |
| return the current fill char setting More... | |
| char | fill (char x) |
| set the fill char setting, return the old fill char setting More... | |
hd44780 character LCD interface
This class implements an interface to an hd44780 character LCD.
The hd44780 is the standard chip for interfacing small dot-character LCD interfaces. It can display the ASCII table characters, 8 characters (0..7) that can be user-defined as 5x7 pixels, and a an upper 128 characters (128...255) that vary with the chip variant, often Japanese characters.
The chip and its digital pins run at 5V. The contrast input can in most cases be connected to 0V (ground), but better is to use a 10k potentiometer between 0V and 5V. Some displays (mostly extended-temperature-range types) need the lower size of this potentiometer tied to a negative voltage, for instance -5V.
The digital interface to the chip has 8 data lines, but the chip can be configured to use only 4. This adds some complexity to the driver software and slows it down a little, but the saving of 4 micro-controller more than compensates for this, hence nearly all software (including this driver) for is for the 4-bit interface. Note for the 4-bit interface the 4 highest data pins (D4..D7) are used. The lower 4 can be left unconnected.
The chip has some locations that can be writen and also read back, but this offers little advantage, so most software (including this driver) only writes to the chip, thus saving another pin. Hence 6 pins (+ ground and 5V) are needed to interface to an hd44780 display: 4 data lines, the R/S line (selects between command and data), and the E line (a strobe for the command).
(Some larger displays use not one but two hd44780 chips. This interface is not compatible with such LCDs.)
Most hd44780 LCDs have a single row of connections, with the following pinout:
But as always, check the datasheet (in this case of the LCD) to be sure!
The hd44780 implements the ostream interface, but it doesn't scroll: while the cursor is outside the visible characters (beyond the end of the line, or beyond the number of lines) any character writes will be ignored. Some characters are treated special:
' moves the cursor to the top-left positionThe best way to get a flicker-free display is to overwite instead of clear-and-then-write: use '' to got to the 'origin', then rewrite the whole display, using '
' to go to a next line (because it clears the remainder of the line).
references:
|
inlineoverridevirtual |
clear the console
This function clears the console and puts the cursor at (0,0). The default implementation does this by writing spaces to all locations. A concrete implementation might provide a better (faster) way.
Reimplemented from hwlib::console.
|
inline |
write a command byte to the LCD
Use this function only for features that are not provided by the console interface, like the definition of the user-defined characters.
|
inline |
write a data byte to the LCD
Use this function only for features that are not provided by the console interface, like the definition of the user-defined characters.


Disclaimer: The information provided on this and other pages by me is under my own personal responsibility and not that of Aberystwyth University.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Reference: Conventions for the Classification of Modular Degrees


Animal Behavior
Introduction
Ethology is the analysis and study of animal behavior, which in turn is the concept of what an animal does and how well it does it.
Behavior:
- is affected by both genes and the environment
- is essential for survival and reproduction
- is subject to natural selection over time
Causes
Behaviors have two different causes.
The proximate cause of a behavior is based on how an animal behaves and is restricted to the immediate cause(s) of a behavioral action.
The ultimate cause of a behavior is based on why an animal behaves as it does and is focused on the evolutionary changes in behavioral actions.
Types
Animals exhibit both innate and learned behaviors. Innate behaviors include foraging, sexual, and social behavior. Animals also exhibit a variety of ways through which they may modify existing behavior based on specific experiences through learning. These types of behaviors will be further explained in the following sections.
Innate Behavior
Innate behaviors are inherited; they are unlearned. These behaviors ensure that activities essential to survival are performed correctly without prior practice.
A species may exhibit environmental indifference in its innate behaviors, which signifies that those behaviors and actions are performed in the same manner by every member of the species. Similarly, fixed action patterns are instinctive behaviors that are similar throughout a species and inevitably run to completion. The latter is triggered by a sign stimulus.
Examples of innate behaviors are directed movements such as kinesis—a simple change in activity or turning rate in response to a stimulus—and taxis—automatic and oriented movement triggered by stimuli. Common examples of the latter are phototaxis, chemotaxis, and geotaxis.
Another innate behavior is migration, which is an animal's regular, long-distance change in location led by environmental cues such as the Sun, other stars, Earth's magnetic field, and landmarks.
To faciliate their behaviors, animals use certain communications and signalling. This includes the use of pheromones—chemicals emitted by members of one species that affect other members of the species—and visual, tactile, and auditory signals.
Habituation
Habituation is a learned behavior characterized by the loss of responsiveness to stimuli that convey little or no information. It is one of the simpler forms of learning.
Imprinting
Imprinting is a combination of learning with certain innate components. Animals are often only subject to imprinting during a sensitive period early in their lives, and the result is a generally irreversible behavior change.
Spatial Learning
Spatial learning allows animals to develop a sense of their surroundings through a cognitive map, which is an internal representation of spatial relationships among objects in an animal's surroundings.
Associative Learning
Associative learning is the association of a stimulus with something else. Examples include classical conditioning, where a particular outcome occurs in the presence of the stimulus, such as salivating in response to a bell, or operant conditioning, where a behavior is associated with reward or punishment.
Cognition
Cognition is the use of the nervous system to take information from sensory receptors and process it to solve a new problem.
Social Learning
Social learning is learning done through observing and replicating the acts of other members of an animal's social group doing the same task.
Foraging
Foraging is the act of searching for, capturing, and consuming food. Evolution favors organisms which minimize the energy used to catch and consume their food and maximize energy gained from their food, because this leaves the organism with the maximum remaining energy to perform other functions. As a result of this, cost-benefit analysis may be used when studying foraging.
As an example, crows which drop their food to break their outer layers must balance the energy used to fly up and drop the food with the energy gained from finally consuming the food.
 The following table describes characteristics of different sexual relationships:
| Promiscuous | Monogamous | Polygynous | Polyandrous | |
|---|---|---|---|---|
| Partners | Many | 1 | 1 male, many females | 1 female, many males |
| Structure | Showy | Similar | Showy male | Showy female |
| Care | None | Much | Little from the male | None from the male |
Social Behavior
Competitors for the same resources sometimes engage in territorial behavior, which is characterized by marking and defense of territories. When competitors for the same resources have disputes, they engage in agonistic behavior to resolve them, which involves threats, rituals, and sometimes combat.
Another, rarer social behavior is altruism, or selfless behavior. Individuals forego their own natural selection in favor of kin selection, which improves the population's inclusive fitness through assurance of higher reproductive success of relatives and offspring.
Credits
Cole French: Website design, Sexual Behavior, & Social Behavior.
Drew French: Associative Learning, Cognition, Social Learning, & Foraging.
Meraj Ibn-Kabir: Introduction, Causes, Types, & Innate Behavior.
John Riley: Habituation, Imprinting, & Spatial Learning.
Textbook citation for presented information:
Campbell, N. A., Reece, J. B., Urry, L. A., Cain, M. L., Wasserman, S. A., Minorsky, P. V., & Jackson, R. (2008). Biology. San Francisco: Pearson, Benjamin Cummings.


Download the dist.tar
from http://somewebsite, then put it into Edison via sdcard or scp.
tar xvf dist.tar
run startkit demo
cd dist
./start_startkit.sh
Then you will see
start message broker ...
start center ...
start startkit hub ...
visit ip:8080 for develop, ip:3000 for ui view


Взято з сторі нки Japan Time Online:
http://www.japantimes.co.jp/festivals.htm
TOKYO CHRYSANTHEMUM EXHIBITION
- Oct. 15 — Nov. 15
- Sensoji Temple in Taito Ward. Open daily from 10 a.m. to 4 p.m. Admission: free Access: Subway Ginza Line or Subway Toei Asakusa Line to Asakusa Station.
- Oct. 16 — Nov. 5
- Yasukuni Jinja Kikka-ten at Yasukuni Shrine in Chiyoda Ward. Open daily from 6 a.m. to 6 p.m. Admission: free Access: Subway Tozai Line, Hanzomon Line or Toei Shinjuku Line to Kudanshita Station.
- Oct. 24 — Nov. 24
- Kameido Tenjin Kikka-ten at Kameido Tenjin Shrine in Koto Ward. Open daily from 9 a.m. to 4 p.m. Admission: free Access: JR Sobu Line to Kameido Station, then walk 10 minutes.
- Oct. 25 — Nov. 23
- Meiji Shrine in Shibuya Ward. Open daily from 5:40 a.m. to 4:40 p.m. in October, and from 6:10 a.m. to 4:10 p.m. in November. Admission: free Access: (1) JR Yamanote Line to Harajuku Station. (2) Subway Chiyoda Line to Meiji-Jingumae? Station.
- Oct. 27 — Nov. 21
- Jindai Shokubutsu Koen Kikka-ten at Jindai Botanical Garden in Chofu, western Tokyo, from 9:30 a.m. to 5:00 p.m. (Visitors must enter by 4 p.m.) Closed on Mondays. Admission: 500 yen Access: Keio Line to Chofu Station (North Exit). From there, 15 minutes by bus for Mitaka or Kichijoji.


---
layout: post
title: Robby is Free, too
date: '2008-09-02T21:57:00.000-07:00'
author: Kevin Moore
tags:
modified_time: '2008-09-02T22:00:45.757-07:00'
blogger_id: tag:blogger.com,1999:blog-2115056243892631308.post-3024539603654219961
blogger_orig_url: http://work.j832.com/2008/09/robby-is-free-too.html
---
My good friend Robby--yes, check out that insanely hot Silverlight homepage--just announced he's leaving Identity Mine
Congrats on your freedom, my friend.
Yes, we need to get lunch this week.