This is a revival of an essay I wrote ten years ago, originally entitled 11 Types of Fatigue. I’ve been asked by the Sjögren’s Foundation to give it new life. I thank them for the opportunity and hope that in the ten years that have passed since the original essay, there is increased acknowledgment of fatigue as a major factor in Sjögren’s. I’ve decided to add two new types of fatigue to the list, which is by no means meant to be exhaustive.
A quick update: The friend mentioned below was my first friend with Sjögren’s and as such, has always been very special to me. We still speak in a kind of shorthand, as I do with most if not all of my Sjögren’s friends. The friends I have made over the years are the only good outcome of this disease. As a group, we understand what it means to say that we are ‘fine’. We know that when we say we are “tired”, it means really tired, i.e. that something is going on, something out of the ordinary, beyond the everyday feelings of fatigue. ‘How are you?’ is not a question in our culture. It is a greeting. As such, it deserves a real answer only in those circumstances where there is an understanding that the person asking truly wants to know.
For those of you who haven’t seen it, here is most of the original article with a few additions and revisions:
"How are you?" I asked a friend who has Sjögren’s. "Tired," she said, "how are you?" "Tired," I replied, knowing we understood each other. We were talking about a special brand of fatigue. Later that day, a friend who did not have Sjögren’s asked me the same question. "How are you?" she said. "Fine" I responded, thinking it was the simpler way to answer a basically rhetorical question.
Not everyone with Sjögren’s suffers from fatigue, but many of us do. According to a 2012 survey done by the SSF, fatigue was the third most prevalent and disabling symptom of Sjögren’s. Fatigue has been a problem more disabling than dry eyes or dry mouth for me. I long for normal energy and the ability to sustain activity, any activity. I long for the kind of fatigue that gets better with a good night's sleep. I want to be able to do things spontaneously. I wish I did not have to pace myself or plan rest stops. I wish that I could just get up and go, but, reluctantly and somewhat resentfully, I know that fatigue is a permanent part of my life. Having decided that if you must live in a particular landscape, you should learn the subtleties of the territory. I've come up with the following subtypes. Your experience may vary:
Basic fatigue
1. This is the inherent fatigue that I attribute to the inflammatory, autoimmune nature of Sjögren’s. It's with me all the time. It differs from normal fatigue in that you don't have to do anything to deserve it. It can vary from day to day but is always there. For me, there appears to be a correlation between this kind of fatigue and sed rate (ESR). When one goes up, so does the other.  I could also call this my baseline fatigue, which fluctuates and gets better or worse. All of the following are superimposed on this basic fatigue.
Rebound fatigue
2. If I push myself too far and ignore the cues my body is sending me to stop and rest, my body will fight back. When I do more than I should, the result is an immobilizing fatigue. It comes on after the fact, i.e., do too much one day and feel it the next. If I push myself today, I very likely will have to cancel everything tomorrow. An extended period of doing more than I should will almost certainly cause a flare.
Sudden fatigue
3. This 'crumple and fold' phenomenon makes me resemble a piece of laundry. It comes on suddenly, and I have to stop whatever I'm doing and just sit down (as soon as I can). It can happen anywhere, at any time.  It is visible to those who are observant and know what to look for, even though I make gargantuan efforts to disguise the fact that it is happening.
Weather related fatigue
4. Not everyone has this particular talent, but I can tell that the barometric pressure is dropping while the sky remains blue and cloudless. I feel a sweeping wave, a malaise, that sometimes lifts just after the rain or snow has started. Likewise, I know when a weather front is moving away, even while torrents of water are falling from the sky. I feel a lightening in my body and begin to have more energy. This kind of fatigue is accompanied by an increase in muscle aches and joint pain.
Molten lead phenomenon
5. This fatigue is present when I open my eyes in the morning and know that it is going to be a particularly bad day. It feels as if someone has poured molten lead in my head and on all my limbs while I slept. My muscles and joints hurt, and doing anything is like walking with heavy weights. It is often associated with increased symptoms of fibromyalgia and sometimes helped by heat and massage.
Tired-wired
6.Tired-wired is a feeling that comes from certain medications, such as prednisone, too much caffeine, or too much excitement or perhaps it is just a function of Sjögren’s. My body is tired but my mind wants to keep going and won’t let my body rest.
Flare-related fatigue
7. Flare-related fatigue is an unpredictable state of increased fatigue that can last for days or weeks. It may be caused by an increase in disease activity or an undetected infection. If the latter, it either resolves on its own, or eventually presents other signs and symptoms that can be diagnosed. Additional rest is essential to deal with this kind of fatigue, but rest alone will not necessarily improve it or make it go away. Once a flare begins, it is impossible to predict where it will go or how long it will last.
Fatigue induced by other physical conditions
8. Fatigue related to other physical causes, such as thyroid problems or anemia superimposed on Sjögren’s. This kind of fatigue makes you feel that you are climbing a steep hill when you are really walking on level ground. It resolves once the underlying organic condition is diagnosed and treated. Thyroid problems and anemia are both common among Sjögren’s patients, but many other kinds of fatigue may be superimposed.
Fatigue that impairs concentration
9. Fatigue that impairs concentration precludes thought, makes me too tired to talk, think or read. Fatigue robs me of memory and encloses me in a fog of cotton wool so thick I can't find my way out until the fog miraculously lifts. For me, brain fog goes hand-in-hand with other kinds of pernicious fatigue.
Stress, distress, anxiety or depression
10. Stress, distress, anxiety or depression all can create a leaden kind of emotional fatigue that can be as exhausting as one due to physical causes. Although some people do not associate their increased fatigue with emotional states, many are aware of the effects of increased anxiety and depression, even if they cannot control what they feel. Intense emotion is very draining. Stress, anxiety and depression all are known to disrupt sleep.
Fatigue that comes from not sleeping well
11. Some people with Sjögren’s have trouble both getting to sleep and staying asleep. Some wake up in the morning feeling as if they had never slept at all. Many aspects of Sjögren’s affect sleep: being too dry, in too much pain or malaise; multiple trips to the bathroom, the need for water or to put in eye ointment all deter a good sleep. Lack of restorative sleep increases fatigue.
And two new ones:
Fatigue that comes with normal aging
12. I’m old enough for Medicare now and my friends are more tired too, although they seem to be able to do two or three or even four times what I can do on any given day. In fact, the gap between what they can do and what I can do just seems to be growing, despite my best efforts. It’s been a long time since I tried to keep up, but it still hurts that I can’t.
Chronic Illness Fatigue
13. Fatigue that comes from a chronic illness that just won’t quit. We’ve all heard the expression “sick and tired of being sick and tired” and that phrase truly captures what many of us feel. I would take it one step further. There’s a fatigue that comes with the uncertainty of a chronic disease. It’s a debilitating fatigue born of never knowing what will come next. The chronicity of Sjögren’s can wear me down and I have to make special attempts not to let it. When these attempts don’t work, I wait a while and try to find something else that distracts me from my illness.
It's difficult to explain the unnatural quality and intensity of this fatigue to someone whose only experience has been with what is normal. We're not talking about the same stuff. It’s apples and artichokes. Sjögren’s fatigue is pervasive. It assaults everything I do. There isn’t a part of my life that hasn’t been touched by it. It is there even on my happiest days.
Because people don’t understand, it’s often misinterpreted. "Is it depression?" a health care professional who didn't know much about Sjögren’s asked me. I tensed. Was he saying it was all in my head? I began to get angry but then gave him the benefit of the doubt. I put my first reaction aside and decided he was trying to understand. I was relating something outside his frame of reference, and he was attempting to find a point with which he could identify.
When you describe Sjögren’s fatigue to someone who has never experienced it, you are asking him or her to think outside the box. You want them to understand an experience that is common to those who have Sjögren’s and many other autoimmune diseases but rare otherwise. Perhaps their first reaction will be negation or denial. While it’s always difficult to encounter expressions of disbelief, it is not uncommon. I tried to see it as an opportunity to educate.
"No," I said to the doctor who asked about depression, "think of it as a never-ending flu that varies in intensity but never goes away." He grimaced.


Reads CSV files into a dataset.
tf.compat.v2.data.experimental.make_csv_dataset
tf.data.experimental.make_csv_dataset( file_pattern, batch_size, column_names=None, column_defaults=None, label_name=None, select_columns=None, field_delim=',', use_quote_delim=True, na_value='', header=True, num_epochs=None, shuffle=True, shuffle_buffer_size=10000, shuffle_seed=None, prefetch_buffer_size=dataset_ops.AUTOTUNE, num_parallel_reads=1, sloppy=False, num_rows_for_inference=100, compression_type=None, ignore_errors=False )
Reads CSV files into a dataset, where each element is a (features, labels)
tuple that corresponds to a batch of CSV rows. The features dictionary
maps feature column names to Tensor
s containing the corresponding
feature data, and labels is a Tensor
containing the batch's label data.
file_pattern
: List of files or patterns of file paths containing CSV
records. See tf.io.gfile.glob
for pattern rules.batch_size
: An int representing the number of records to combine
in a single batch.column_names
: An optional list of strings that corresponds to the CSV
columns, in order. One per column of the input record. If this is not
provided, infers the column names from the first row of the records.
These names will be the keys of the features dict of each dataset element.column_defaults
: A optional list of default values for the CSV fields. One
item per selected column of the input record. Each item in the list is
either a valid CSV dtype (float32, float64, int32, int64, or string), or a
Tensor
with one of the aforementioned types. The tensor can either be
a scalar default value (if the column is optional), or an empty tensor (if
the column is required). If a dtype is provided instead of a tensor, the
column is also treated as required. If this list is not provided, tries
to infer types based on reading the first num_rows_for_inference rows of
files specified, and assumes all columns are optional, defaulting to 0
for numeric values and ""
for string values. If both this and
select_columns
are specified, these must have the same lengths, and
column_defaults
is assumed to be sorted in order of increasing column
index.label_name
: A optional string corresponding to the label column. If
provided, the data for this column is returned as a separate Tensor
from
the features dictionary, so that the dataset complies with the format
expected by a tf.Estimator.train
or tf.Estimator.evaluate
input
function.select_columns
: An optional list of integer indices or string column
names, that specifies a subset of columns of CSV data to select. If
column names are provided, these must correspond to names provided in
column_names
or inferred from the file header lines. When this argument
is specified, only a subset of CSV columns will be parsed and returned,
corresponding to the columns specified. Using this results in faster
parsing and lower memory usage. If both this and column_defaults
are
specified, these must have the same lengths, and column_defaults
is
assumed to be sorted in order of increasing column index.field_delim
: An optional string
. Defaults to ","
. Char delimiter to
separate fields in a record.use_quote_delim
: An optional bool. Defaults to True
. If false, treats
double quotation marks as regular characters inside of the string fields.na_value
: Additional string to recognize as NA/NaN.header
: A bool that indicates whether the first rows of provided CSV files
correspond to header lines with column names, and should not be included
in the data.num_epochs
: An int specifying the number of times this dataset is repeated.
If None, cycles through the dataset forever.shuffle
: A bool that indicates whether the input should be shuffled.shuffle_buffer_size
: Buffer size to use for shuffling. A large buffer size
ensures better shuffling, but increases memory usage and startup time.shuffle_seed
: Randomization seed to use for shuffling.prefetch_buffer_size
: An int specifying the number of feature
batches to prefetch for performance improvement. Recommended value is the
number of batches consumed per training step. Defaults to auto-tune.
num_parallel_reads
: Number of threads used to read CSV records from files.
If >1, the results will be interleaved.
sloppy
: If True
, reading performance will be improved at
the cost of non-deterministic ordering. If False
, the order of elements
produced is deterministic prior to shuffling (elements are still
randomized if shuffle=True
. Note that if the seed is set, then order
of elements after shuffling is deterministic). Defaults to False
.num_rows_for_inference
: Number of rows of a file to use for type inference
if record_defaults is not provided. If None, reads all the rows of all
the files. Defaults to 100.compression_type
: (Optional.) A tf.string
scalar evaluating to one of
""
(no compression), "ZLIB"
, or "GZIP"
. Defaults to no compression.ignore_errors
: (Optional.) If True
, ignores errors with CSV file parsing,
such as malformed data or empty lines, and moves on to the next valid
CSV record. Otherwise, the dataset raises an error and stops processing
when encountering any invalid records. Defaults to False
.A dataset, where each element is a (features, labels) tuple that corresponds
to a batch of batch_size
CSV rows. The features dictionary maps feature
column names to Tensor
s containing the corresponding column data, and
labels is a Tensor
containing the column data for the label column
specified by label_name
.
ValueError
: If any of the arguments is malformed.


Songs
Search
name
artist
release date
price
Bestsellers
The sound of silence
Hallelujah
Helene Fischer
The Beatles
Classic
Harry Potter
The Lord of the Rings
Modern Talking
Schlager
Amy Winehouse


The Time Picker component allows the user to easily set a time using either an HTML5 time input or the
Fundamental NGX Time component.
<fd-time-picker>
24-Hour Time Picker
This is the default time picker setting.
12-Hour Time Picker with AM/PM
Set [meridian]="true"
to use a 12-hour clock..
Time Picker with No Seconds
Use [displaySeconds]=false
to turn off seconds for the time picker.
Disabled Time Picker
Set [disabled]="true"
to disable the time picker.
Compact Time Picker
Set [compact]="true"
to use compact time-picker.


| Enter | Toggle Play mode |
| Space | Toggle Record mode |
| Arrow Keys | Navigate through pattern |
| A-Z | Playback notes (Set you keyboard layout in Options) |
| F1 -> F6 | Select Octave 1 -> 6 |
| Page up/Page down | Navigate up/down 16 rows (1/4th of the pattern length) |
| Home | Navigate to top of pattern |
| End | Navigate to bottom of pattern |
| Tab | Navigate to next track |
| - | Select previous sample |
| + | Select next sample |
| Numeric Keypad 0-9 | Select Sample 1-10 |
In recording mode | |
| A-Z | Enter notes (in the note column) |
| 0-9 | Enter effects (in the effect column) |
| \ | Note-Off (in XM-mode) |
| Del | Clear note |
| Backspace | Clear note |
| Shift+Enter | Insert note (shift notes down) |
| Shift+backspace | Remove note (shift notes up) |
Selection* | |
| Shift+Arrow Keys | Make pattern selection |
| Shift+A | Select entire track |
| Shift+C | Copy selection |
| Shift+X | Clear selection (and copy it) |
| Shift+V | Paste selection |
| Esc | Clear selection |
|
* A selection can span multiple tracks. Instead of Shift you can also use Ctrl, Alt or Command. | |
In general | |
| Ctrl-Z | Undo |
| Ctrl-Y | Redo |
| Enter | Confirm / OK / Play |
| Esc | Cancel |


Getting Started
Hello and Welcome!
Installation
The library is available as npm package, so all you need to do is to run the following command:
{{ snippets.install }}
This command will create a record in your `package.json` file and install the package into the npm modules folder.
Examples
Minimal Setup Example
First thing you need to do is to import the ng2-smart-table directives into your component.
{{ snippets.require }}
Then register it by adding to the list of directives of your module:
{{ snippets.directive }}
Now, we need to configure the table and add it into the template. The only required setting for the component to start working is a columns configuration.
Let's register settings property inside of the component where we want to have the table and configure some columns (Settings documentation):
{{ snippets.settings }}
Finally let's put the ng2-smart-table component inside of the template:
{{ snippets.template }}
At this step you will have a minimally configured table which should look something like this:
All functions are available by default and you don't need to configure them somehow, so you already able to add/edit/delete rows, sort or filter the table, etc.
But it feels like something is missing... Right, there is no data in the table by default. To add some, let's create an array property with a list of objects in the component. Please note that object keys are same as in the columns configuration.
{{ snippets.array }}
And pass the data to the table:
{{ snippets.dataTemplate }}
Now you have some data in the table:
That's it for a minimal setup, our final component should look like this, pretty simple, huh?
Demo Source
{{ snippets.basicFull }}
Standalone Filter Example
Say you don't need to have a filter field in the each table column or the requirements says that search field should be placed outside of the table?
Fortunately this is super easy to achieve, to do this we need to slightly modify our basic component example.
Data Source
First thing you need to know is that all the data operations against the table must be done using the DataSource table property. DataSource is an abstraction around your data which allows you easily modify the table data or subscribe to events to modify the table behaviour.
To access the DataSource we either can take it from the table or pass it instead of our data array. Let's do the second option as it requires less code and is more demonstrative. Let's import the DataSource class by modifying the import statement:
{{ snippets.sourceRequire }}
Note that the import now contains a LocalDataSource class (the word Local here means that the data is processed locally in a browser, not on the server side).
Then let's create a DataSource instance and pass our data array into it as a constructor parameter:
{{ snippets.createSource }}
Now let's pass the source to the table instead of the data array:
{{ snippets.sourceTemplate }}
At this point if you look at the result there will be no difference comparing to the first example. Basically if you pass an array to the table component first thing it will do is wrap LocalDataSource object around your array as we did here manually.
Now, having the DataSource we basically could change the table data in any way we need to - filter it, sort, paginate to some page, create/delete/modify the rows. In our example we need to be able to filter the data outside of the table, firstly let's add a search filed to the template with a listener:
{{ snippets.search }}
And the listener code which asks the DataSource to filter the data:
{{ snippets.searchTable }}
Last thing, let's hide the default table filters to not conflict with our standalone one:
{{ snippets.hideFilters }}
And done! Now the table has a standalone search field:
Same way you can modify the data of the table, for example by adding a row from a third party form or listening to some external event. Here's a full component code:
Demo Source
{{ snippets.sourceFull }}
Loading From Server Example
This example shows how to pass the data loaded from some API to the table DataSource.
Confirm Action Example
An example on how to confirm an action before it's applied to the table:
Load From Server Example
An example on how to load data user Server DataSource:
Select and Completer column types
An example on how to use select and completer column types:
Multi select
An example on how to use multi select mode:
Full component documentation you can find here.


I was an instructional aide (IA) for EECS 183, the introductory computer science course at the University of Michigan with over 1000 students.
Canadian Academy is a pre-K-12 international school in Kobe Japan. I completed the IB diploma with Biology (HL), Economics (HL), Mathematics (HL), and English Language and Literature (HL), Japanese Language and Literature (SL), Chemistry (SL).


Not Ads
A bunch of things I didn't make that I want to promote or share for no financial benefit.
{{ define "page-banner"}}
I’m a web developer and I make all sorts of stuff for the web. You can find some of my
When I’m not making things for the web I sometimes think about stuff and on rare occasions I write about it. You can
find some of my writing here. A bunch of things I didn't make that I want to promote or share for no financial benefit.Hello, I’m Mike Riethmuller
code
work
experiments
creations shame on CodePen or GitHub and you can talk to me on Twitter.Not Ads
Oh, hey! You’re still here, good for you! You should know I’m passionate about web development and that doesn’t just mean standards; I’m an advocate for anything and anyone that contributes to good quality web development.
I’ve worked as a front-end developer on some of Australia’s largest websites as well as some of the smallest community sites. When I’m not building sites or blogging I like to experiment with code. I love learning new things and finding techniques that challenge what we think is best practice. Although very few ideas make it into my production toolkit, I find experimentation is the best way learn and the only way to discover new techniques.
I try to share everything I learn, I speak, I blog and sometimes help organise community events & meetups.
I’m available for hire! Why don’t you get in touch?
Feel free to send me an email. You can reach me at<EMAIL_ADDRESS>Go for it! You can actually email me and I will actually reply, if you’re still reading this you’re worth my time!


Flyweight pattern is one of the structural design patterns as this pattern provides ways to decrease object count thus improving application required objects structure. Flyweight pattern is used when we need to create a large number of similar objects (say 105). One important feature of flyweight objects is that they are immutable. This means that they cannot be modified once they have been constructed.
Why do we care for number of objects in our program?
- Less number of objects reduces the memory usage, and it manages to keep us away from errors related to memory like java.lang.OutOfMemoryError.
-
Although creating an object in Java is really fast, we can still reduce the execution time of our program by sharing objects.
In Flyweight pattern we use a HashMap that stores reference to the object which have already been created, every object is associated with a key. Now when a client wants to create an object, he simply has to pass a key associated with it and if the object has already been created we simply get the reference to that object else it creates a new object and then returns it reference to the client.
Intrinsic and Extrinsic States
To understand Intrinsic and Extrinsic state, let us consider an example.
Suppose in a text editor when we enter a character, an object of Character class is created, the attributes of the Character class are {name, font, size}. We do not need to create an object every time client enters a character since letter ‘B’ is no different from another ‘B’ . If client again types a ‘B’ we simply return the object which we have already created before. Now all these are intrinsic states (name, font, size), since they can be shared among the different objects as they are similar to each other.
Now we add to more attributes to the Character class, they are row and column. They specify the position of a character in the document. Now these attributes will not be similar even for same characters, since no two characters will have the same position in a document, these states are termed as extrinsic states, and they can’t be shared among objects.
Implementation : We implement the creation of Terrorists and Counter Terrorists In the game of Counter Strike. So we have 2 classes one for Terrorist(T) and other for Counter Terrorist(CT). Whenever a player asks for a weapon we assign him the asked weapon. In the mission, terrorist’s task is to plant a bomb while the counter terrorists have to diffuse the bomb.
Why to use Flyweight Design Pattern in this example? Here we use the Fly Weight design pattern, since here we need to reduce the object count for players. Now we have n number of players playing CS 1.6, if we do not follow the Fly Weight Design Pattern then we will have to create n number of objects, one for each player. But now we will only have to create 2 objects one for terrorists and other for counter terrorists, we will reuse then again and again whenever required.
Intrinsic State : Here ‘task’ is an intrinsic state for both types of players, since this is always same for T’s/CT’s. We can have some other states like their color or any other properties which are similar for all the Terrorists/Counter Terrorists in their respective Terrorists/Counter Terrorists class.
Extrinsic State : Weapon is an extrinsic state since each player can carry any weapon of his/her choice. Weapon need to be passed as a parameter by the client itself.
// A Java program to demonstrate working of // FlyWeight Pattern with example of Counter // Strike Game import java.util.Random; import java.util.HashMap; // A common interface for all players interface Player { public void assignWeapon(String weapon); public void mission(); } // Terrorist must have weapon and mission class Terrorist implements Player { // Intrinsic Attribute private final String TASK; // Extrinsic Attribute private String weapon; public Terrorist() { TASK = "PLANT A BOMB"; } public void assignWeapon(String weapon) { // Assign a weapon this.weapon = weapon; } public void mission() { //Work on the Mission System.out.println("Terrorist with weapon " + weapon + "|" + " Task is " + TASK); } } // CounterTerrorist must have weapon and mission class CounterTerrorist implements Player { // Intrinsic Attribute private final String TASK; // Extrinsic Attribute private String weapon; public CounterTerrorist() { TASK = "DIFFUSE BOMB"; } public void assignWeapon(String weapon) { this.weapon = weapon; } public void mission() { System.out.println("Counter Terrorist with weapon " + weapon + "|" + " Task is " + TASK); } } // Claass used to get a playeer using HashMap (Returns // an existing player if a player of given type exists. // Else creates a new player and returns it. class PlayerFactory { /* HashMap stores the reference to the object of Terrorist(TS) or CounterTerrorist(CT). */ private static HashMap <String, Player> hm = new HashMap<String, Player>(); // Method to get a player public static Player getPlayer(String type) { Player p = null; /* If an object for TS or CT has already been created simply return its reference */ if (hm.containsKey(type)) p = hm.get(type); else { /* create an object of TS/CT */ switch(type) { case "Terrorist": System.out.println("Terrorist Created"); p = new Terrorist(); break; case "CounterTerrorist": System.out.println("Counter Terrorist Created"); p = new CounterTerrorist(); break; default : System.out.println("Unreachable code!"); } // Once created insert it into the HashMap hm.put(type, p); } return p; } } // Driver class public class CounterStrike { // All player types and weopons (used by getRandPlayerType() // and getRandWeapon() private static String[] playerType = {"Terrorist", "CounterTerrorist"}; private static String[] weapons = {"AK-47", "Maverick", "Gut Knife", "Desert Eagle"}; // Driver code public static void main(String args[]) { /* Assume that we have a total of 10 players in the game. */ for (int i = 0; i < 10; i++) { /* getPlayer() is called simply using the class name since the method is a static one */ Player p = PlayerFactory.getPlayer(getRandPlayerType()); /* Assign a weapon chosen randomly uniformly from the weapon array */ p.assignWeapon(getRandWeapon()); // Send this player on a mission p.mission(); } } // Utility methods to get a random player type and // weapon public static String getRandPlayerType() { Random r = new Random(); // Will return an integer between [0,2) int randInt = r.nextInt(playerType.length); // return the player stored at index 'randInt' return playerType[randInt]; } public static String getRandWeapon() { Random r = new Random(); // Will return an integer between [0,5) int randInt = r.nextInt(weapons.length); // Return the weapon stored at index 'randInt' return weapons[randInt]; } }
Output:
Counter Terrorist Created Counter Terrorist with weapon Gut Knife| Task is DIFFUSE BOMB Counter Terrorist with weapon Desert Eagle| Task is DIFFUSE BOMB Terrorist Created Terrorist with weapon AK-47| Task is PLANT A BOMB Terrorist with weapon Gut Knife| Task is PLANT A BOMB Terrorist with weapon Gut Knife| Task is PLANT A BOMB Terrorist with weapon Desert Eagle| Task is PLANT A BOMB Terrorist with weapon AK-47| Task is PLANT A BOMB Counter Terrorist with weapon Desert Eagle| Task is DIFFUSE BOMB Counter Terrorist with weapon Gut Knife| Task is DIFFUSE BOMB Counter Terrorist with weapon Desert Eagle| Task is DIFFUSE BOMB
References:
- Elements of Reusable Object-Oriented Software(By Gang Of Four)
- https://en.wikipedia.org/wiki/Flyweight_pattern
This article is contributed by Chirag Agarwal. If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to<EMAIL_ADDRESS>See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above


Football: Giroud penalty lifts France past brave Moldova
PARIS: Olivier Giroud converted a late penalty as France staggered to a 2-1 win against a Moldova side ranked 175th in the world on Thursday (Nov 14) hours after securing a place at Euro 2020.
World champions France, who lost the Euro 2016 final as hosts to Portugal, were guaranteed a ticket to next year's tournament before kick-off in Paris following a 0-0 draw between Turkey and Iceland.
However their hopes of turning the final home qualifier into an evening of celebration at a chilly Stade de France were compromised when Vadim Rata punished abject defending to give Moldova a shock ninth-minute lead.
Raphael Varane levelled for France 10 minutes before half-time, triggering furious protests from Moldovan players and their coach who argued goalkeeper Alexei Koselev was fouled by Giroud.
The Chelsea forward grabbed the winner from the spot 11 minutes from time after Lucas Digne was cut down in the box to leave France two points clear of Turkey at the top of Group H.
"I could and should have scored before the penalty. We quite simply didn't get off to the start we should have done," Giroud told French television.
"In the second half there was much more intensity and precision so we created lots of chances but at times lacked the finishing touch. The penalty feels good though."
France round out their qualification campaign away to Albania on Sunday in what will be Didier Deschamps' 100th match in charge while Turkey travel to Andorra.
Deschamps recalled Kylian Mbappe and N'Golo Kante from injury here while Giroud was handed a start despite playing just 20 minutes for Chelsea since last month's international break.
LENGLET BLUNDER
Turkish coach Engin Firat, who replaced Semen Altman as Moldova boss two weeks ago, could not have dreamed of a better start to his reign when Clement Lenglet twice failed to head clear and Rata muscled his way past the Barcelona defender to poke beyond Steve Mandanda.
It was just the third goal Moldova, who lost 4-1 to France in their opening qualifier last March, had scored in nine group matches.
France created a series of chances in reply with Benjamin Pavard volleying low past the far post before Giroud stabbed wide from close range.

Varane hauled the hosts level with a fiercely disputed equaliser as Koselev spilled a free-kick under pressure from Giroud, allowing the France captain to nod home and sparking an angry reaction from the visitors -- with Firat booked for his touchline protestation.
Mbappe, who sat out the October fixtures with Iceland and Turkey due to a thigh complaint, was denied by a courageous block from Ion Jardan near the hour mark but Moldova's brave resistance was ended on 79 minutes.
Veaceslav Posmac chopped down Everton left-back Digne inside the area and Giroud confidently stepped up to side-foot home the spot-kick for his 39th international goal, leaving him two adrift of France great Michel Platini.
Euro 2020 qualifying results:
Czech Republic 2 Kosovo 1
England 7 Montenegro 0
Portugal 6 Lithuania 0
Serbia 3 Luxembourg 2
Albania 2 Andorra 2
France 2 Moldova 1
Turkey 0 Iceland 0


The purpose of this post is to help you make sure all of HTML elements can display properly. If you use CSS reset, don’t forget to redefine the style by yourself. Heading 1 Heading 2 <a href="#Headin...
Read MoreI am a dedicated person with a family of four. I enjoy reading, and the knowledge and perspective that my reading gives me has strengthened my teaching skills and presentation abilities. I have been successful at raising a family, and I attribute this success to my ability to plan, schedule, and handle many different tasks at once. This flexibility will help me in the classroom, where there are many different personalities and learning styles.


Green Sea Turtle
Cheloniidae and Dermochelyidae families
Seven different species of sea (or marine) turtles grace our ocean waters, from the shallow seagrass beds of the Indian Ocean, to the colorful reefs of the Coral Triangle and the sandy beaches of the Eastern Pacific. While these highly migratory species periodically come ashore to either bask or nest, sea turtles spend the bulk of their lives in the ocean. WWF's work on sea turtles focuses on five of those species: green, hawksbill, loggerhead, leatherback, and olive ridley.
Over the last 200 years, human activities have tipped the scales against the survival of these ancient mariners. Slaughtered for their eggs, meat, skin, and shells, sea turtles suffer from poaching and over-exploitation. They also face habitat destruction and accidental capture—known as bycatch—in fishing gear.  Nearly all species of sea turtle are now classified as endangered, with three of the seven existing species being critically endangered.
STATUS:
ENDANGERED
POPULATION:
2 Million
HABITAT:
Open Water, Coasts
THREATS
HABITAT LOSS & FRAGMENTATION
Sea turtles are dependent on beaches for nesting. Uncontrolled coastal development, vehicle traffic on beaches, and other human activities have directly destroyed or disturbed sea turtle nesting beaches around the world. For example, lights from roads and buildings disorient hatchlings away from the sea, and vehicle traffic on beaches compacts the sand, making it impossible for female turtles to dig nests. Turtle feeding grounds such as coral reefs and seagrass beds are damaged and destroyed by activities onshore, including sedimentation from clearing of land and nutrient run-off from agriculture. Beach restoration projects for protecting seaside buildings have also been found to be harmful, through dredging and sand filling.
CLIMATE CHANGE & POLLUTION
All stages of a sea turtle's life are affected by environmental conditions such as temperature—even the sex of offspring. Unusually warm temperatures caused by climate change are disrupting the normal ratios, resulting in fewer male hatchlings.Warmer sea surface temperatures can also lead to the loss of important foraging grounds for sea turtles, while increasingly severe storms and sea level rise can destroy critical nesting beaches and damage nests.
Sea turtles can mistake floating plastic materials for jellyfish and can choke on them when they try to eat them. These encounters are often fatal. Lost or discarded fishing gear—called ghost gear—entangles sea turtles and can drown or render a turtle unable to feed or swim. Trash on beaches can trap hatchlings and prevent them from reaching the ocean. Oil spills also poison sea turtles of all ages.
How Can I Help?
Call Your Representatives
100 companies are responsible for 71% of global emissions. Urge your congresspeople to pass legislation preventing corporations from destroying our planet.
Reduce Your Footprint
Commit to reducing food waste, electricity use, and walk, bike, or take public transportation. Buy only what you need and recycle what you no longer do.
Donate
Companies like IUCN Red List & World Wildlife Fund are committed to protecting habitats threatened by Climate Change and the animals that live there.


public interface Block extends Metadatable
| Modifier and Type | Method and Description |
|---|---|
boolean |
breakNaturally()
Breaks the block and spawns items as if a player had digged it
|
boolean |
breakNaturally(ItemStack tool)
Breaks the block and spawns items as if a player had digged it with a
specific tool
|
Biome |
getBiome()
Returns the biome that this block resides in
|
default long |
getBlockKey()
Returns this block's coordinates packed into a long value
|
int |
getBlockPower()
Returns the redstone power being provided to this block
|
int |
getBlockPower(BlockFace face)
Returns the redstone power being provided to this block face
|
Chunk |
getChunk()
Gets the chunk which contains this block
|
byte |
getData()
Deprecated.
Magic value
|
Collection<ItemStack> |
getDrops()
Returns a list of items which would drop by destroying this block
|
Collection<ItemStack> |
getDrops(ItemStack tool)
Returns a list of items which would drop by destroying this block with
a specific tool
|
BlockFace |
getFace(Block block)
Gets the face relation of this block compared to the given block.
|
double |
getHumidity()
Gets the humidity of the biome of this block
|
byte |
getLightFromBlocks()
Get the amount of light at this block from nearby blocks.
|
byte |
getLightFromSky()
Get the amount of light at this block from the sky.
|
byte |
getLightLevel()
Gets the light level between 0-15
|
Location |
getLocation()
Gets the Location of the block
|
Location |
getLocation(Location loc)
Stores the location of the block in the provided Location object.
|
PistonMoveReaction |
getPistonMoveReaction()
Returns the reaction of the block when moved by a piston
|
Block |
getRelative(BlockFace face)
Gets the block at the given face
|
Block |
getRelative(BlockFace face,
int distance)
Gets the block at the given distance of the given face
|
Block |
getRelative(int modX,
int modY,
int modZ)
Gets the block at the given offsets
|
BlockState |
getState()
Captures the current state of this block.
|
BlockState |
getState(boolean useSnapshot) |
double |
getTemperature()
Gets the temperature of the biome of this block
|
Material |
getType()
Gets the type of this block
|
int |
getTypeId()
Deprecated.
Magic value
|
World |
getWorld()
Gets the world which contains this Block
|
int |
getX()
Gets the x-coordinate of this block
|
int |
getY()
Gets the y-coordinate of this block
|
int |
getZ()
Gets the z-coordinate of this block
|
boolean |
isBlockFaceIndirectlyPowered(BlockFace face)
Returns true if the block face is being indirectly powered by Redstone.
|
boolean |
isBlockFacePowered(BlockFace face)
Returns true if the block face is being powered by Redstone.
|
boolean |
isBlockIndirectlyPowered()
Returns true if the block is being indirectly powered by Redstone.
|
boolean |
isBlockPowered()
Returns true if the block is being powered by Redstone.
|
boolean |
isEmpty()
Checks if this block is empty.
|
boolean |
isLiquid()
Checks if this block is liquid.
|
void |
setBiome(Biome bio)
Sets the biome that this block resides in
|
void |
setData(byte data)
Deprecated.
Magic value
|
void |
setData(byte data,
boolean applyPhysics)
Deprecated.
Magic value
|
void |
setType(Material type)
Sets the type of this block
|
void |
setType(Material type,
boolean applyPhysics)
Sets the type of this block
|
boolean |
setTypeId(int type)
Deprecated.
Magic value
|
boolean |
setTypeId(int type,
boolean applyPhysics)
Deprecated.
Magic value
|
boolean |
setTypeIdAndData(int type,
byte data,
boolean applyPhysics)
Deprecated.
Magic value
|
getMetadata, hasMetadata, removeMetadata, setMetadata
@Deprecated byte getData()
Block getRelative(int modX, int modY, int modZ)
modX
- X-coordinate offsetmodY
- Y-coordinate offsetmodZ
- Z-coordinate offsetBlock getRelative(BlockFace face)
This method is equal to getRelative(face, 1)
face
- Face of this block to returngetRelative(BlockFace, int)
Block getRelative(BlockFace face, int distance)
For example, the following method places water at 100,102,100; two blocks above 100,100,100.
Block block = world.getBlockAt(100, 100, 100); Block shower = block.getRelative(BlockFace.UP, 2); shower.setType(Material.WATER);
face
- Face of this block to returndistance
- Distance to get the block atMaterial getType()
@Deprecated int getTypeId()
byte getLightLevel()
byte getLightFromSky()
Any light given from other sources (such as blocks like torches) will be ignored.
byte getLightFromBlocks()
Any light given from other sources (such as the sun) will be ignored.
World getWorld()
int getX()
int getY()
int getZ()
default long getBlockKey()
long value = ((long)getX() & 0x7FFFFFF) | (((long)getZ() & 0x7FFFFFF) << 27) | ((long)getY() << 54);
And may be unpacked as follows:
int x = (int) ((packed << 37) >> 37);
int y = (int) (packed >>> 54);
int z = (int) ((packed << 10) >> 37);
Location getLocation()
Location getLocation(Location loc)
If the provided Location is null this method does nothing and returns null.
loc
- the location to copy intoChunk getChunk()
@Deprecated void setData(byte data)
data
- New block specific metadata@Deprecated void setData(byte data, boolean applyPhysics)
data
- New block specific metadataapplyPhysics
- False to cancel physics from the changed block.void setType(Material type)
type
- Material to change this block tovoid setType(Material type, boolean applyPhysics)
type
- Material to change this block toapplyPhysics
- False to cancel physics on the changed block.@Deprecated boolean setTypeId(int type)
type
- Type-Id to change this block to@Deprecated boolean setTypeId(int type, boolean applyPhysics)
type
- Type-Id to change this block toapplyPhysics
- False to cancel physics on the changed block.@Deprecated boolean setTypeIdAndData(int type, byte data, boolean applyPhysics)
type
- Type-Id to change this block todata
- The data value to change this block toapplyPhysics
- False to cancel physics on the changed blockBlockFace getFace(Block block)
For example:
Block current = world.getBlockAt(100, 100, 100);
Block target = world.getBlockAt(100, 101, 100);
current.getFace(target) == BlockFace.Up;
block
- Block to compare against this blockBlockState getState()
The returned object will never be updated, and you are not guaranteed that (for example) a sign is still a sign after you capture its state.
BlockState getState(boolean useSnapshot)
useSnapshot
- if this block is a TE, should we create a fully copy of the TileEntityoptionally disables use of snapshot, to operate on real block data
Biome getBiome()
void setBiome(Biome bio)
bio
- new Biome type for this blockboolean isBlockPowered()
boolean isBlockIndirectlyPowered()
boolean isBlockFacePowered(BlockFace face)
face
- The block faceboolean isBlockFaceIndirectlyPowered(BlockFace face)
face
- The block faceint getBlockPower(BlockFace face)
face
- the face of the block to query or BlockFace.SELF for the
block itselfint getBlockPower()
boolean isEmpty()
A block is considered empty when getType()
returns Material.AIR
.
boolean isLiquid()
A block is considered liquid when getType()
returns Material.WATER
, Material.STATIONARY_WATER
, Material.LAVA
or Material.STATIONARY_LAVA
.
double getTemperature()
double getHumidity()
PistonMoveReaction getPistonMoveReaction()
boolean breakNaturally()
boolean breakNaturally(ItemStack tool)
tool
- The tool or item in hand used for diggingCollection<ItemStack> getDrops()
Collection<ItemStack> getDrops(ItemStack tool)
tool
- The tool or item in hand used for diggingCopyright © 2021. All rights reserved.


{% extends "layout/lay_1col.html" %} {% block www_hd_title %}{% trans "Account Settings » Password Reset Complete" %}{% endblock www_hd_title %} {% block www_content_box_1 %}
{% trans "Your password has been set. You may go ahead and log in with your new password now." %}.


ThisPlace
Remember a 3x3 m2 location anywhere in the world with just four words.
This is hot off the press. We are still finalising things, so locations might not be reproducible. Do not use it to mark the location of your antarctic resupply drop quite yet!
Sharing a precise location with others is hard, especially if you are trying to meet somewhere without a street addresses. ThisPlace lets you find four easy to remember words that uniquely identify a location anywhere on the planet.
Then share by: shouting them across a field, passing them on over the phone, writing them down or even tweeting them. Reach your friends where ever they are.
If you see 4words anywhere you can easily look up the corresponding location on this webpage.
Use it
- Type in an address to find out its four words (try 1600 Pennsylvania avenue ...)
- To find the location referenced by a set of four words, type them in separated by a dash (try {{ sydney }})
- Go straight to exploring the map by clicking the Find on Map button, it will take you to Sydney
Examples
Some interesting locations to visit:
Open source
We believe in open source, so you can run your own ThisPlace webpage and help people meet each other at the right place. The project is hosted on github under the name ThisPlace. Help us make it more awesome!


From: Supplier
To: Delivery
Order No:
Delivery Note No:
Invoice No:
Requisition No:
Requisition By:
Date:
| Item No | Item Code | Item Specification | Unit | Qty Ordered |
Qty Received |
Unit Cost | Total Value | Balance |
|---|---|---|---|---|---|---|---|---|
Stores Officer:
Name:
Signature:
Designation:
Date:
Remarks:
Distribution:Original (White Copy) - Account, Duplicate (Green) - User, Triplicate (Pink) - Purchase, Quadruplicate (Blue) - Store


So here's how it went down. My girlfriend, Casey, had just called my cell to say good night and such as she headed to bed, but I had her stay on the phone for a moment as my friend Jeff, who bought the salvia for us, and I took our first hits.
After Jeff took his first hit, he tried to tell me that he couldn't stand, but he explained afterwards that he was simply unable to. He kept saying 'Jason, I can't--' then something stopped him from telling me. He asked to talk to Casey on my cell, but he kept feeling like she was mad at him. He was totally paranoid. I explained to him that she wasn't mad at all, and was just laughing, but Jeff told me before that salvia makes him think people are mad at him.
I take the phone back and take my hit. It was like, every time I moved my eyes, my vision kept moving even after my eyes stopped. I found it difficult to talk, and I kept laughing. I came out of that pretty fast, and told Casey that every thing's gonna be fine, yadda yadda good night, I love you. I was disappointed. I expected so much more, but still... I wasn't too bummed, after all, I had salvia in my system.
Jeff takes his second hit, and while I'm preparing mine, he tries to tell me that in his hand he can see and feel the bow from the Zelda game he's been playing lately. He wasn't able to tell me what he'd been trying to explain until after his trip was nearly over. All that came out was 'Line!.. LIIINNNE!'
I take another hit. I'm holding it in my lungs, thinking that nothing's going to happen. Maybe I'm immune. Maybe this batch is bad. Then I glance at the computer screen with Guild Wars on, Jeff had been playing. Suddenly there was a ripple on the screen, and everything behind the monitor started to sort of.. shift... closer and farther from me. At this point I still have it in my lungs and I was bummed again because I thought that was all I'd feel. Just when I was about to completely give up hope I imagined the octopus from the Little Mermaid, and suddenly the computer monitor and speakers gave me the distinct impression of some sort of crustacean. My thoughts went like this: 'Nothing's going to happen... wait... a crab? Ohhh this is the salvia...' And I let my breath out.
Everything changed.
I had a narrow field of vision. Everything took on cartoonish colors, and nothing beyond that field of vision existed or mattered. Every object there became a block of color, and stretched away from me, and sort of turned sideways. There was a woman there, across the room from me. I couldn't see her, but I knew she was there somehow. I didn't hear her talk, but I knew she was calling me to her, to go with the waves of color that were moving away from me across the room. I needed to go. But part of me knew that if I did, I would knock stuff over and make lots of noise or get hurt. I resisted following the colours by falling over sideways onto the couch I was on. Everything started returning to normal, I was aware of Jeff being there again (although he sort of looked like a cartoon character) and I was brought back, to realize I was sweating all over.
When I got back, Jeff tossed me the little baggy with what remained of the salvia and told me 'Merry Christmas'. He had been tripping too while I was, although I had no idea he was even in the room with me at the time.  I had to get back on the trip and follow the colours this time. It felt so right.
So I light up again. As I'm holding the salvia in my lungs everything is the same as last time. The ripples, the dizziness, all of it. But then it changed. Before I let out my breath, there was a man with me, behind the couch. Again I couldn't see him, but he was there. I FELT his personality. He was kind, and nurturing. He wanted only for me to be happy. I felt that he wanted me to empty my lungs, so I did.
With the exhale, my world was sucked away in every direction. It was replaced with a new world. A cartoon world at first. The man was still there, watching over me, keeping me safe. He was even kind enough to give me a job in this new world. I was instantly put to work in a sort of assembly line, the various things in front of me were part of this strange machine. It was like I was part of a machine with a conveyor belt and stuff, in a factory. The room around me was completely pink, and I saw a lot of objects were dark dark blue. I had a coworker, a girl I couldn't see, but she was there, as another part of the machine.
My job was to pass along an endless supply of red, rectangular blocks, to keep the assembly line moving, passing them forward so the rest of the machine (the girl included) could do who knows what with them. But suddenly I snapped out of it a bit and realized I wasn't passing along red blocks, I was just waving the Dr Pepper can we smoked with up and down. When I realized this I dropped the can, and I felt so guilty, so ashamed that I had failed at my job. But the man reassured me, and 'told' me (no words were spoken) that he wanted to take me somewhere.
I stood up from the green couch and I was transported once again. No longer was I in a room. No, I was somewhere much more beautiful. I was standing on a green platform, high up in the sky, surrounded by blue sky and pearl white clouds. A few meters away was Jeff floating in the black chair he was sitting on, way up there in the sky with me. He was with a woman, and I needed to tell them both exactly how I was feeling and where I was, but I couldn't. No words would come out. I instantly realized that this must be because the man I was with did not want me to tell them, he just wanted me to go with him and enjoy the journey. Now I knew there was a girl present as well, with the man, and they wanted to take me with them, but as I turned from Jeff and the woman, I fell from the platform and the man and the girl slipped away from me.
That was it, I was back in my basement. Closed in by walls once more. There was Jeff, but no woman. There was my couch, not a green platform. I was still very disoriented and unable to speak, and I was trying to cling to the presences of the man and the girl, but they were gone. When I was mostly recovered, I started to tell Jeff all about my journey, but now paranoia was hitting me, and I had the impression that Jeff was mad at me, and that I was just annoying him with my story, but he eventually reassured me that that wasn't the case.
Well that's it. My first experience with salvia divinorum. I'd say it was quite a big success.
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.


STLR
public struct STLR : Codable
Undocumented
-
String
See moreDeclaration
Swift
public struct String : Codable
-
TerminalString
See moreDeclaration
Swift
public struct TerminalString : Codable
-
CharacterSet
See moreDeclaration
Swift
public struct CharacterSet : Codable
-
Undocumented
Declaration
Swift
public typealias CharacterRange = [TerminalString]
-
Undocumented
See moreDeclaration
Swift
public enum Literal : Codable
-
Annotation
See moreDeclaration
Swift
public struct Annotation : Codable
-
Undocumented
Declaration
Swift
public typealias Annotations = [Annotation]
-
Undocumented
See moreDeclaration
Swift
public enum Label : Codable
-
Undocumented
See moreDeclaration
Swift
public enum Terminal : Codable
-
Group
See moreDeclaration
Swift
public class Group : Codable
-
Element
See moreDeclaration
Swift
public class Element : Codable
-
Undocumented
Declaration
Swift
public typealias Choice = [Element]
-
Undocumented
Declaration
Swift
public typealias Sequence = [Element]
-
Undocumented
See moreDeclaration
Swift
public enum Expression : Codable
-
Undocumented
See moreDeclaration
Swift
public enum TokenType : Codable
-
Rule
See moreDeclaration
Swift
public struct Rule : Codable
-
ModuleImport
See moreDeclaration
Swift
public struct ModuleImport : Codable
-
Grammar
See moreDeclaration
Swift
public struct Grammar : Codable
-
Undocumented
Declaration
Swift
public typealias Modules = [ModuleImport]
-
Undocumented
Declaration
Swift
public typealias Rules = [Rule]
-
Undocumented
Declaration
Swift
public let grammar: Grammar
-
Parses the supplied string using the generated grammar into a new instance of the generated data structure
Declaration
Swift
public static func build(_ source: Swift.String) throws -> STLR
Parameters
source
The string to parse
Return Value
A new instance of the data-structure
-
Undocumented
Declaration
Swift
public static var grammar: OysterKit.Grammar { get }
-
Declaration
Swift
public var description: Swift.String { get }
-
Generates Swift code that uses OysterKit to implement the parsed grammar
Declaration
Swift
public func swift(in file: TextFile)
Parameters
grammar
The name of the class that will be generated
platform
The target platform for the class (note this will be depricated in a subsequent release so it is no longer required)
colors
A dictionary of colors that can be used by syntax coloring engines
Return Value
A
String
containing the Swift source ornil
if an error occured.
-
Validates the AST throwing an exception if validation fails
Declaration
Swift
public func validate() throws
-
Registers a new optimizer. Optimizers are applied in the order they are registered
Declaration
Swift
public static func register(optimizer: STLROptimizer)
Parameters
optimizer
The optimizer
-
Removes all registered optimizers
Declaration
Swift
public static func removeAllOptimizations()


Meeting Time Calculator
Here is the demo for CMSC 495 Group D.
Meeting Duration:
How many times per week do you meet?
1
2
3
4
5
How many people attend your meeting?
1
2
3
4
5
What is the typical salary range?
$25,000
$50,000
$75,000
What is time scale you want to calculate the total cost for?
One meeting
One Week
One Month
One Year
Calculate Time Spent


{% load i18n static custom_markdown %}
The UK’s Department for International Trade (DIT) has overall responsibility for promoting UK trade across the world and attracting foreign investment to our economy. We are a specialised government body with responsibility for negotiating international trade policy, supporting business, as well as delivering an outward-looking trade diplomacy strategy.
Legal disclaimer
Whereas every effort has been made to ensure that the information in this document is
accurate, the Department for International Trade does not accept liability for any errors,
omissions or misleading statements, and no warranty is given or responsibility accepted
as to the standing of any individual, firm, company or other organisation mentioned.
Copyright
© Crown copyright {{current_year}}
You may re-use this publication (not including logos) free of charge in any format or
medium, under the terms of the Open Government Licence.
To view this licence visit:
www.nationalarchives.gov.uk/doc/open-government-licence
or e-mail<EMAIL_ADDRESS>Where we have identified any third party copyright information in the material that you wish to use, you will need to obtain permission from the copyright holder(s) concerned. This document is also available on our website at gov.uk/dit


SOULS of Poets dead and gone,
What Elysium have ye known,
Happy field or mossy cavern,
Choicer than the Mermaid Tavern?
Have ye tippled drink more fine
Than mine host’s Canary wine?
Or are fruits of Paradise
Sweeter than those dainty pies
Of Venison? O generous food!
Drest as though bold Robin Hood
Would, with his Maid Marian,
Sup and bowse from horn and can.
I have heard that on a day
Mine host’s sign-board flew away
Nobody knew whither, till
An astrologer’s old quill
To a sheepskin gave the story—
Said he saw you in your glory
Underneath a new-old Sign
Sipping beverage divine,
And pledging with contented smack
The Mermaid in the Zodiac!
Souls of Poets dead and gone,
What Elysium have ye known—
Happy field or mossy cavern—
Choicer than the Mermaid Tavern?
IN a drear-nighted December,
Too happy, happy Tree,
Thy branches ne’er remember
The north cannot undo them
With a sleety whistle through them,
Nor frozen thawings glue them
From budding at the prime.
In a drear-nighted December,
Too happy, happy Brook,
Thy bubblings ne’er remember
Apollo’s summer look;
But with a sweet forgetting
They stay their crystal fretting,
Never, never petting
About the frozen time.
Ah would ’twere so with many
A gentle girl and boy!
But were there ever any
Writhed not at passe´d joy?
To know the change and feel it,
When there is none to heal it
Nor numbe´d sense to steal it—
Was never said in rhyme.
MY heart aches, and a drowsy numbness pains
My sense, as though of hemlock I had drunk,
Or emptied some dull opiate to the drains
One minute past, and Lethe-wards had sunk:
’Tis not through envy of thy happy lot,
But being too happy in thy happiness,—
That thou, light-winge´d Dryad of the trees,
In some melodious plot
Of beechen green, and shadows numberless,
Singest of summer in full-throated ease.
O, far a draught of vintage, that hath been
Cool’d a long age in the deep-delve´d earth,
Tasting of Flora and the country green,
Dance, and Proven¸al song, and sun-burnt mirth!
O for a beaker full of the warm South,
Full of the true, the blushful Hippocrene,
With beaded bubbles winking at the brim,
And purple-staine´d mouth;
That I might drink, and leave the world unseen,
And with thee fade away into the forest dim:
Fade far away, dissolve, and quite forget
What thou among the leaves hast never known,
The weariness, the fever, and the fret
Here, where men sit and hear each other groan;
Where palsy shakes a few, sad, last gray hairs,
Where youth grows pale, and spectre-thin, and dies;
Where but to think is to be full of sorrow
And leaden-eyed despairs;
Where Beauty cannot keep her lustrous eyes,
Or new Love pine at them beyond to-morrow.
Away! away! for I will fly to thee,
Not charioted by Bacchus and his pards,
But on the viewless wings of Poesy,
Though the dull brain perplexes and retards:
Already with thee! tender is the night,
And haply the Queen-Moon is on her throne,
Cluster’d around by all her starry Fays;
But here there is no light
Save what from heaven is with the breezes blown
Through verdurous glooms and winding mossy ways,
I cannot see what flowers are at my feet,
Nor what soft incense hangs upon the boughs,
But, in embalme´d darkness, guess each sweet
Wherewith the seasonable month endows
The grass, the thicket, and the fruit-tree wild;
White hawthorn, and the pastoral eglantine;
Fast fading violets cover’d up in leaves;
And mid-May’s eldest child,
The coming musk-rose, full of dewy wine,
The murmurous haunt of flies on summer eves.
Darkling I listen; and for many a time
I have been half in love with easeful Death,
Call’d him soft names in many a muse´d rhyme,
To take into the air my quiet breath;
Now more than ever seems it rich to die,
To cease upon the midnight with no pain,
While thou art pouring forth thy soul abroad
In such an ecstasy!
Still wouldst thou sing, and I have ears in vain—
To thy high requiem become a sod.
Thou wast not born for death, immortal Bird!
No hungry generations tread thee down;
The voice I hear this passing night was heard
In ancient days by emperor and clown:
Perhaps the self-same song that found a path
Through the sad heart of Ruth, when, sick for home,
She stood in tears amid the alien corn;
The same that oft-times hath
Charm’d magic casements, opening on the foam
Of perilous seas, in faery lands forlorn.
Forlorn! the very word is like a bell
To toll me back from thee to my sole self!
Adieu! the fancy cannot cheat so well
As she is famed to do, deceiving elf.
Adieu! adieu! thy plaintive anthem fades
Past the near meadows, over the still stream,
Up the hill-side; and now ’tis buried deep
In the next valley-glades:
Was it a vision, or a waking dream?
Fled is that music:—do I wake or sleep?
THOU still unravish’d bride of quietness,
Thou foster-child of Silence and slow Time,
Sylvan historian, who canst thus express
A flowery tale more sweetly than our rhyme:
What leaf-fringed legend haunts about thy shape
Of deities or mortals, or of both
In Tempe or the dales of Arcady?
What men or gods are these? What maidens loth?
What mad pursuit? What struggle to escape?
What pipes and timbrels? What wild ecstasy?
Heard melodies are sweet, but those unheard
Are sweeter; therefore, ye soft pipes, play on;
Not to the sensual ear, but, more endear’d,
Pipe to the spirit ditties of no tone:
Fair youth, beneath the trees, thou canst not leave
Thy song, nor ever can those trees be bare;
Bold Lover, never, never canst thou kiss,
Though winning near the goal—yet, do not grieve;
She cannot fade, though thou hast not thy bliss,
For ever wilt thou love, and she be fair!
Ah, happy, happy boughs! that cannot shed
Your leaves, nor ever bid the Spring adieu;
And, happy melodist, unwearièd,
For ever piping songs for ever new;
More happy love! more happy, happy love!
For ever warm and still to be enjoy’d,
For ever panting and for ever young;
All breathing human passion far above,
That leaves a heart high-sorrowful and cloy’d,
A burning forehead, and a parching tongue.
Who are these coming to the sacrifice?
To what green altar, O mysterious priest,
Lead’st thou that heifer lowing at the skies,
And all her silken flanks with garlands drest?
What little town by river or sea-shore,
Or mountain-built with peaceful citadel,
Is emptied of its folk, this pious morn?
And, little town, thy streets for evermore
Will silent be; and not a soul, to tell
Why thou art desolate, can e’er return.
O Attic shape! fair attitude! with brede
Of marble men and maidens overwrought,
With forest branches and the trodden weed;
Thou, silent form! dost tease us out of thought
As doth eternity. Cold Pastoral!
When old age shall this generation waste,
Thou shalt remain, in midst of other woe
Than ours, a friend to man, to whom thou say’st,
‘Beauty is truth, truth beauty,—that is all
Ye know on earth, and all ye need to know.’
SEASON of mists and mellow fruitfulness,
Close bosom-friend of the maturing sun;
Conspiring with him how to load and bless
With fruit the vines that round the thatch-eaves run;
To bend with apples the moss’d cottage-trees,
And fill all fruit with ripeness to the core;
To swell the gourd, and plump the hazel shells
With a sweet kernel; to set budding more,
And still more, later flowers for the bees,
Until they think warm days will never cease;
For Summer has o’erbrimm’d their clammy cells.
Who hath not seen Thee oft amid thy store?
Sometimes whoever seeks abroad may find
Thee sitting careless on a granary floor,
Thy hair soft-lifted by the winnowing wind;
Or on a half-reap’d furrow sound asleep,
Drowsed with the fume of poppies, while thy hook
Spares the next swath and all its twine´d flowers:
And sometimes like a gleaner thou dost keep
Steady thy laden head across a brook;
Or by a cider-press, with patient look,
Thou watchest the last oozings, hours by hours.
Where are the songs of Spring? Ay, where are they?
Think not of them, thou hast thy music too,
While barre´d clouds bloom the soft-dying day
And touch the stubble-plains with rosy hue;
Then in a wailful choir the small gnats mourn
Among the river-sallows, borne aloft
Or sinking as the light wind lives or dies;
And full-grown lambs loud bleat from hilly bourn;
Hedge-crickets sing, and now with treble soft
The redbreast whistles from a garden-croft;
And gathering swallows twitter in the skies.
O GODDESS! hear these tuneless numbers, wrung
By sweet enforcement and remembrance dear,
And pardon that thy secrets should be sung
Even into thine own soft-conchèd ear:
Surely I dream’d to-day, or did I see
The wingèd Psyche with awaken’d eyes?
I wander’d in a forest thoughtlessly,
And, on the sudden, fainting with surprise,
Saw two fair creatures, couchèd side by side
In deepest grass, beneath the whisp’ring roof
Of leaves and trembled blossoms, where there ran
A brooklet, scarce espied:
’Mid hush’d, cool-rooted flowers fragrant-eyed,
Blue, silver-white, and budded Tyrian,
They lay calm-breathing on the bedded grass;
Their arms embracèd, and their pinions too;
Their lips touch’d not, but had not bade adieu,
As if disjoinèd by soft-handed slumber,
And ready still past kisses to outnumber
At tender eye-dawn of aurorean love:
The wingèd boy I knew;
But who wast thou, O happy, happy dove?
His Psyche true!
O latest-born and loveliest vision far
Of all Olympus’ faded hierarchy!
Fairer than Phœbe’s sapphire-region’d star,
Or Vesper, amorous glow-worm of the sky;
Fairer than these, though temple thou hast none,
Nor altar heap’d with flowers;
Nor Virgin-choir to make delicious moan
Upon the midnight hours;
No voice, no lute, no pipe, no incense sweet
From chain-swung censer teeming;
No shrine, no grove, no oracle, no heat
Of pale-mouth’d prophet dreaming.
O brightest! though too late for antique vows,
Too, too late for the fond believing lyre,
When holy were the haunted forest boughs,
Holy the air, the water, and the fire;
Yet even in these days so far retired
From happy pieties, thy lucent fans,
Fluttering among the faint Olympians,
I see, and sing, by my own eyes inspired.
So let me be thy choir, and make a moan
Upon the midnight hours;
Thy voice, thy lute, thy pipe, thy incense sweet
From swingèd censer teeming:
Thy shrine, thy grove, thy oracle, thy heat
Of pale-mouth’d prophet dreaming.
Yes, I will be thy priest, and build a fane
In some untrodden region of my mind,
Where branchèd thoughts, new grown with pleasant pain,
Instead of pines shall murmur in the wind:
Far, far around shall those dark-cluster’d trees
Fledge the wild-ridgèd mountains steep by steep;
And there by zephyrs, streams, and birds, and bees,
The moss-lain Dryads shall be lull’d to sleep;
And in the midst of this wide quietness
A rosy sanctuary will I dress
With the wreath’d trellis of a working brain,
With buds, and bells, and stars without a name,
With all the gardener Fancy e’er could feign,
Who, breeding flowers, will never breed the same;
And there shall be for thee all soft delight
That shadowy thought can win,
A bright torch, and a casement ope at night,
To let the warm Love in!
NO, no! go not to Lethe, neither twist
Wolf’s-bane, tight-rooted, for its poisonous wine;
Nor suffer thy pale forehead to be kist
By nightshade, ruby grape of Proserpine;
Make not your rosary of yew-berries,
Nor let the beetle, nor the death-moth be
Your mournful Psyche, nor the downy owl
A partner in your sorrow’s mysteries;
For shade to shade will come too drowsily,
And drown the wakeful anguish of the soul.
But when the melancholy fit shall fall
Sudden from heaven like a weeping cloud,
That fosters the droop-headed flowers all,
And hides the green hill in an April shroud;
Then glut thy sorrow on a morning rose,
Or on the rainbow of the salt sand-wave,
Or on the wealth of globèd peonies;
Or if thy mistress some rich anger shows,
Emprison her soft hand, and let her rave,
And feed deep, deep upon her peerless eyes.
She dwells with Beauty—Beauty that must die;
And Joy, whose hand is ever at his lips
Bidding adieu; and aching Pleasure nigh,
Turning to poison while the bee-mouth sips:
Ay, in the very temple of Delight
Veil’d Melancholy has her sovran shrine,
Though seen of none save him whose strenuous tongue
Can burst Joy’s grape against his palate fine;
His soul shall taste the sadness of her might,
And be among her cloudy trophies hung.


CHEEKY DIG
Celtic hero Chris Sutton trolls Rangers as he tweets ‘and they are still coming’
by Aidan ScottCELTIC legend Chris Sutton has trolled Rangers as he insisted 'they are still coming'.
The Hoops claimed a TENTH successive domestic trophy yesterday as they beat the Light Blues in the Betfred Cup Final.
And BT Sport pundit Sutton couldn't resist having a dig at the Parkhead club's Old Firm rivals last night.
He simply tweeted: "And they are still coming..."
A reference to a phrase commonly used by Rangers fans, it has become a punchline for their Celtic counterparts in recent years.
And many Hoops supporters loved Sutton's latest dig at the Ibrox club.
@Jim0666 tweeted: "Still can't see them."
@BarbaraMcMahon8 replied: "God bless their deluded blue cotton socks."
@IncubatorMan added: "They've been and gone. Next!"
While @PolskaBhoy, in reference to Rangers star Scott Arfield's goal celebration, asked: "Are you sure?
"Even Arfield can't see them and he 'plays' for them."
Meanwhile, Celtic star Ryan Christie hilariously pranked Scott Brown during the team's dressing room celebrations.
After the skipper was pushed to the floor by Jonny Hayes, Christie then sat his bum on Brown's head and twerked.
The skipper saw the funny side however as he could be heard laughing with the midfielder afterwards.


| Class | ActiveRecord::Relation |
| In: |
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb
|
| Parent: | Object |
| JoinOperation | = | Struct.new(:relation, :join_class, :on) |
| ASSOCIATION_METHODS | = | [:includes, :eager_load, :preload] |
| MULTI_VALUE_METHODS | = | [:select, :group, :order, :joins, :where, :having] |
| SINGLE_VALUE_METHODS | = | [:limit, :offset, :lock, :readonly, :create_with, :from] |
| extensions | [RW] | |
| klass | [R] | |
| table | [R] |
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 18 18: def initialize(klass, table, &block) 19: @klass, @table = klass, table 20: 21: @implicit_readonly = nil 22: @loaded = nil 23: 24: SINGLE_VALUE_METHODS.each {|v| instance_variable_set("@#{v}_value""@#{v}_value", nil)} 25: (ASSOCIATION_METHODS + MULTI_VALUE_METHODS).each {|v| instance_variable_set("@#{v}_values""@#{v}_values", [])} 26: @extensions = [] 27: 28: apply_modules(Module.new(&block)) if block_given? 29: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 314 314: def ==(other) 315: case other 316: when Relation 317: other.to_sql == to_sql 318: when Array 319: to_a == other.to_a 320: end 321: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 86 86: def any? 87: if block_given? 88: to_a.any? { |*block_args| yield(*block_args) } 89: else 90: !empty? 91: end 92: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 41 41: def create(*args, &block) 42: with_create_scope { @klass.create(*args, &block) } 43: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 45 45: def create!(*args, &block) 46: with_create_scope { @klass.create!(*args, &block) } 47: end
Deletes the row with a primary key matching the id argument, using a SQL DELETE statement, and returns the number of rows deleted. Active Record objects are not instantiated, so the object‘s callbacks are not executed, including any :dependent association options or Observer methods.
You can delete multiple rows at once by passing an Array of ids.
Note: Although it is often much faster than the alternative, destroy, skipping callbacks might bypass business logic in your application that ensures referential integrity or performs other essential jobs.
# Delete a single row Todo.delete(1) # Delete multiple rows Todo.delete([2,3,4])
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 269 269: def delete(id_or_array) 270<EMAIL_ADDRESS>=> id_or_array).delete_all 271: end
Deletes the records matching conditions without instantiating the records first, and hence not calling the destroy method nor invoking callbacks. This is a single SQL DELETE statement that goes straight to the database, much more efficient than destroy_all. Be careful with relations though, in particular :dependent rules defined on associations are not honored. Returns the number of rows affected.
Post.delete_all("person_id = 5 AND (category = 'Something' OR category = 'Else')") Post.delete_all(["person_id = ? AND (category = ? OR category = ?)", 5, 'Something', 'Else'])
Both calls delete the affected posts all at once with a single DELETE statement. If you need to destroy dependent associations or call your before_* or after_destroy callbacks, use the destroy_all method instead.
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 245 245: def delete_all(conditions = nil) 246: conditions ? where(conditions).delete_all : arel.delete.tap { reset } 247: end
Destroy an object (or multiple objects) that has the given id, the object is instantiated first, therefore all callbacks and filters are fired off before the object is deleted. This method is less efficient than ActiveRecord#delete but allows cleanup methods and other actions to be run.
This essentially finds the object (or multiple objects) with the given id, creates a new object from the attributes, and then calls destroy on it.
# Destroy a single object Todo.destroy(1) # Destroy multiple objects todos = [1,2,3] Todo.destroy(todos)
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 220 220: def destroy(id) 221: if id.is_a?(Array) 222: id.map { |one_id| destroy(one_id) } 223: else 224: find(id).destroy 225: end 226: end
Destroys the records matching conditions by instantiating each record and calling its destroy method. Each object‘s callbacks are executed (including :dependent association options and before_destroy/after_destroy Observer methods). Returns the collection of objects that were destroyed; each will be frozen, to reflect that no changes should be made (since they can‘t be persisted).
Note: Instantiation, callback execution, and deletion of each record can be time consuming when you‘re removing many records at once. It generates at least one SQL DELETE query per record (or possibly more, to enforce your callbacks). If you want to delete many rows quickly, without concern for their associations or callbacks, use delete_all instead.
Person.destroy_all("last_login < '2004-04-04'") Person.destroy_all(:status => "inactive")
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 192 192: def destroy_all(conditions = nil) 193: if conditions 194: where(conditions).destroy_all 195: else 196: to_a.each {|object| object.destroy} 197: reset 198: end 199: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 310 310: def eager_loading? 311: @should_eager_load ||= (@eager_load_values.any? || (@includes_values.any? && references_eager_loaded_tables?)) 312: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 82 82: def empty? 83: loaded? ? @records.empty? : count.zero? 84: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 35 35: def initialize_copy(other) 36: reset 37: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 323 323: def inspect 324: to_a.inspect 325: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 273 273: def loaded? 274: @loaded 275: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 94 94: def many? 95: if block_given? 96: to_a.many? { |*block_args| yield(*block_args) } 97: else 98: @limit_value.present? ? to_a.many? : size > 1 99: end 100: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 31 31: def new(*args, &block) 32: with_create_scope { @klass.new(*args, &block) } 33: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 290 290: def primary_key 291: @primary_key ||=<EMAIL_ADDRESS>292: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 277 277: def reload 278: reset 279: to_a # force reload 280: self 281: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 283 283: def reset 284: @first = @last = @to_sql = @order_clause = @scope_for_create = @arel = @loaded = nil 285: @should_eager_load = @join_dependency = nil 286: @records = [] 287: self 288: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 49 49: def respond_to?(method, include_private = false) 50: return true if arel.respond_to?(method, include_private) || Array.method_defined?(method) || @klass.respond_to?(method, include_private) 51: 52: if match = DynamicFinderMatch.match(method) 53: return true if @klass.send(:all_attributes_exists?, match.attribute_names) 54: elsif match = DynamicScopeMatch.match(method) 55: return true if @klass.send(:all_attributes_exists?, match.attribute_names) 56: else 57: super 58: end 59: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 298 298: def scope_for_create 299: @scope_for_create ||= begin 300: @create_with_value || @where_values.inject({}) do |hash, where| 301: if where.is_a?(Arel::Predicates::Equality) 302: hash[where.operand1.name] = where.operand2.respond_to?(:value) ? where.operand2.value : where.operand2 303: end 304: 305: hash 306: end 307: end 308: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 78 78: def size 79: loaded? ? @records.length : count 80: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 61 61: def to_a 62: return @records if loaded? 63: 64: @records = eager_loading? ? find_with_associations : @klass.find_by_sql(arel.to_sql) 65: 66: preload = @preload_values 67: preload += @includes_values unless eager_loading? 68: preload.each {|associations| @klass.send(:preload_associations, @records, associations) } 69: 70: # @readonly_value is true only if set explicity. @implicit_readonly is true if there are JOINS and no explicit SELECT. 71: readonly = @readonly_value.nil? ? @implicit_readonly : @readonly_value 72: @records.each { |record| record.readonly! } if readonly 73: 74: @loaded = true 75: @records 76: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 294 294: def to_sql 295: @to_sql ||= arel.to_sql 296: end
Updates an object (or multiple objects) and saves it to the database, if validations pass. The resulting object is returned whether the object was saved successfully to the database or not.
# Updating one record: Person.update(15, :user_name => 'Samuel', :group => 'expert') # Updating multiple records: people = { 1 => { "first_name" => "David" }, 2 => { "first_name" => "Jeremy" } } Person.update(people.keys, people.values)
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 155 155: def update(id, attributes) 156: if id.is_a?(Array) 157: idx = -1 158: id.collect { |one_id| idx += 1; update(one_id, attributes[idx]) } 159: else 160: object = find(id) 161: object.update_attributes(attributes) 162: object 163: end 164: end
Updates all records with details given if they match a set of conditions supplied, limits and order can also be supplied. This method constructs a single SQL UPDATE statement and sends it straight to the database. It does not instantiate the involved models and it does not trigger Active Record callbacks or validations.
# Update all customers with the given attributes Customer.update_all :wants_email => true # Update all books with 'Rails' in their title Book.update_all "author = 'David'", "title LIKE '%Rails%'" # Update all avatars migrated more than a week ago Avatar.update_all ['migrated_at = ?', Time.now.utc], ['migrated_at > ?', 1.week.ago] # Update all books that match our conditions, but limit it to 5 ordered by date Book.update_all "author = 'David'", "title LIKE '%Rails%'", :order => 'created_at', :limit => 5
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 126 126: def update_all(updates, conditions = nil, options = {}) 127: if conditions || options.present? 128: where(conditions).apply_finder_options(options.slice(:limit, :order)).update_all(updates) 129: else 130: # Apply limit and order only if they're both present 131: if @limit_value.present? == @order_values.present? 132: arel.update(@klass.send(:sanitize_sql_for_assignment, updates)) 133: else 134: except(:limit, :order).update_all(updates) 135: end 136: end 137: end
# File /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/relation.rb, line 329 329: def method_missing(method, *args, &block) 330: if Array.method_defined?(method) 331: to_a.send(method, *args, &block) 332: elsif @klass.scopes[method] 333: merge(@klass.send(method, *args, &block)) 334: elsif @klass.respond_to?(method) 335: @klass.send(:with_scope, self) { @klass.send(method, *args, &block) } 336: elsif arel.respond_to?(method) 337: arel.send(method, *args, &block) 338: elsif match = DynamicFinderMatch.match(method) 339: attributes = match.attribute_names 340: super unless @klass.send(:all_attributes_exists?, attributes) 341: 342: if match.finder? 343: find_by_attributes(match, attributes, *args) 344: elsif match.instantiator? 345: find_or_instantiator_by_attributes(match, attributes, *args, &block) 346: end 347: else 348: super 349: end 350: end


Class: Vertx::Message
- Inherits:
-
Object
- Object
- Vertx::Message
- Defined in:
- src/main/api_shim/core/event_bus.rb
Overview
Represents a message received from the event bus
Instance Attribute Summary (collapse)
-
- (Object) body
readonly
Returns the value of attribute body.
Instance Method Summary (collapse)
-
- (Object) reply(reply, &reply_handler)
Reply to this message.
Instance Attribute Details
- (Object) body (readonly)
Returns the value of attribute body
172 173 174 |
# File 'src/main/api_shim/core/event_bus.rb', line 172 def body @body end |
Instance Method Details
- (Object) reply(reply, &reply_handler)
Reply to this message. If the message was sent specifying a receipt handler, that handler will be
called when it has received a reply. If the message wasn't sent specifying a receipt handler
this method does nothing.
Replying to a message this way is equivalent to sending a message to an address which is the same as the message id
of the original message.
193 194 195 196 197 198 199 200 201 |
# File 'src/main/api_shim/core/event_bus.rb', line 193 def reply(reply, &reply_handler) raise "A reply message must be specified" if reply == nil reply = EventBus.convert_msg(reply) if reply_handler != nil @j_del.reply(reply, InternalHandler.new(reply_handler)) else @j_del.reply(reply) end end |


Mean daily precipitation (mm/day)
We will use the daily GridMet files for pr_* from 2010-2020. This will be used to compute a table with rows representing catchments, and columns representing a daily catchment mean .
Fraction of precipitation falling as snow (i.e., on days colder than 0 °C)
We will use the daily GridMet files for tmin_* from 2010-2020 to create a matrix mask. This mask will be applied to the mean daily PPT matrix to compute the fraction. We will use a temperature threshold following Keith Jennings paper and the data found here
Seasonality and timing of precipitation (estimated using sine curves to represent the annual temperature and preciptiation cycles, positive [negative] values indicate that precipitation peaks in summer [winter], values close to 0 indicate uniform precipitation (eq 14)
NOT SURE YET.
Frequency of high precipitation days (≥5 times mean daily precipitation) (days/year)
Using the mean PPT matrix, the data will be grouped by year and the number of days exceeding 5mm will be computed .
average duration of high precipitation events (number of consecutive days ≥5 times mean daily precipitation) (days)
Need to look here for data.table::rleid
Will be computed from daily PPT matrix.
frequency of dry days (<1 mm/day) (days/year)
Will be computed from daily PPT matrix .
average duration of dry periods (number of consecutive days <1 mm/day) (days)
Need to look here for data.table::rleid
Catchment area (Geospatial Fabric estimate) (km2)
We be computed on hydrofabric geometries(sum(x >= rowMean(.))
.
Subsurface permeability (log10) m2 from GLHYMPS
Data from: Gleeson, T., Moosdorf ,N., Hartmann,J. and van Beek, L.P.H. (2014) A glimpse beneath earth’s surface: GLobal HYdrogeology MaPS (GLHYMPS) of permeability and porosity. Geophyscial Research Letters, 41: 2014GL059856 doi: 10.1002/2014gl059856
Using feild: logK_Ice_x100_INT from the supplied shapefile. Currently rasterizing this to the CONUS-Soil 1KM grid but this can be changed.
Fraction of the catchment area characterized as “Carbonate sedimentary rocks” from GLiM
class where xx in dataset == ‘sc’. See Table 1 here
clay fraction (of the soil material smaller than 2 mm, layers marked as oragnic material, water, bedrock and “other” were excluded) % (STATSGO)
Will extract the clay.bsq
file distributed by Penn State and compute catchment mean .
silt fraction (of the soil material smaller than 2 mm, layers marked as oragnic material, water, bedrock and “other” were excluded) % (STATSGO)
Will extract the silt.bsq
file distributed by Penn State and compute catchment mean.
sand fraction (of the soil material smaller than 2 mm, layers marked as organic material, water, bedrock and “other” were excluded) % (STATSGO)
Will extract the sand.bsq
file distributed by Penn State and compute catchment mean .
saturated hydraulic conductivity (estimated using a multiple linear regression based on sand and clay fraction for the layers marked as USDA soil texture class and a default value [36 cm/hr] for layers marked as organic material, layers marked as water, bedrock and “other” were excluded) cm/hr Table 4
volumetric porosity (saturated volumetric water content estimated using a multiple linear regression based on sand and clay fraction for the layers marked as USDA soil texture class and a default value [0.9] for layers marked as organic material, layers marked as water, bedrock and “other” were excluded)
forest fraction
Will extract the percent forest from the MODIS land cover fit to the 1km Soil Grid .
maximum monthly mean of the green vegetation fraction (based on 12 monthly means)
Will Use MODIS 8 day NDVI to Compute GVF as {(NDVI - NDVImax)/NDVImax-NDVImin .
where NDVI is the NDVI value at a grid point i, NDVI is a global constant given by the 5th percentile of NDVImax for the barren land use class, and NDVIV is the 90th percentile of NDVImax values for the land use class at grid point i. As NDVI composites are collected over a longer time period, the NDVImax can be periodically updated to reflect subtle variations in the distributions of NDVImax by land-use classification. here
difference between the maximum and mimumum monthly mean of the green vegetation fraction (based on 12 monthly means)
difference between the maximum and mimumum monthly mean of the leaf area index (based on 12 monthly means)
Will Use Monthly MODIS LAI.
maximum monthly mean of the leaf area index (based on 12 monthly means)
Will Use Monthly MODIS LAI.
var: prcp, tmax. tmin, pet
dimensions : 585, 1386, 810810 (nrow, ncol, ncell)
resolution : 0.04166667, 0.04166667 (x, y)
extent : -124.7875, -67.0375, 25.04583, 49.42083 (xmin, xmax, ymin, ymax)
crs : +proj=longlat +ellps=WGS84 +no_defs
dimensions : 862, 3283, 2829946 (nrow, ncol, ncell)
resolution : 0.01160146, 0.01160146 (x, y)
extent : -155.5724, -117.4848, 39.99954, 50 (xmin, xmax, ymin, ymax)
crs : +proj=longlat +a=6378249.145 +rf=293.465 +no_defs
dimensions : 4970, 17121, 85091370 (nrow, ncol, ncell)
resolution : 0.006036802, 0.006036802 (x, y)
extent : -155.5724, -52.2163, 19.99709, 50 (xmin, xmax, ymin, ymax)
crs : +proj=longlat +a=6378249.145 +rf=293.465 +no_defs
dimensions : 2485, 8560, 21271600 (nrow, ncol, ncell)
resolution : 0.0120736, 0.0120736 (x, y)
extent : -155.5724, -52.22233, 19.99709, 50 (xmin, xmax, ymin, ymax)
crs : +proj=longlat +a=6378249.145 +rf=293.465 +no_defs
dimensions : 2896, 4616, 13367936 (nrow, ncol, ncell)
resolution : 1000, 1000 (x, y)
extent : -2357000, 2259000, 277000, 3173000 (xmin, xmax, ymin, ymax)
crs : +proj=aea +lat_0=23 +lon_0=-96 +lat_1=29.5 +lat_2=45.5 +x_0=0 +y_0=0 +datum=NAD27 +units=m +no_defs


| DOSE: |
|
insufflated |
Heroin |
(powder / crystals) |
Most heroin users find out how much to snort from the 1st person they do it with. Usually that's between a 1/4 or less of the bag. I'm not sure what that weighs out too, but I'm talking about the stamp bags, they are relatively small.
The tolerance builds extremely quick, and by the following week are usually up to a full bag. My friend at the end of her using (which was about 8 to 10 months into it), was sniffing 8 bags at a time to feel the effect that still didn't touch the first time she did it. But it's just as addicting and gives the same withdrawal.
The only upside (if you wanna call it that) is that it's stronger than smoking it. And the first time people do it, I've heard from many people, the hit is almost as amazing as shooting it. The hit peaks in about 10 minutes, and stays pretty close to that feeling for a few hours. Then I still feel relaxed for probably about 8 hours.
After a while, it's almost impossible to get that great feeling. It just makes me feel normal, even when I increase the dose (unless we're talking like 15-20 bags here, and that can get steep at between $10 or $20 a bag) so I think that's why probably 1/2 the people who sniff it get to shooting it along the line.
The bags aren't that strong around here in Pittsburgh lately it seems, so I also believe the bags to have very low purity. Maybe if it was more pure, people would probably sniff way less.
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.


User
Methods that allow hotel clients to make bookings.
Example:
const user = new User({
account: '0xabcd...123', // Client's account address
gasMargin: 1.24, // Multiple to increase gasEstimate by to ensure tx success.
tokenAddress: '0x123...abcd', // LifToken contract address
web3: web3 // Web3 object instantiated with a provider
})
Constructor Summary
| Public Constructor | ||
| public |
constructor(options: Object): User Instantiates a User with an Ethereum account address, a LifToken address, and a Web3 instance whose provider has been set. |
Member Summary
| Public Members | ||
| public |
account: * |
|
| public |
bookings: * |
|
| public |
context: {} |
|
| public |
token: * |
Method Summary
| Public Methods | ||
| public |
async balanceCheck(cost: Number): Boolean Returns true if user account's LifToken balance is greater than or equal to a booking's LifToken cost. |
|
| public |
async book(hotelAddress: Address, unitAddress: Address, fromDate: Date, daysAmount: Number, guestData: String): Promievent Initiates a non-token booking |
|
| public |
async bookWithLif(hotelAddress: Address, unitAddress: Address, fromDate: Date, daysAmount: Number, guestData: String): Promievent Initiates a token-payment booking |
| Private Methods | ||
| private |
async _compileBooking(hotelAddress: *, unitAddress: *, fromDay: *, daysAmount: *, guestData: *): * Private method that composes a non-token booking's data for execution by sendTransaction |
|
| private |
async _compileLifBooking(hotelAddress: *, unitAddress: *, fromDay: *, daysAmount: *, guestData: *): * Private method that composes a token based booking's data for execution by sendTransaction |
Public Constructors
Public Members
public account: * source
public bookings: * source
public context: {} source
public token: * source
Public Methods
public async balanceCheck(cost: Number): Boolean source
Returns true if user account's LifToken balance is greater than or equal to a booking's LifToken cost.
Params:
| Name | Type | Attribute | Description |
| cost | Number | Lif 'ether' |
public async book(hotelAddress: Address, unitAddress: Address, fromDate: Date, daysAmount: Number, guestData: String): Promievent source
Initiates a non-token booking
Return:
| Promievent |
public async bookWithLif(hotelAddress: Address, unitAddress: Address, fromDate: Date, daysAmount: Number, guestData: String): Promievent source
Initiates a token-payment booking
Return:
| Promievent |
Private Methods
private async _compileBooking(hotelAddress: *, unitAddress: *, fromDay: *, daysAmount: *, guestData: *): * source
Private method that composes a non-token booking's data for execution by sendTransaction
Params:
| Name | Type | Attribute | Description |
| hotelAddress | * | ||
| unitAddress | * | ||
| fromDay | * | ||
| daysAmount | * | ||
| guestData | * |
Return:
| * |
private async _compileLifBooking(hotelAddress: *, unitAddress: *, fromDay: *, daysAmount: *, guestData: *): * source
Private method that composes a token based booking's data for execution by sendTransaction
Params:
| Name | Type | Attribute | Description |
| hotelAddress | * | ||
| unitAddress | * | ||
| fromDay | * | ||
| daysAmount | * | ||
| guestData | * |
Return:
| * |


|
Cabron
(Red Hot Chili Peppers) |
|
Cabron
Cabron Cabron Cabron I see you in the park You're always wearing dark or blue My dawg and me And anyone from any other crew I am small but I am strong I'll get it on with you If you want me to What else can I do Everyone would take a cue from anything you do If you want them to What else can it do I dont' want to fight I want to get along with you This time of nights for singing songs about the love from you Cabron Cabron Cabron Cabron I come around and make peace get down have a barbecue Let's keep the moon awake and do electric boogaloo I am small but I am strong You see I'm just like you If you only knew That I'm just like you All the world would take a cue from anything you do If you only knew That they're just like you I don't want to fight I want to get along with you This time of nights for singing songs about the love from you I don't want to fight I want to get along with you This time of nights for singing songs about the love from you Cabron Cabron Cabron Cabron Cabron Cabron Cabron Cabron If you want me too What else can I do Cause I'm just like you If you only knew Cabron Cabron |