Trump says he wants Ukraine’s President Zelenskiy to visit the Whote House
WASHINGTON, Nov 3 — President Donald Trump said today that he would like Ukrainian President Volodymyr Zelenskiy to visit the White House, and expected the Ukrainian leader to take him up on such an invitation.
“I would certainly say I’d invite him,” Trump told reporters outside the White House before departing for New York. “I would love to have him come to the White House if he’d like to come, and I think he’d like to come.”
A July 25 phone call in which Trump asked Zelenskiy to investigate his political rival, Joe Biden, and Biden’s family, has spurred an impeachment inquiry by Democrats in the US House of Representatives.— Reuters


General
Class
Claptrap (Fragtrap)
Nisha (Lawbringer)
Wilhelm (Enforcer)
Athena (Gladiator)
Jack (Doppelganger)
Aurelia (Baroness)
Experience Level
Sync
Experience Points
Sync
Overpower Level
General Skill Points
Specialist Skill Points
Customization
Name
Head
None
Skin
None


Get Status Report
GET:
/status-report
Report Point State
POST:
/report-status
Point Name:
State:
OK
ERROR
Submit


Bases: astropy.io.fits.hdu.image._ImageBaseHDU, astropy.io.fits.hdu.base.ExtensionHDU
FITS image extension HDU class.
Add the CHECKSUM and DATASUM cards to this HDU with the values set to the checksum calculated for the HDU and the data respectively. The addition of the DATASUM card may be overridden.
| Parameters : | when : str, optional
override_datasum : bool, optional
blocking: str, optional :
|
|---|
Notes
For testing purposes, first call add_datasum with a when argument, then call add_checksum with a when argument and override_datasum set to True. This will provide consistent comments for both cards and enable the generation of a CHECKSUM card with a consistent value.
Add the DATASUM card to this HDU with the value set to the checksum calculated for the data.
| Parameters : | when : str, optional
blocking: str, optional :
|
|---|---|
| Returns : | checksum : int
|
Notes
For testing purposes, provide a when argument to enable the comment value in the card to remain consistent. This will enable the generation of a CHECKSUM card with a consistent value.
Make a copy of the HDU, both header and data are copied.
Calculates and returns the number of bytes that this HDU will write to a file.
| Parameters : | None : |
|---|---|
| Returns : | Number of bytes : |
Returns a dictionary detailing information about the locations of this HDU within any associated file. The values are only valid after a read or write of the associated file with no intervening changes to the HDUList.
| Parameters : | None : |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Returns : | dictionary or None :
|
Creates a new HDU object of the appropriate type from a string containing the HDU’s entire header and, optionally, its data.
Note: When creating a new HDU from a string without a backing file object, the data of that HDU may be read-only. It depends on whether the underlying string was an immutable Python str/bytes object, or some kind of read-write memory buffer such as a memoryview.
| Parameters : | data : str, bytearray, memoryview, ndarray
fileobj : file (optional)
offset : int (optional)
checksum : bool (optional)
ignore_missing_end : bool (optional)
kwargs : (optional)
|
|---|
Read the HDU from a file. Normally an HDU should be opened with fitsopen() which reads the entire HDU list in a FITS file. But this method is still provided for symmetry with writeto().
| Parameters : | fileobj : file object or file-like object
checksum : bool
ignore_missing_end : bool
|
|---|
Check the existence, location, and value of a required Card.
TODO: Write about parameters
If pos = None, it can be anywhere. If the card does not exist, the new card will have the fix_value as its value when created. Also check the card’s value by using the test argument.
Execute the verification with selected option.
Scale image data by using BSCALE/BZERO.
Call to this method will scale data and update the keywords of BSCALE and BZERO in _header. This method should only be used right before writing to the output file, as the data will be scaled and is therefore not very usable after the call.
| Parameters : | type : str, optional
option : str
bscale, bzero : int, optional
|
|---|
Access a section of the image array without loading the entire array into memory. The Section object returned by this attribute is not meant to be used directly by itself. Rather, slices of the section return the appropriate slice of the data, and loads only that section into memory.
Sections are mostly obsoleted by memmap support, but should still be used to deal with very large scaled images. See the Data Sections section of the PyFITS documentation for more details.
Shape of the image array–should be equivalent to self.data.shape.
Size (in bytes) of the data portion of the HDU.
Update the extension name associated with the HDU.
If the keyword already exists in the Header, it’s value and/or comment will be updated. If it does not exist, a new card will be created and it will be placed before or after the specified location. If no before or after is specified, it will be appended at the end.
| Parameters : | value : str
comment : str, optional
before : str or int, optional
after : str or int, optional
savecomment : bool, optional
|
|---|
Update the extension version associated with the HDU.
If the keyword already exists in the Header, it’s value and/or comment will be updated. If it does not exist, a new card will be created and it will be placed before or after the specified location. If no before or after is specified, it will be appended at the end.
| Parameters : | value : str
comment : str, optional
before : str or int, optional
after : str or int, optional
savecomment : bool, optional
|
|---|
Update the header keywords to agree with the data.
Verify all values in the instance.
| Parameters : | option : str
|
|---|
Verify that the value in the CHECKSUM keyword matches the value calculated for the current HDU CHECKSUM.
| Returns : | valid : int
|
|---|
Verify that the value in the DATASUM keyword matches the value calculated for the DATASUM of the current HDU data.
| Returns : | valid : int
|
|---|
Works similarly to the normal writeto(), but prepends a default PrimaryHDU are required by extension HDUs (which cannot stand on their own).
Bases: astropy.io.fits.hdu.table.BinTableHDU
Compressed Image HDU class.
Add the CHECKSUM and DATASUM cards to this HDU with the values set to the checksum calculated for the HDU and the data respectively. The addition of the DATASUM card may be overridden.
| Parameters : | when : str, optional
override_datasum : bool, optional
blocking: str, optional :
|
|---|
Notes
For testing purposes, first call add_datasum with a when argument, then call add_checksum with a when argument and override_datasum set to True. This will provide consistent comments for both cards and enable the generation of a CHECKSUM card with a consistent value.
Add the DATASUM card to this HDU with the value set to the checksum calculated for the data.
| Parameters : | when : str, optional
blocking: str, optional :
|
|---|---|
| Returns : | checksum : int
|
Notes
For testing purposes, provide a when argument to enable the comment value in the card to remain consistent. This will enable the generation of a CHECKSUM card with a consistent value.
Make a copy of the table HDU, both header and data are copied.
Dump the table HDU to a file in ASCII format. The table may be dumped in three separate files, one containing column definitions, one containing header parameters, and one for table data.
| Parameters : | datafile : file path, file object or file-like object, optional
cdfile : file path, file object or file-like object, optional
hfile : file path, file object or file-like object, optional
clobber : bool
|
|---|
Notes
The primary use for the dump method is to allow viewing and editing the table data and parameters in a standard text editor. The load method can be used to create a new table from the three plain text (ASCII) files.
datafile: Each line of the data file represents one row of table data. The data is output one column at a time in column order. If a column contains an array, each element of the column array in the current row is output before moving on to the next column. Each row ends with a new line.
Integer data is output right-justified in a 21-character field followed by a blank. Floating point data is output right justified using ‘g’ format in a 21-character field with 15 digits of precision, followed by a blank. String data that does not contain whitespace is output left-justified in a field whose width matches the width specified in the TFORM header parameter for the column, followed by a blank. When the string data contains whitespace characters, the string is enclosed in quotation marks (""). For the last data element in a row, the trailing blank in the field is replaced by a new line character.
For column data containing variable length arrays (‘P’ format), the array data is preceded by the string 'VLA_Length= ' and the integer length of the array for that row, left-justified in a 21-character field, followed by a blank.
For column data representing a bit field (‘X’ format), each bit value in the field is output right-justified in a 21-character field as 1 (for true) or 0 (for false).
cdfile: Each line of the column definitions file provides the definitions for one column in the table. The line is broken up into 8, sixteen-character fields. The first field provides the column name (TTYPEn). The second field provides the column format (TFORMn). The third field provides the display format (TDISPn). The fourth field provides the physical units (TUNITn). The fifth field provides the dimensions for a multidimensional array (TDIMn). The sixth field provides the value that signifies an undefined value (TNULLn). The seventh field provides the scale factor (TSCALn). The eighth field provides the offset value (TZEROn). A field value of "" is used to represent the case where no value is provided.
hfile: Each line of the header parameters file provides the definition of a single HDU header card as represented by the card image.
Calculates and returns the number of bytes that this HDU will write to a file.
| Parameters : | None : |
|---|---|
| Returns : | Number of bytes : |
Returns a dictionary detailing information about the locations of this HDU within any associated file. The values are only valid after a read or write of the associated file with no intervening changes to the HDUList.
| Parameters : | None : |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Returns : | dictionary or None :
|
Creates a new HDU object of the appropriate type from a string containing the HDU’s entire header and, optionally, its data.
Note: When creating a new HDU from a string without a backing file object, the data of that HDU may be read-only. It depends on whether the underlying string was an immutable Python str/bytes object, or some kind of read-write memory buffer such as a memoryview.
| Parameters : | data : str, bytearray, memoryview, ndarray
fileobj : file (optional)
offset : int (optional)
checksum : bool (optional)
ignore_missing_end : bool (optional)
kwargs : (optional)
|
|---|
Deprecated since version 3.0: Use the columns attribute instead.
Returns the table’s column definitions.
Create a table from the input ASCII files. The input is from up to three separate files, one containing column definitions, one containing header parameters, and one containing column data.
The column definition and header parameters files are not required. When absent the column definitions and/or header parameters are taken from the header object given in the header argument; otherwise sensible defaults are inferred (though this mode is not recommended).
| Parameters : | datafile : file path, file object or file-like object
cdfile : file path, file object, file-like object, optional
hfile : file path, file object, file-like object, optional
replace : bool
header : Header object
|
|---|
Notes
The primary use for the load method is to allow the input of ASCII data that was edited in a standard text editor of the table data and parameters. The dump method can be used to create the initial ASCII files.
datafile: Each line of the data file represents one row of table data. The data is output one column at a time in column order. If a column contains an array, each element of the column array in the current row is output before moving on to the next column. Each row ends with a new line.
Integer data is output right-justified in a 21-character field followed by a blank. Floating point data is output right justified using ‘g’ format in a 21-character field with 15 digits of precision, followed by a blank. String data that does not contain whitespace is output left-justified in a field whose width matches the width specified in the TFORM header parameter for the column, followed by a blank. When the string data contains whitespace characters, the string is enclosed in quotation marks (""). For the last data element in a row, the trailing blank in the field is replaced by a new line character.
For column data containing variable length arrays (‘P’ format), the array data is preceded by the string 'VLA_Length= ' and the integer length of the array for that row, left-justified in a 21-character field, followed by a blank.
For column data representing a bit field (‘X’ format), each bit value in the field is output right-justified in a 21-character field as 1 (for true) or 0 (for false).
cdfile: Each line of the column definitions file provides the definitions for one column in the table. The line is broken up into 8, sixteen-character fields. The first field provides the column name (TTYPEn). The second field provides the column format (TFORMn). The third field provides the display format (TDISPn). The fourth field provides the physical units (TUNITn). The fifth field provides the dimensions for a multidimensional array (TDIMn). The sixth field provides the value that signifies an undefined value (TNULLn). The seventh field provides the scale factor (TSCALn). The eighth field provides the offset value (TZEROn). A field value of "" is used to represent the case where no value is provided.
hfile: Each line of the header parameters file provides the definition of a single HDU header card as represented by the card image.
Read the HDU from a file. Normally an HDU should be opened with fitsopen() which reads the entire HDU list in a FITS file. But this method is still provided for symmetry with writeto().
| Parameters : | fileobj : file object or file-like object
checksum : bool
ignore_missing_end : bool
|
|---|
Check the existence, location, and value of a required Card.
TODO: Write about parameters
If pos = None, it can be anywhere. If the card does not exist, the new card will have the fix_value as its value when created. Also check the card’s value by using the test argument.
Execute the verification with selected option.
Scale image data by using BSCALE and BZERO.
Calling this method will scale self.data and update the keywords of BSCALE and BZERO in self._header and self._image_header. This method should only be used right before writing to the output file, as the data will be scaled and is therefore not very usable after the call.
| Parameters : | type : str, optional
option : str, optional
bscale, bzero : int, optional
|
|---|
Shape of the image array–should be equivalent to self.data.shape.
Size (in bytes) of the data portion of the HDU.
Deprecated since version 3.1: Use load() instead.
Deprecated since version 3.1: Use dump() instead.
Update header keywords to reflect recent changes of columns.
Compress the image data so that it may be written to a file.
Update the table header cards to match the compressed data.
Update the table header (_header) to the compressed image format and to match the input data (if any). Create the image header (_image_header) from the input image header (if any) and ensure it matches the input data. Create the initially-empty table data array to hold the compressed data.
This method is mainly called internally, but a user may wish to call this method after assigning new data to the CompImageHDU object that is of a different type.
| Parameters : | image_header : Header instance
name : str, optional
compressionType : str, optional
tileSize : sequence of int, optional
hcompScale : float, optional
hcompSmooth : float, optional
quantizeLevel : float, optional
|
|---|
Update the extension name associated with the HDU.
If the keyword already exists in the Header, it’s value and/or comment will be updated. If it does not exist, a new card will be created and it will be placed before or after the specified location. If no before or after is specified, it will be appended at the end.
| Parameters : | value : str
comment : str, optional
before : str or int, optional
after : str or int, optional
savecomment : bool, optional
|
|---|
Update the extension version associated with the HDU.
If the keyword already exists in the Header, it’s value and/or comment will be updated. If it does not exist, a new card will be created and it will be placed before or after the specified location. If no before or after is specified, it will be appended at the end.
| Parameters : | value : str
comment : str, optional
before : str or int, optional
after : str or int, optional
savecomment : bool, optional
|
|---|
Verify all values in the instance.
| Parameters : | option : str
|
|---|
Verify that the value in the CHECKSUM keyword matches the value calculated for the current HDU CHECKSUM.
| Returns : | valid : int
|
|---|
Verify that the value in the DATASUM keyword matches the value calculated for the DATASUM of the current HDU data.
| Returns : | valid : int
|
|---|
Works similarly to the normal writeto(), but prepends a default PrimaryHDU are required by extension HDUs (which cannot stand on their own).


Base64 Encoding
This algorithm isn’t technically an encryption/decryption algorithm, but it does allow us to encode information so it can be more easily encrypted. Base64 encoding is a technique we can use to turn a stream of arbitrary data (not just letters) into letters and numbers. Sometimes we need to do this in order to send the information without it getting lost or misinterpreted. It can also be used as a first step to encode our information before we encrypt it.
The first thing to understand about Base64 encoding is that we will be dealing with binary numbers. If you don’t know about binary numbers, I suggest you read this Wikipedia article on binary numbers and this Wikipedia article on binary code and make sure it makes sense before you move on.
The core premise behind Base64 encoding is that a series of characters in the message is really just a continuous stream of 1s and 0s. Usually, we look at those 1s and 0s in 8-bit chunks and interpret the value as a character see the ASCII chart for more info. With Base64 we put three of those 8-bit values together (giving us 24-bits total) and look at them as four 6-bit values. Since 6-bit values are hard for humans to read and understand, we need to come up with a representation for each 6-bit value that will be easy to use. Below is a table that shows how we are going to represent our 6-bit values.
To use the table, we look for the 6-bit binary value we need to represent and then look over at the Char in that row. Thus, if we want to encode the values 010110
and 111000
the Chars would be W
and 4
respectively. Note that the table has both lowercase and uppercase letters so you need to make sure you pay attention to the case.
Let’s look at an example of how we would encode a message into base64. The example word we will use is Man
:
Notice how we took 3 characters, which are each 1 byte long, and turned it into 4 6-bit values that we turned back into characters using our index table. Lots of steps involved!
What happens when we don’t have an even multiple of 3 in our source message? We need to do some padding to finish out the 24-bit number nicely. In base64 we use the =
symbol as the padding character. Let’s assume we only have one character to encode, the letter M
.
Now we have enough information to do an example. Let’s take the phrase Hello World!
and base64 encode it. Here is the algorithm:
- Look up the ASCII value for the character in the ASCII chart and write down the binary code.
Now it is your turn:
- Write a message that you want to encrypt.
- Create a keyword you would like to use.
- Encrypt your message.
- Pass the message and the keyword to the person with you and see if they can understand it.
Keep doing those steps until you feel like you understand the substitution cipher well.
Click here to learn more about the Vigenère cipher.
Click the next activity on the left when you are ready to continue.


12/04/2016
Things have been going downhill lately. Every day it is harder and harder to do things for myself. Or at all.
I feel scared of things that don’t really matter to me. I don’t know how to face daily activities anymore.
Maybe I should just give up altogether.
- Lila


eBay Black Friday Deals – Black Friday discount code now live
by Alice MarshalleBay Black Friday Deals: When it comes to the best Black Friday deals, eBay likes to do it with juicy discount codes that save consumers up to 20% off a whole host of incredible gadgets and gizmos.
Whilst we’re still waiting for some of the top retailers to unveil their Black Friday offers (Amazon, we’re looking at you), eBay is finally weighing in on the biggest sales period of the year. The biggest online marketplace has launched its first in what we imagine will be a series of early Black Friday discount codes.
Yes, when quoting PRIZE20 right now you can save at a number of retailers and sellers on eBay across the usual variety of products, including smart watches, tablets, headphones and so much more. Running until midnight on November 21st, we imagine this will be the first of many discount codes from eBay over the Black Friday and Cyber Monday period.
Please be aware the PRIZE20 discount code can only be used once per buyer and gives consumers a maximum discount of £75 on minimum spends of at least £25.
Our favourite eBay Black Friday Deal
Calling all audiophiles. You can now pick up the Bowers & Wilkins PX wireless noise cancelling headphones for a surprisingly low price. Usually retailing at £329.99, these Bowers & Wilkins headphones sit well and truly in the premium bracket when it comes to the headphone god tier. However, right now, when using the 20% off eBay discount code PRIZE20, you can pick up this already reduced listing for £207.99.
Saving well over the £100 mark for a set of headphones that come Trusted Reviews recommended, the Bowers & Wilkins PX wireless headphones do indeed pack a lot of incredible tech. Bringing you ingenious noise cancelling technology, you can switch between three modes to let in and block out as much as you want.
‘City’ mode is designed to ensure your safety, still able to hear traffic as you roam from A to B. ‘Office’ mode, meanwhile, is ideal for when you’re at work and still need to be clued in when a colleague is trying to grab your attention. Its maximum noise cancelling level is ‘Flight’ mode, able to block out even the most roaring of aeroplane engines as you sink into a long haul flight.
Quick pairing is also something to shout about with the B&W PX headphones, incorporating smart sensors meaning they’ll know when they’re slipped on and off, playing and pausing your music for an even more streamlined listening experience.
Completely wireless with both Bluetooth and noise cancelling on, we found the headphones to last about 22 hours, which is no bad thing. When not using noise cancellation, you can enjoy up to 29 hours. Utilise the cables and you can expect 50 hours of playback time.
A great pair, we awarded them a 10 out of 10 rating. Now down to £207.99, this is a price to seriously consider jumping at before they go out of stock or the code expires November 21st.
Best eBay Black Friday Deals
Jump to eBay Black Friday deals:
Laptops | TVs | Headphones | Soundbars | Vacuum Cleaners
eBay Black Friday Laptop Deals
eBay Black Friday TV Deals
eBay Black Friday Headphones Deals
eBay Black Friday Soundbar Deals
eBay Black Friday Vacuum Cleaner Deals
What is eBay’s returns policy?
That’s a very good question – and there’s no single answer, given the fact that eBay simply acts as an intermediary between the buyers and sellers of various products.
This means there isn’t an overarching rule that covers the entire marketplace, but rather that individual sellers dictate their own return policies. Typically, larger retailers that operate on eBay, such as Argos, will offer a guarantee of at least 14 days.
However, when you’re buying from a smaller seller they could opt for a No Returns policy that means you won’t be able to get your money back if you simply change your mind.
As a result, you should always check the fine print before buying something on eBay – every item up for sale on the site clearly displays the return policy of its seller on the listing page.
Faulty products are covered by eBay’s Money Back Guarantee, so you can still shop with confidence that you won’t be sold a lemon. Refunds requested for this reason can take some time to process, though, and you’ll only be eligible for one if you paid via PayPal.
Does eBay offer student discount?
eBay does not offer a student discount scheme – but that’s not to say students can’t find a great deal on eBay. Far from it.
The whole point of eBay is to help people save money and make money in equal measure, which means it’s a great place to shop for cheap wares, especially if you’re happy with second-hand or refurbished goods.
Whether it’s finding a TV to pimp your new student digs, a laptop to help you complete your coursework, or the books you might need to actually learn some stuff in the first place, eBay is a great place to look.
Be sure to check the RRP (regular retail price) of the items you’re after first, to make sure you’re not entering an unnecessary bidding war – and note the condition that items are being offered in so you’re not disappointed on arrival.
Provided you’re happy with those two things – and the returns policy, as previously mentioned – you could be one of the countless students who have used eBay to bag a bargain over the years. Ourselves included.
Does eBay offer a trade-in scheme?
Yes – eBay is arguably the best known trade-in scheme on the planet, though it works a little bit differently from passing on your unwanted goods to mainstream retailers like John Lewis or Currys.
Where these outfits let you trade-in your old kit to get a discount off an equivalent item – trading in an old iPhone for money off a new one, for instance – eBay lets you sell practically anything that’s legal.
Some of the things commonly sold on eBay include old tech – phones, laptops, TVs etc – as well as clothing, cosmetics and even cars.
Sure, it’s a slightly more laborious process than simply heading down to the High Street with your scraggly old phone to buy a new one for a bit less than the asking price, but it offers you a huge amount of flexibility. Put the cash against an equivalent item, stash it away for a rainy day, blow it down the pub on a Friday – the choice is entirely yours.
In fact, many people make a living – or at least an extra crust – selling stuff on eBay, and there’s nothing stopping you from joining their ranks.
Does eBay offer click and collect?
You have the option to use a click and collect service when shopping with eBay, though not all sellers will participate in it. As with pretty much all aspects of shopping eBay, your click and collect mileage will vary depending on who you’re buying from.
The marketplace’s official business seller partners – retailers like Argos – will often give you the option of collecting from one of their outlets. Sainsbury’s stores can also be utilised in a similar vein as can Collect+ shops, of which over 3,500 exist in the UK.
This means click and collect is definitely possible when shopping with eBay, but check before you buy – the option should be clearly flagged by the seller on the listing page of the item.
Likewise, your delivery options for eBay purchases will be dictated by the seller, so read the fine print before sealing the deal. This is especially important if you’re hoping for something to arrive before a specific date – Christmas, anyone? – as independent sellers may not deliver as quickly as mainstream retailers.
Want more Black Friday deals?
- Black Friday and Cyber Monday 2019 – Everything You Need to Know
- When is Black Friday?
- Argos Black Friday Deals
- Amazon Black Friday Deals
- Currys PC World Black Friday Deals
- John Lewis Black Friday Deals
- Apple Black Friday Deals
- Black Friday Laptop Deals
- Black Friday Mobile Phone Deals
- Black Friday TV Deals
- Black Friday Dyson and Vacuum Cleaner Deals
- Black Friday Nintendo Switch Deals
- Black Friday PS4 Deals
- Black Friday Xbox Deals
- Black Friday Sonos and Soundbar Deals
- Black Friday Camera Deals
For more amazing offers, follow us @TrustedDealsUK
We may earn a commission if you click a deal and buy an item. That’s why we want to make sure you’re well-informed and happy with your purchase, so that you’ll continue to rely on us for your buying advice needs.
Commercial Content Writer
Alice graduated with a BA in Journalism from the University of Westminster in 2016, and has written for teen pop culture site Maximum Pop, as well as My Favourite Voucher Codes. With a knack for findi…
Unlike other sites, we thoroughly review everything we recommend, using industry standard tests to evaluate products. We’ll always tell you what we find. We may get a commission if you buy via our price links. Tell us what you think – email the Editor


Project 2: Fitness Web Application
People
- View people
Cardio
- View cardio activities
Lifting
- View lifting activities
Food
- View food information
About


CACHEFLUSH
Section: Linux Programmer's Manual (2)
Updated: 2007-05-26
Index
Return to Main Contents
NAME
cacheflush - flush contents of instruction and/or data cache
SYNOPSIS
#include <asm/cachectl.h>
int cacheflush(char *addr, int nbytes, int cache);
DESCRIPTION
cacheflush()
flushes the contents of the indicated cache(s) for the
user addresses in the range
addr
to
(addr+nbytes-1).
cache
may be one of:
- ICACHE
-
Flush the instruction cache.
- DCACHE
-
Write back to memory and invalidate the affected valid cache lines.
- BCACHE
-
Same as
(ICACHE|DCACHE).
RETURN VALUE
cacheflush()
returns 0 on success or -1 on error.
If errors are detected,
errno
will indicate the error.
ERRORS
- EFAULT
-
Some or all of the address range
addr
to
(addr+nbytes-1)
is not accessible.
- EINVAL
-
cache
is not one of
ICACHE,
DCACHE,
or
BCACHE.
CONFORMING TO
This Linux-specific system call is available only on MIPS-based systems.
It should not be used in programs intended to be portable.
BUGS
The current implementation ignores the
addr
and
nbytes
arguments.
Therefore, the whole cache is always flushed.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- ERRORS
-
- CONFORMING TO
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 02:54:50 GMT, September 18, 2014


| (A) | ---- no text ---- | |
| 333 | (C) | ¶ They made hem redy to go . & to þe lordes telle |
| 334 | (D) | Gert hem greithely to go þe gomes to telle |
| 335 | (E) | & bad hem faste to go . þe cyteseyns to seye |
| (Ex) | ---- no text ---- | |
| 343 | (L) | Ȝaf hem charge to go & þe gomes telle |
| 328 | (P) | He charged þam for-to gange & þe gomes tełł |
| 328 | (U) | Made hem graithly to go / and to the gomes telle |
| (V) | ---- no text ---- |


| DOSE: |
250 mg |
insufflated |
Cocaine |
(powder / crystals) |
First off, I like drugs. I have had many trips on shrooms, acid and e. I have always enjoyed the way my mind reacts and operates in different manners from my regular view of reality. I thought I was set with the hallucinogens and ecstacy, but i tried cocaine for the first time this winter. My roommate who is a common trip companion and a couple other friends introduced me to yayo, and it was fantastic.
We had gotten out of work one night and were hanging at my apartment. One guy, the dealer in the group, said that he had a gram and that everyone was welcome to it. My roommate then confessed that he had tried it a week earlier.  We busted out the mirror, razor and pen tube and went to town.
I sat there for a few minutes after my line. First thing I noticed was my front teeth being completely numb. I told the group that and they chuckled.  I felt complete euphoria. We did lines about every 15 minutes until the stash was gone. It was abosuletly phenomenal. When each line hit me, I just had another jolt of the feeling that everything was good. and i mean everything. and I just wanted to talk about it.
I just kept telling stories about my past and the emotions they brought up when I remembered things. I told my friends how much I loved them, what I loved about them, what I didn't (and friendly advice on how to change), my memories of them.
I was in a state of calm, even though my body was uncontrollably jittery. But I didn't care, in fact I loved it. Everything was just cool. I was the fonz.
Everybody else was real cool during the whole thing, even with me blabbering away like a fool most of the night.
We listened to a lot of music that night while stuffing our noses. We just kept playing songs from my roommate's mp3 collection that had emotional connections for each of us. With each new one, we would point out the emotion connected to it and the lyrics we loved. Each story led to another and another and another. I have never had that much fun listening to music and talking. I've had good times doing it clean, but with the coke I just on top of the world.
I kept suggesting we do more lines, but my friends kept the pace down since it was my first time. We still killed the gram in only a couple hours, which was longer than I expected to last. The whole time there were 3 main feelings I had. First, I definately wanted more and more (still do the couple times I have done it since the first). I see where this could lead to a nasty habit. My roommate and I made a pact to only do it around each other and to discuss our dosage.
Second, I could not believe how wired I was. It was like a gallon of espresso was hooked into my veins. I was bouncing to the music. I was clenching my teeth something fierce (gum helped alleviate that). I had no desire for food, even though I knew I was starving. I forced myself to drink water to keep myself hyrdated which I recommend for any drug. I did not have any trouble going to sleep that night when I finally decided I should.
Third, I had a couple emotions that were prevalant througout the whole thing. One was a feeling of everything being 'cool.' everything was right with the world. I compare it to a low level ecstasy trip. The other was the confidence I had. I felt I was in complete control of my life and, there was nothing I couldn't accomplish. Top of the world. It was exhilirating.
The next day I was groggy and felt no worse than a bad night of drinking. All in all, it was a very positive experience. Since that time, I have done it 4 more times. Everytime has been a great experience. A bit on the expensive side, but it is a rush and the after effects are not that bad.
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.


H-infinity Papers
Theory
- B. Hassibi and T. Kailath,
A Krein space interpretation of the Kalman-Yakubovich-Popov lemma,
submitted to Systems and Control Letters.
- B. Hassibi, T. Kailath and A.H. Sayed,
Array algorithms for H-infinity estimation,
IEEE Transactions on Automatic Control, vol. 45, no. 4, April 2000,
pages 702-706.
- B. Hassibi and T. Kailath,
On optimal solutions to two-block H-infinity problems,
Proceedings of the 1998 American Control Conference, Philadelphia, PA, 1998, pages 1979-99.
- B. Hassibi, T. Kailath and A.H. Sayed,
Array algorithms for H-2 and H-infinity estimation,
to appear in Applied and Computational Control, Signals and
Circuits, 1997.
- B. Hassibi and T. Kailath,
Tracking with an H-infinity criterion,
Proceedings of the 37th IEEE Conference on Decision
and Control, San Diego CA, Dec 1997, pages 3594-99.
- B. Hassibi, A.H. Sayed and T. Kailath,
Linear estimation in Krein spaces - part I: Theory,
IEEE Transactions on Automatic Control, vol. 41, no. 1,
pp. 18-33, Jan. 1996.
- B. Hassibi, A.H. Sayed and T. Kailath,
Linear estimation in Krein spaces - part II: Applications,
IEEE Transactions on Automatic Control, vol. 41, no. 1,
pp. 34-49, Jan. 1996.
- B. Hassibi, A.H. Sayed and T. Kailath,
Square-root arrays and Chandrasekhar recursions for H-infinity problems,
Proceedings of the 33rd IEEE Conference on Decision and
Control, pp. 2237-2243, Orlando, FL, Dec 1994.
- B. Hassibi, A.H. Sayed and T. Kailath,
H-infinity filtering as Kalman filtering in Krein space,
Proceedings of the Rockwell Symposium, Feb 1994, Anaheim, CA.
- B. Hassibi, A.H. Sayed and T. Kailath,
Recursive linear estimation in Krein spaces with applications to H-infinity
problems,
Systems and Networks: Mathematical Theory and
Applications, Vol. 2, U. Helmke, R. Mennicken and J. Saurer, Eds.,
pp. 703-707, Akademie Verlag, 1994.
- T. Kailath, B. Hassibi and A. H. Sayed,
H-infinity filtering is just Kalman filtering in Krein space,
in Computing and Intelligent Systems, eds. S. Keerthi,
Y. Narahari and N. Viswanadham, Tata McGraw-Hill Publishing Co. Ltd.,
pp. 7-15, New Delhi, 1993.
- B. Hassibi, A.H. Sayed and T. Kailath,
Recursive linear estimation in Krein spaces - part II: Applications,
Proceedings of the 32nd IEEE Conference on Decision and Control,
pp.3495-3501, San Antonio, TX, Dec 1993.
- B. Hassibi, A.H. Sayed and T. Kailath,
Recursive linear estimation in Krein spaces - part I: Theory,
Proceedings of the 32nd IEEE Conference on Decision and Control,
pp.3489-3495, San Antonio, TX, Dec 1993.
Mixed H-2/H-infinity
- B. Hassibi and T. Kailath,
H-infinity bounds for least-squares estimators,
IEEE Transactions on Automatic Control, vol.46, no.2, Feb. 2001, pages 309-14.
- H. Vikalo, B. Hassibi and T. Kailath,
Mixed H-2/H-infinity optimal signal reconstruction in noisy filter banks,
Proceedings of the 2000 IEEE International Conference on Acoustics, Speech and Signal Processing, pages 500-503.
- B. Hassibi and T. Kailath,
On robust two-block problems,
Proceedings of the 37th IEEE Conference on Decision and Control, Tampa, FL, 1998, pages 2209-10.
- B. Hassibi and T. Kailath,
Upper bounds for mixed H-2/H-infinity control,
Proceedings of the 37th IEEE Conference on Decision and Control, Tampa, FL, 1998, pages 652-57.
- B. Hassibi and T. Kailath,
H-infinity-optimality of H-2 predictors,
Proceedings of the 37th IEEE Conference on Decision and Control, Tampa, FL, 1998, pages 626-631.
- H. Hindi, B. Hassibi and S.P. Boyd,
Multi-objective H-2/H-infinity-optimal control via finite-dimensional Q-parametrization and linear matrix inequalities,
Proceedings of the 1998 American Control Conference, Philadelphia, PA, 1998, pages 3244-49.
- B. Halder, B. Hassibi and T. Kailath,
Design of optimal mixed H-2/H-infinity static state feedback controllers,
Proceedings of the 1998 American Control Conference, Philadelphia, PA, 1998, pages 3239-43.
- B. Hassibi and T. Kailath,
On adaptive filtering with combined least-mean-squares and H-infinity criteria,
Proceedings of the 31st Asilomar Conference on Signals,
Systems and Computers Pacific Grove, CA, Nov 1997, pages 1570-74.
- B. Halder, B. Hassibi and T. Kailath,
Linearly combined mixed H-2/H-infinity controllers,
Proceedings of the 37th IEEE Conference on Decision
and Control, San Diego CA, Dec 1997, pages 434-439.
- B. Hassibi and T. Kailath,
On nonlinear filters for mixed H-2/H-infinity estimation,
Proceedings of the 1997 American Control Conference, Albuquerque, NM,
June 1997.
- B. Halder, B. Hassibi and T. Kailath,
State-space structure of finite-horizon mixed H-2/H-infinity filters,
Proceedings of the 1997 American Control Conference, Albuquerque, NM,
June 1997.
- B. Hassibi and T. Kailath,
Mixed least-mean-squares/H-infinity-optimal adaptive filtering,
Proceedings of the 30th Asilomar Conference on Signals, Systems and
Computers, Pacific Grove, CA, Nov 1996.
- B. Halder, B. Hassibi and T. Kailath,
Mixed H-2/H-infinity estimation: Preliminary analytic characterization
and a numerical solution,
Proceedings of the 1996 IFAC World
Congress, vol. J, pp. 37-42, San Francisco, CA, Jun 1996.
- B. Hassibi and T. Kailath,
H-infinity bounds for the recursive-least-squares algorithm,
Proceedings of the 33rd IEEE Conference on Decision and Control,
pp. 3927-3929, Orlando, FL, Dec 1994.
Applications
- B. Hassibi, A.T. Erdogan and T. Kailath,
MIMO linear equalization with an
H-infinity criterion,
IEEE Transactions on Signal Processing, vol 54, no 9, pages
499-511, Feb 2006.
- H. Vikalo, B. Hassibi, A.T. Erdogan and T. Kailath,
On H-infinity design techniques for robust
signal reconstruction in noisy filter banks,
EURASIP Signal Processing, vol 85, no 1, pages 1-14, Jan 2005.
- A.T. Erdogan, B. Hassibi and T. Kailath,
MIMO Decision Feedback Equalization from an
H-infinity perspective
IEEE Transactions on Signal Processing, vol 52, no 3, pages
734-745, March 2004.
- A.T. Erdogan, B. Hassibi and T. Kailath,
FIR H-infinity equalization of communication channels,
Signal Processing, vol.81, no.5, May. 2001, pages 907-17.
- A.T. Erdogan, B. Hassibi and T. Kailath,
On linear H-infinity equalization of communication channels,
IEEE Transactions on Signal Processing, vol.48, no.11, Nov. 2000, pages 3227-31.
- B. Sayyarrodsari, J.P. How, B. Hassibi and A. Carrier,
Estimation-based synthesis of H-infinity-optimal adaptive FIR filters for filtered-LMS problems.
IEEE Transactions on Signal Processing, vol.49, no.1, Jan. 2001, pages 164-78.
- H. Vikalo, A.T. Erdogan, B. Hassibi and T. Kailath,
Exponential-quadratic optimal signal reconstruction in noisy filter
banks,
SPIE-Int. Soc. Opt. Eng. Proceedings of Spie - the International Society for Optical Engineering,, 2000, pages 1020-28.
- H. Vikalo, B. Hassibi and T. Kailath,
On robust multiuser detection,
Conference Record of the
Thirty-Fourth Asilomar Conference on Signals, Systems and Computers
, 2000, pages 1168-72.
- B. Hassibi, A.T. Erdogan and T. Kailath,
Equalization with an H-infinity criterion,
submitted to IEEE Transactions on Information Theory.
- B. Sayyarrodsari, J.P. How, B. Hassibi and A. Carrier,
Estimation-based multi-channel adaptive algorithm for filtered-LMS
problems,
Proceedings of the 2000 American Control Conference, pages 3192-97.
- A.T. Erdogan, B. Hassibi and T. Kailath,
On linear H-infinity equalization of communication channels,
Proceedings of the 2000 IEEE International Conference on Acoustics, Speech and Signal Processing, pages 2729-32.
- A.T. Erdogan, B. Hassibi and T. Kailath,
Decision feedback equalization from an H-infinity perspective,
Proceedings of the IEEE-EURASIP Workshop on Nonlinear Signal and Image Processing, 1999, Istanbul, Turkey, pages 689-93.
- H. Vikalo, B. Hassibi and T. Kailath,
On H-infinity-optimal signal reconstruction in noisy filter banks,
Proceedings of the 1999 IEEE International Conference on Acoustics, Speech and Signal Processing, pages 1493-96.
- B. Sayyarrodsari, J. How, B. Hassibi and A. Carrier,
An LMI formulation of the estimation-based approach to the design of adaptive filters,
Proceedings of the 37th IEEE Conference on Decision and Control, Tampa, FL, 1998, pages 158-60.
- B. Hassibi, A.T. Erdogan and T. Kailath,
Equalization with an H-infinity criterion,
Proceedings of the 1998 IEEE International Conference on Information Theory, Boston, pages 449.
- A.T. Erdogan, B. Hassibi and T. Kailath,
H-infinity equalization of communication channels,
Proceedings of the 1998 IEEE International Conference on Acoustics, Speech and Signal Processing, pages 3489-92.
- B. Sayyarrodsari, B. Hassibi and J. How,
An H-infinity-optimal alternative to the FxLMS algorithm,
Proceedings of the 1998 American Control Conference, Philadelphia, PA, 1998, pages 1116-21.
- B. Sayyarrodsari, B. Hassibi, J. How and A. Carrier,
An estimation-based approach to the design of adaptive IIR filters,
Proceedings of the 1998 American Control Conference, Philadelphia, PA, 1998, pages 3148-52.
- B. Hassibi, A.H. Sayed and T. Kailath,
H-infinity optimality of the LMS algorithm,
IEEE Transactions on Signal Processing, vol. 44, no. 2,
Feb. 1996.
- B. Hassibi and T.Kailath,
H-infinity optimal training algorithms
and their relation to backpropagation,
in Advances in Neural Information Processing Systems, Vol 7,
G. Tesauro, D.S. Touretzky and T.K. Leen, Eds., pp. 191-199, MIT-Press,
Apr 1995.
- B. Hassibi, A.H. Sayed and T. Kailath,
LMS is H-infinity optimal,
in Adaptive Control, Filtering and Signal Processing,
K.J. Astrom, G.C. Goodwin and P.R. Kumar Eds., pp. 65-89,
Springer-Verlag, 1995.
- B. Hassibi and T. Kailath,
H-infinity adaptive filtering,
Proceeding of the 1995 IEEE International Conference on
Acoustics, Speech and Signal Processing, pp. 949-952, Detroit, MI,
May 1995.
- B. Hassibi, A.H. Sayed and T. Kailath,
H-infinity optimality criteria for LMS and backpropagation,
in Advances in Neural Information Processing Systems, Vol 6,
J.D. Cowan, G. Tesauro and J. Alspector, Eds., pp. 351-359,
Morgan-Kaufmann, Apr 1994.
- B. Hassibi, A.H. Sayed and T. Kailath,
LMS and backpropagation are minimax filters,
in Theoretical Advances in Neural Computation and Learning,
V. Roychowdhury, K.Y.
Siu, and A. Orlitsky, Eds., pp. 424-449, Kluwer 1994.
- B. Hassibi and T. Kailath,
Adaptive filtering with an H-infinity criterion,
Proceedings of 28th Asilomar Conference on Signals,
Systems and Computers, Pacific Grove, CA, Nov 1994.
- B. Hassibi, A.H. Sayed and T. Kailath,
LMS is H-infinity optimal,
Proceedings of the 32nd IEEE Conference on Decision and Control,
pp.74-80, San Antonio, TX, Dec 1993.


Jump to:
Search Instructions
Enter your search query into the text entry bar below. To match an exact phrase, surround it with "double quotes"
. For negative word or phrase matches, prefix with a dash (-
). To match on any word in a set, separate them all with pipes (|
).
Click the gear icon () in the top-right corner to select a search preset.


8.31. SELECT
Synopsis
[ WITH with_query [, ...] ]
SELECT [ ALL | DISTINCT ] select_expr [, ...]
[ FROM from_item [, ...] ]
[ WHERE condition ]
[ GROUP BY [ ALL | DISTINCT ] grouping_element [, ...] ]
[ HAVING condition]
[ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] select ]
[ ORDER BY expression [ ASC | DESC ] [, ...] ]
[ LIMIT [ count | ALL ] ]
where from_item
is one of
table_name [ [ AS ] alias [ ( column_alias [, ...] ) ] ]
from_item join_type from_item [ ON join_condition | USING ( join_column [, ...] ) ]
and join_type
is one of
[ INNER ] JOIN
LEFT [ OUTER ] JOIN
RIGHT [ OUTER ] JOIN
FULL [ OUTER ] JOIN
CROSS JOIN
and grouping_element
is one of
()
expression
GROUPING SETS ( ( column [, ...] ) [, ...] )
CUBE ( column [, ...] )
ROLLUP ( column [, ...] )
Description
Retrieve rows from zero or more tables.
WITH Clause
The WITH
clause defines named relations for use within a query.
It allows flattening nested queries or simplifying subqueries.
For example, the following queries are equivalent:
SELECT a, b
FROM (
SELECT a, MAX(b) AS b FROM t GROUP BY a
) AS x;
WITH x AS (SELECT a, MAX(b) AS b FROM t GROUP BY a)
SELECT a, b FROM x;
This also works with multiple subqueries:
WITH
t1 AS (SELECT a, MAX(b) AS b FROM x GROUP BY a),
t2 AS (SELECT a, AVG(d) AS d FROM y GROUP BY a)
SELECT t1.*, t2.*
FROM t1
JOIN t2 ON t1.a = t2.a;
Additionally, the relations within a WITH
clause can chain:
WITH
x AS (SELECT a FROM t),
y AS (SELECT a AS b FROM x),
z AS (SELECT b AS c FROM y)
SELECT c FROM z;
Warning
Currently, the SQL for the WITH
clause will be inlined anywhere the named
relation is used. This means that if the relation is used more than once and the query
is non-deterministic, the results may be different each time.
GROUP BY Clause
The GROUP BY
clause divides the output of a SELECT
statement into
groups of rows containing matching values. A simple GROUP BY
clause may
contain any expression composed of input columns or it may be an ordinal
number selecting an output column by position (starting at one).
The following queries are equivalent. They both group the output by
the nationkey
input column with the first query using the ordinal
position of the output column and the second query using the input
column name:
SELECT count(*), nationkey FROM customer GROUP BY 2;
SELECT count(*), nationkey FROM customer GROUP BY nationkey;
GROUP BY
clauses can group output by input column names not appearing in
the output of a select statement. For example, the following query generates
row counts for the customer
table using the input column mktsegment
:
SELECT count(*) FROM customer GROUP BY mktsegment;
_col0
-------
29968
30142
30189
29949
29752
(5 rows)
When a GROUP BY
clause is used in a SELECT
statement all output
expressions must be either aggregate functions or columns present in
the GROUP BY
clause.
Complex Grouping Operations
Presto also supports complex aggregations using the GROUPING SETS
, CUBE
and ROLLUP
syntax. This syntax allows users to perform analysis that requires
aggregation on multiple sets of columns in a single query. Complex grouping
operations do not support grouping on expressions composed of input columns.
Only column names or ordinals are allowed.
Complex grouping operations are often equivalent to a UNION ALL
of simple
GROUP BY
expressions, as shown in the following examples. This equivalence
does not apply, however, when the source of data for the aggregation
is non-deterministic.
GROUPING SETS
Grouping sets allow users to specify multiple lists of columns to group on.
The columns not part of a given sublist of grouping columns are set to NULL
.
SELECT * FROM shipping;
origin_state | origin_zip | destination_state | destination_zip | package_weight
--------------+------------+-------------------+-----------------+----------------
California | 94131 | New Jersey | 8648 | 13
California | 94131 | New Jersey | 8540 | 42
New Jersey | 7081 | Connecticut | 6708 | 225
California | 90210 | Connecticut | 6927 | 1337
California | 94131 | Colorado | 80302 | 5
New York | 10002 | New Jersey | 8540 | 3
(6 rows)
GROUPING SETS
semantics are demonstrated by this example query:
SELECT origin_state, origin_zip, destination_state, sum(package_weight)
FROM shipping
GROUP BY GROUPING SETS (
(origin_state),
(origin_state, origin_zip),
(destination_state));
origin_state | origin_zip | destination_state | _col0
--------------+------------+-------------------+-------
New Jersey | NULL | NULL | 225
California | NULL | NULL | 1397
New York | NULL | NULL | 3
California | 90210 | NULL | 1337
California | 94131 | NULL | 60
New Jersey | 7081 | NULL | 225
New York | 10002 | NULL | 3
NULL | NULL | Colorado | 5
NULL | NULL | New Jersey | 58
NULL | NULL | Connecticut | 1562
(10 rows)
The preceding query may be considered logically equivalent to a UNION ALL
of
multiple GROUP BY
queries:
SELECT origin_state, NULL, NULL, sum(package_weight)
FROM shipping GROUP BY origin_state
UNION ALL
SELECT origin_state, origin_zip, NULL, sum(package_weight)
FROM shipping GROUP BY origin_state, origin_zip
UNION ALL
SELECT NULL, NULL, destination_state, sum(package_weight)
FROM shipping GROUP BY destination_state;
However, the query with the complex grouping syntax (GROUPING SETS
, CUBE
or ROLLUP
) will only read from the underlying data source once, while the
query with the UNION ALL
reads the underlying data three times. This is why
queries with a UNION ALL
may produce inconsistent results when the data
source is not deterministic.
CUBE
The CUBE
operator generates all possible grouping sets (i.e. a power set)
for a given set of columns. For example, the query:
SELECT origin_state, destination_state, sum(package_weight)
FROM shipping
GROUP BY CUBE (origin_state, destination_state);
is equivalent to:
SELECT origin_state, destination_state, sum(package_weight)
FROM shipping
GROUP BY GROUPING SETS (
(origin_state, destination_state),
(origin_state),
(destination_state),
());
origin_state | destination_state | _col0
--------------+-------------------+-------
California | New Jersey | 55
California | Colorado | 5
New York | New Jersey | 3
New Jersey | Connecticut | 225
California | Connecticut | 1337
California | NULL | 1397
New York | NULL | 3
New Jersey | NULL | 225
NULL | New Jersey | 58
NULL | Connecticut | 1562
NULL | Colorado | 5
NULL | NULL | 1625
(12 rows)
ROLLUP
The ROLLUP
operator generates all possible subtotals for a given set of
columns. For example, the query:
SELECT origin_state, origin_zip, sum(package_weight)
FROM shipping
GROUP BY ROLLUP (origin_state, origin_zip);
origin_state | origin_zip | _col2
--------------+------------+-------
California | 94131 | 60
California | 90210 | 1337
New Jersey | 7081 | 225
New York | 10002 | 3
California | NULL | 1397
New York | NULL | 3
New Jersey | NULL | 225
NULL | NULL | 1625
(8 rows)
is equivalent to:
SELECT origin_state, origin_zip, sum(package_weight)
FROM shipping
GROUP BY GROUPING SETS ((origin_state, origin_zip), (origin_state), ());
Combining multiple grouping expressions
Multiple grouping expressions in the same query are interpreted as having cross-product semantics. For example, the following query:
SELECT origin_state, destination_state, origin_zip, sum(package_weight)
FROM shipping
GROUP BY
GROUPING SETS ((origin_state, destination_state)),
ROLLUP (origin_zip);
which can be rewritten as:
SELECT origin_state, destination_state, origin_zip, sum(package_weight)
FROM shipping
GROUP BY
GROUPING SETS ((origin_state, destination_state)),
GROUPING SETS ((origin_zip), ());
is logically equivalent to:
SELECT origin_state, destination_state, origin_zip, sum(package_weight)
FROM shipping
GROUP BY GROUPING SETS (
(origin_state, destination_state, origin_zip),
(origin_state, destination_state));
origin_state | destination_state | origin_zip | _col3
--------------+-------------------+------------+-------
New York | New Jersey | 10002 | 3
California | New Jersey | 94131 | 55
New Jersey | Connecticut | 7081 | 225
California | Connecticut | 90210 | 1337
California | Colorado | 94131 | 5
New York | New Jersey | NULL | 3
New Jersey | Connecticut | NULL | 225
California | Colorado | NULL | 5
California | Connecticut | NULL | 1337
California | New Jersey | NULL | 55
(10 rows)
The ALL
and DISTINCT
quantifiers determine whether duplicate grouping
sets each produce distinct output rows. This is particularly useful when
multiple complex grouping sets are combined in the same query. For example, the
following query:
SELECT origin_state, destination_state, origin_zip, sum(package_weight)
FROM shipping
GROUP BY ALL
CUBE (origin_state, destination_state),
ROLLUP (origin_state, origin_zip);
is equivalent to:
SELECT origin_state, destination_state, origin_zip, sum(package_weight)
FROM shipping
GROUP BY GROUPING SETS (
(origin_state, destination_state, origin_zip),
(origin_state, origin_zip),
(origin_state, destination_state, origin_zip),
(origin_state, origin_zip),
(origin_state, destination_state),
(origin_state),
(origin_state, destination_state),
(origin_state),
(origin_state, destination_state),
(origin_state),
(destination_state),
());
However, if the query uses the DISTINCT
quantifier for the GROUP BY
:
SELECT origin_state, destination_state, origin_zip, sum(package_weight)
FROM shipping
GROUP BY DISTINCT
CUBE (origin_state, destination_state),
ROLLUP (origin_state, origin_zip);
only unique grouping sets are generated:
SELECT origin_state, destination_state, origin_zip, sum(package_weight)
FROM shipping
GROUP BY GROUPING SETS (
(origin_state, destination_state, origin_zip),
(origin_state, origin_zip),
(origin_state, destination_state),
(origin_state),
(destination_state),
());
The default set quantifier is ALL
.
GROUPING Operation
grouping(col1, ..., colN) -> bigint
The grouping operation returns a bit set converted to decimal, indicating which columns are present in a
grouping. It must be used in conjunction with GROUPING SETS
, ROLLUP
, CUBE
or GROUP BY
and its arguments must match exactly the columns referenced in the corresponding GROUPING SETS
,
ROLLUP
, CUBE
or GROUP BY
clause.
To compute the resulting bit set for a particular row, bits are assigned to the argument columns with the rightmost column being the least significant bit. For a given grouping, a bit is set to 0 if the corresponding column is included in the grouping and to 1 otherwise. For example, consider the query below:
SELECT origin_state, origin_zip, destination_state, sum(package_weight),
grouping(origin_state, origin_zip, destination_state)
FROM shipping
GROUP BY GROUPING SETS (
(origin_state),
(origin_state, origin_zip),
(destination_state));
origin_state | origin_zip | destination_state | _col3 | _col4
--------------+------------+-------------------+-------+-------
California | NULL | NULL | 1397 | 3
New Jersey | NULL | NULL | 225 | 3
New York | NULL | NULL | 3 | 3
California | 94131 | NULL | 60 | 1
New Jersey | 7081 | NULL | 225 | 1
California | 90210 | NULL | 1337 | 1
New York | 10002 | NULL | 3 | 1
NULL | NULL | New Jersey | 58 | 6
NULL | NULL | Connecticut | 1562 | 6
NULL | NULL | Colorado | 5 | 6
(10 rows)
The first grouping in the above result only includes the origin_state
column and excludes
the origin_zip
and destination_state
columns. The bit set constructed for that grouping
is 011
where the most significant bit represents origin_state
.
HAVING Clause
The HAVING
clause is used in conjunction with aggregate functions and
the GROUP BY
clause to control which groups are selected. A HAVING
clause eliminates groups that do not satisfy the given conditions.
HAVING
filters groups after groups and aggregates are computed.
The following example queries the customer
table and selects groups
with an account balance greater than the specified value:
SELECT count(*), mktsegment, nationkey,
CAST(sum(acctbal) AS bigint) AS totalbal
FROM customer
GROUP BY mktsegment, nationkey
HAVING sum(acctbal) > 5700000
ORDER BY totalbal DESC;
_col0 | mktsegment | nationkey | totalbal
-------+------------+-----------+----------
1272 | AUTOMOBILE | 19 | 5856939
1253 | FURNITURE | 14 | 5794887
1248 | FURNITURE | 9 | 5784628
1243 | FURNITURE | 12 | 5757371
1231 | HOUSEHOLD | 3 | 5753216
1251 | MACHINERY | 2 | 5719140
1247 | FURNITURE | 8 | 5701952
(7 rows)
UNION | INTERSECT | EXCEPT Clause
UNION
INTERSECT
and EXCEPT
are all set operations. These clauses are used
to combine the results of more than one select statement into a single result set:
query UNION [ALL | DISTINCT] query
query INTERSECT [DISTINCT] query
query EXCEPT [DISTINCT] query
The argument ALL
or DISTINCT
controls which rows are included in
the final result set. If the argument ALL
is specified all rows are
included even if the rows are identical. If the argument DISTINCT
is specified only unique rows are included in the combined result set.
If neither is specified, the behavior defaults to DISTINCT
. The ALL
argument is not supported for INTERSECT
or EXCEPT
.
Multiple set operations are processed left to right, unless the order is explicitly
specified via parentheses. Additionally, INTERSECT
binds more tightly
than EXCEPT
and UNION
. That means A UNION B INTERSECT C EXCEPT D
is the same as A UNION (B INTERSECT C) EXCEPT D
.
UNION
UNION
combines all the rows that are in the result set from the
first query with those that are in the result set for the second query.
The following is an example of one of the simplest possible UNION
clauses.
It selects the value 13
and combines this result set with a second query
that selects the value 42
:
SELECT 13
UNION
SELECT 42;
_col0
-------
13
42
(2 rows)
The following query demonstrates the difference between UNION
and UNION ALL
.
It selects the value 13
and combines this result set with a second query that
selects the values 42
and 13
:
SELECT 13
UNION
SELECT * FROM (VALUES 42, 13);
_col0
-------
13
42
(2 rows)
SELECT 13
UNION ALL
SELECT * FROM (VALUES 42, 13);
_col0
-------
13
42
13
(2 rows)
INTERSECT
INTERSECT
returns only the rows that are in the result sets of both the first and
the second queries. The following is an example of one of the simplest
possible INTERSECT
clauses. It selects the values 13
and 42
and combines
this result set with a second query that selects the value 13
. Since 42
is only in the result set of the first query, it is not included in the final results.:
SELECT * FROM (VALUES 13, 42)
INTERSECT
SELECT 13;
_col0
-------
13
(2 rows)
EXCEPT
EXCEPT
returns the rows that are in the result set of the first query,
but not the second. The following is an example of one of the simplest
possible EXCEPT
clauses. It selects the values 13
and 42
and combines
this result set with a second query that selects the value 13
. Since 13
is also in the result set of the second query, it is not included in the final result.:
SELECT * FROM (VALUES 13, 42)
EXCEPT
SELECT 13;
_col0
-------
42
(2 rows)
ORDER BY Clause
The ORDER BY
clause is used to sort a result set by one or more
output expressions:
ORDER BY expression [ ASC | DESC ] [ NULLS { FIRST | LAST } ] [, ...]
Each expression may be composed of output columns or it may be an ordinal
number selecting an output column by position (starting at one). The
ORDER BY
clause is evaluated as the last step of a query after any
GROUP BY
or HAVING
clause. The default null ordering is NULLS LAST
,
regardless of the ordering direction.
LIMIT Clause
The LIMIT
clause restricts the number of rows in the result set.
LIMIT ALL
is the same as omitting the LIMIT
clause.
The following example queries a large table, but the limit clause restricts
the output to only have five rows (because the query lacks an ORDER BY
,
exactly which rows are returned is arbitrary):
SELECT orderdate FROM orders LIMIT 5;
o_orderdate
-------------
1996-04-14
1992-01-15
1995-02-01
1995-11-12
1992-04-26
(5 rows)
TABLESAMPLE
There are multiple sample methods:
BERNOULLI
Each row is selected to be in the table sample with a probability of the sample percentage. When a table is sampled using the Bernoulli method, all physical blocks of the table are scanned and certain rows are skipped (based on a comparison between the sample percentage and a random value calculated at runtime).
The probability of a row being included in the result is independent from any other row. This does not reduce the time required to read the sampled table from disk. It may have an impact on the total query time if the sampled output is processed further.
SYSTEM
This sampling method divides the table into logical segments of data and samples the table at this granularity. This sampling method either selects all the rows from a particular segment of data or skips it (based on a comparison between the sample percentage and a random value calculated at runtime).
The rows selected in a system sampling will be dependent on which connector is used. For example, when used with Hive, it is dependent on how the data is laid out on HDFS. This method does not guarantee independent sampling probabilities.
Note
Neither of the two methods allow deterministic bounds on the number of rows returned.
Examples:
SELECT *
FROM users TABLESAMPLE BERNOULLI (50);
SELECT *
FROM users TABLESAMPLE SYSTEM (75);
Using sampling with joins:
SELECT o.*, i.*
FROM orders o TABLESAMPLE SYSTEM (10)
JOIN lineitem i TABLESAMPLE BERNOULLI (40)
ON o.orderkey = i.orderkey;
UNNEST
UNNEST
can be used to expand an ARRAY or MAP into a relation.
Arrays are expanded into a single column, and maps are expanded into two columns (key, value).
UNNEST
can also be used with multiple arguments, in which case they are expanded into multiple columns,
with as many rows as the highest cardinality argument (the other columns are padded with nulls).
UNNEST
can optionally have a WITH ORDINALITY
clause, in which case an additional ordinality column
is added to the end.
UNNEST
is normally used with a JOIN
and can reference columns
from relations on the left side of the join.
Using a single array column:
SELECT student, score
FROM tests
CROSS JOIN UNNEST(scores) AS t (score);
Using multiple array columns:
SELECT numbers, animals, n, a
FROM (
VALUES
(ARRAY[2, 5], ARRAY['dog', 'cat', 'bird']),
(ARRAY[7, 8, 9], ARRAY['cow', 'pig'])
) AS x (numbers, animals)
CROSS JOIN UNNEST(numbers, animals) AS t (n, a);
numbers | animals | n | a
-----------+------------------+------+------
[2, 5] | [dog, cat, bird] | 2 | dog
[2, 5] | [dog, cat, bird] | 5 | cat
[2, 5] | [dog, cat, bird] | NULL | bird
[7, 8, 9] | [cow, pig] | 7 | cow
[7, 8, 9] | [cow, pig] | 8 | pig
[7, 8, 9] | [cow, pig] | 9 | NULL
(6 rows)
WITH ORDINALITY
clause:
SELECT numbers, n, a
FROM (
VALUES
(ARRAY[2, 5]),
(ARRAY[7, 8, 9])
) AS x (numbers)
CROSS JOIN UNNEST(numbers) WITH ORDINALITY AS t (n, a);
numbers | n | a
-----------+---+---
[2, 5] | 2 | 1
[2, 5] | 5 | 2
[7, 8, 9] | 7 | 1
[7, 8, 9] | 8 | 2
[7, 8, 9] | 9 | 3
(5 rows)
Using a single map column:
SELECT
animals, a, n
FROM (
VALUES
(MAP(ARRAY['dog', 'cat', 'bird'], ARRAY[1, 2, 0])),
(MAP(ARRAY['dog', 'cat'], ARRAY[4, 5]))
) AS x (animals)
CROSS JOIN UNNEST(animals) AS t (a, n);
animals | a | n
----------------------------+------+---
{"cat":2,"bird":0,"dog":1} | dog | 1
{"cat":2,"bird":0,"dog":1} | cat | 2
{"cat":2,"bird":0,"dog":1} | bird | 0
{"cat":5,"dog":4} | dog | 4
{"cat":5,"dog":4} | cat | 5
(5 rows)
Joins
Joins allow you to combine data from multiple relations.
CROSS JOIN
A cross join returns the Cartesian product (all combinations) of two
relations. Cross joins can either be specified using the explit
CROSS JOIN
syntax or by specifying multiple relations in the
FROM
clause.
Both of the following queries are equivalent:
SELECT *
FROM nation
CROSS JOIN region;
SELECT *
FROM nation, region;
The nation
table contains 25 rows and the region
table contains 5 rows,
so a cross join between the two tables produces 125 rows:
SELECT n.name AS nation, r.name AS region
FROM nation AS n
CROSS JOIN region AS r
ORDER BY 1, 2;
nation | region
----------------+-------------
ALGERIA | AFRICA
ALGERIA | AMERICA
ALGERIA | ASIA
ALGERIA | EUROPE
ALGERIA | MIDDLE EAST
ARGENTINA | AFRICA
ARGENTINA | AMERICA
...
(125 rows)
Qualifying Column Names
When two relations in a join have columns with the same name, the column references must be qualified using the relation alias (if the relation has an alias), or with the relation name:
SELECT nation.name, region.name
FROM nation
CROSS JOIN region;
SELECT n.name, r.name
FROM nation AS n
CROSS JOIN region AS r;
SELECT n.name, r.name
FROM nation n
CROSS JOIN region r;
The following query will fail with the error Column 'name' is ambiguous
:
SELECT name
FROM nation
CROSS JOIN region;
USING
The USING
clause allows you to write shorter queries when both tables you
are joining have the same name for the join key.
For example:
SELECT *
FROM table_1
JOIN table_2
ON table_1.key_A = table_2.key_A AND table_1.key_B = table_2.key_B
can be rewritten to:
SELECT *
FROM table_1
JOIN table_2
USING (key_A, key_B)
The output of doing JOIN
with USING
will be one copy of the join key
columns (key_A
and key_B
in the example above) followed by the remaining columns
in table_1
and then the remaining columns in table_2
. Note that the join keys are not
included in the list of columns from the origin tables for the purpose of
referencing them in the query. You cannot access them with a table prefix and
if you run SELECT table_1.*, table_2.*
, the join columns are not included in the output.
The following two queries are equivalent:
SELECT *
FROM (
VALUES
(1, 3, 10),
(2, 4, 20)
) AS table_1 (key_A, key_B, y1)
LEFT JOIN (
VALUES
(1, 3, 100),
(2, 4, 200)
) AS table_2 (key_A, key_B, y2)
USING (key_A, key_B)
-----------------------------
SELECT key_A, key_B, table_1.*, table_2.*
FROM (
VALUES
(1, 3, 10),
(2, 4, 20)
) AS table_1 (key_A, key_B, y1)
LEFT JOIN (
VALUES
(1, 3, 100),
(2, 4, 200)
) AS table_2 (key_A, key_B, y2)
USING (key_A, key_B)
And produce the output:
key_A | key_B | y1 | y2
-------+-------+----+-----
1 | 3 | 10 | 100
2 | 4 | 20 | 200
(2 rows)
Subqueries
A subquery is an expression which is composed of a query. The subquery is correlated when it refers to columns outside of the subquery. Logically, the subquery will be evaluated for each row in the surrounding query. The referenced columns will thus be constant during any single evaluation of the subquery.
Note
Support for correlated subqueries is limited. Not every standard form is supported.
EXISTS
The EXISTS
predicate determines if a subquery returns any rows:
SELECT name
FROM nation
WHERE EXISTS (SELECT * FROM region WHERE region.regionkey = nation.regionkey)
IN
The IN
predicate determines if any values produced by the subquery
are equal to the provided expression. The result of IN
follows the
standard rules for nulls. The subquery must produce exactly one column:
SELECT name
FROM nation
WHERE regionkey IN (SELECT regionkey FROM region)
Scalar Subquery
A scalar subquery is a non-correlated subquery that returns zero or
one row. It is an error for the subquery to produce more than one
row. The returned value is NULL
if the subquery produces no rows:
SELECT name
FROM nation
WHERE regionkey = (SELECT max(regionkey) FROM region)
Note
Currently only single column can be returned from the scalar subquery.


pain emergency Emerg opioid Med patients department treatment ketamine medicine use {border-style Pain analgesic px;} #ffffff;} acute physicians (.) Todd non-opioid prescription intravenous Ann management morphine lidocaine opioids studies Emergency administered review adverse analgesia analgesics effects number oxide recent study subdissociative-dose trial ./j.ajem... evidence including migraine nitrous pain, prescribing px; randomized {font-family ./j.annemergmed... care controlled font-size increased nerve practice regional reported ./jama.. JAMA Med. Nelson USA clinical common double; efficacy empathy headache increasing likely low multimodal permission published received renal research risk scores subjects Canadian Fig. Headache approaches border-color border-width fewer fractures intervention new physician program promote reduction seeking solid; therapies therapies, therapy {font-style {font-weight (%) ./s--- ED. Elsevier Intravenous Jones Morrison Motov New Nitrous Rep Reprinted Ultrasound-guided additional administration analgesics, anesthesia article block bold chronic colic consumption control courier; current department: departments doses em; emerging guidelines harm hip inadequate increase levels modalities. multicenter nonpharmacologic overdose pain. patient potential presenting pt;} role severe single training treated variety years


{% extends "master.html" %} {% block content %}
You have been logged out.
Use the login screen to login again or as another user.


{% extends "main.html" %} {% comment %} Author: Conrado Buhrer Date: 16th of March 2009 Copyright: Emocracy Project - http://emocracy.nl Description: Third Party Application example. view list, odd/even {% endcomment %} {% block content %} {% for issue in issues %} {{issue.title}} {{issue.body}} {{issue.votes_for}} {{issue.votes_abstain}} {{issue.votes_against}} {% endfor %} {% include "issue_list_footer.html" %} {% endblock %}


Removing attributes (rectangle won’t look correct or show at all)
Removing Default Attributes
The element below has attributes removed
We removed the attributes of the rectangle with -all keyword. View source.
Note: Javascript must be enabled in your browser to see this event
https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Event_handlers
W


--- layout: default ---
You should have received a survey from the WPI administration for this course.
Please fill it out.
After you fill it out, please submit some text like "Done" as the submission here in Canvas. Thanks!


| Package | Description |
|---|---|
| botLot | |
| botLot.dataSource | |
| botLot.lotGraph | |
| botLot.pathFinding | |
| botLot.pathFinding.Algorithms |
| Modifier and Type | Field and Description |
|---|---|
LotGraph |
BotLot.mainGraph
The main graph.
|
| Modifier and Type | Method and Description |
|---|---|
BotLot |
BotLot.setGraph(LotGraph graphIn)
Sets the graph data to the new graph data.
|
| Constructor and Description |
|---|
BotLot(LotGraph graphIn)
Constructor to set the graph.
|
BotLot(LotGraph graphIn,
LotNode nodeIn)
Constructor that takes in a graph and a node.
|
| Modifier and Type | Method and Description |
|---|---|
private LotGraph |
BotLotDS.getDataFromMySQL()
Gets the LotGraph data from a MySQL database, specified in
BotLotDS.pathLogin |
LotGraph |
BotLotDS.getDataFromSource()
Gets the data from wherever this object is set up to get it.
|
private LotGraph |
BotLotDS.getDataFromXML()
Gets LotGraph data from an XML document.
|
LotGraph |
BotLotXMLDS.getGraph() |
LotGraph |
BotLotDataSourceInterface.getGraph()
Retrieves the graph data saved where the object is configured to get it from.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
BotLotDS.saveDataToMySQL(LotGraph lotIn)
Saves the graph data to a MySQL database.
|
void |
BotLotDS.saveDataToSource(LotGraph lotIn)
Saves the LotGraph data to wherever this object is setup to save it to.
|
private void |
BotLotDS.saveDataToXML(LotGraph lotIn)
Saves the data given to an XML document at the location this object holds.
|
void |
BotLotXMLDS.saveGraph(LotGraph graphIn) |
void |
BotLotDataSourceInterface.saveGraph(LotGraph graphIn)
Saves the graph data given to the configured data location.
|
| Modifier and Type | Method and Description |
|---|---|
LotGraph |
LotGraph.addNode(LotNode newNode)
Adds a new node to
nodes . |
LotGraph |
LotGraph.removeEdge(int edgeIndexIn)
Removes the edge given.
|
LotGraph |
LotGraph.removeEdge(LotEdge edgeIn)
Removes the edge given.
|
LotGraph |
LotGraph.removeEdge(java.lang.String edgeIdIn)
Removes the edge given.
|
LotGraph |
LotGraph.removeEdgeFromTo(int fromNodeIndex,
int toNodeIndex)
Removes an edge based on two node indexes.
|
LotGraph |
LotGraph.removeEdgeFromTo(LotNode fromNode,
LotNode toNode)
Removes an edge between two nodes.
|
LotGraph |
LotGraph.removeEdgeFromTo(java.lang.String fromNodeId,
java.lang.String toNodeId)
Removes an edge between two nodes.
|
LotGraph |
LotGraph.removeNode(int nodeToRemoveIndex)
|
LotGraph |
LotGraph.removeNode(LotNode nodeToRemove)
Removes the given node from
nodes . |
LotGraph |
LotGraph.removeNode(java.lang.String nodeToRemoveId)
Removes the node with the given Id from
nodes . |
LotGraph |
LotGraph.setEdge(LotEdge edgeIn,
int fromNodeIndex)
Sets a node's edge based on the given variables.
|
LotGraph |
LotGraph.setEdge(LotEdge edgeIn,
LotNode fromNode)
Sets a node's edge based on the given variables.
|
LotGraph |
LotGraph.setEdge(LotEdge edgeIn,
java.lang.String fromNodeId)
Sets a node's edge based on the given variables.
|
LotGraph |
LotGraph.setNodes(java.util.Collection<LotNode> nodesIn)
Sets the
nodes to the list given. |
LotGraph |
LotGraph.setRand(java.util.Random randIn,
long seedIn)
Sets the random number generator.
|
LotGraph |
LotGraph.setRandSeed(long seedIn)
Sets the random number generator's seed and re-instantiates the generator with that seed.
|
| Constructor and Description |
|---|
LotGraph(LotGraph graphIn)
Essentially copies the info from the input graph.
|
| Modifier and Type | Method and Description |
|---|---|
static LotNode |
BotLotPF.getClosestIncompleteNode(LotGraph graphIn,
LotNode curNode,
java.util.Collection<LotEdge> edgesToAvoid)
Gets the closest not complete node to the current node given.
|
static LotPath |
BotLotPF.getPathToClosestNode(LotGraph graphIn,
LotNode curNode,
java.util.Collection<LotNode> destNodesIn,
java.util.Collection<LotEdge> edgesToAvoid)
Gets a path leading to the closest node in the set given.
|
static LotPath |
BotLotPF.getShortestPath(LotGraph graphIn,
LotNode curNode,
LotNode destNode)
Determines which path taking algorithm is probably best to use, and does it.
|
static LotPath |
BotLotPF.getShortestPath(LotGraph graphIn,
LotNode curNode,
LotNode destNode,
java.util.Collection<LotEdge> edgesToAvoid)
Determines which path taking algorithm is probably best to use, and does it.
|
static java.util.ArrayList<LotEdge> |
BotLotPFWorkers.getTrapEdges(LotGraph graphIn,
LotNode curNode,
LotNode destNode)
Gets a list of edges that would put a searching algorithm into a trapped or dead end state.
|
static boolean |
BotLotPFWorkers.hasPath(LotGraph graphIn,
LotNode curNode,
LotNode destNode)
Determines if there is a path from the curNode to the destNode.
|
static boolean |
BotLotPFWorkers.hasPath(LotGraph graphIn,
LotNode curNode,
LotNode destNode,
java.util.ArrayList<LotEdge> edgesToAvoid)
Determines if there is a path from the curNode to the destNode.
|
static boolean |
BotLotPFWorkers.pathIsValid(LotPath pathIn,
LotGraph graphIn,
LotNode curNode,
LotNode destNode,
java.util.ArrayList<LotEdge> edgesToAvoid)
Checks if the given path is valid, and actually describes a path through the graph.
|
static boolean |
BotLotPFWorkers.readyCheck(LotGraph graphIn,
LotNode curNode,
LotNode destNode,
boolean checkPath)
Checks if the data given is ready to have actions performed on them.
|
| Modifier and Type | Field and Description |
|---|---|
private LotGraph |
BotLotPFAlgorithm.mainGraph
The graph we are using in the path finding.
|
| Modifier and Type | Method and Description |
|---|---|
LotGraph |
BotLotPFAlgorithm.getGraph()
Gets the graph object held by this object.
|
| Modifier and Type | Method and Description |
|---|---|
LotPath |
BotLotPFAlgorithm.findPath(LotGraph graphIn,
LotNode curNodeIn,
LotNode destNodeIn)
Sets the data, and runs the path finding code.
|
BotLotPFAlgorithm |
BotLotPFAlgorithm.setAll(LotGraph graphIn,
LotNode curNodeIn,
LotNode destNodeIn)
Sets
BotLotPFAlgorithm.mainGraph , BotLotPFAlgorithm.curNode , and BotLotPFAlgorithm.destNode using separate variables. |
BotLotPFAlgorithm |
BotLotPFAlgorithm.setGraph(LotGraph graphIn)
Sets the graph we are using.
|
| Constructor and Description |
|---|
BotLotPFAlgorithm(LotGraph graphIn,
LotNode curNodeIn,
LotNode destNodeIn)
Constructor that initializes all the variables separately.
|
BotLotPFAlgorithm(LotGraph graphIn,
LotNode curNodeIn,
LotNode destNodeIn,
java.util.Collection<LotEdge> edgesToAvoidIn)
Constructor that initializes everything, actually everything.
|
BotLotPFDijkstra(LotGraph graphIn,
LotNode curNodeIn,
LotNode destNodeIn,
java.util.Collection<LotEdge> edgesToAvoidIn)
Constructor taking in all the things needed for the thing to work.
|
BotLotPFRandom(LotGraph graphIn,
LotNode curNodeIn,
LotNode destNodeIn)
Constructor that initializes all the variables separately.
|
BotLotPFRandom(LotGraph graphIn,
LotNode curNodeIn,
LotNode destNodeIn,
java.util.Collection<LotEdge> edgesToAvoidIn)
Constructor that initializes everything, actually everything.
|


Date: 23 february
How does Javascript compare to HTML and CSS?
Javascript adds a layer of functionality to websites that HTML and CSS cannot. It allows web content to become dynamic. Previously I have used the analogy that HTML is the walls, roof and floor of a house, CSS is the interior design. Well, Javascript then tells us how to behave in each room. Can we throw pillows? Can we move paintings? Can we change the colour of the bed sheets? It lets you manipulate the DOM! Javascript lets you make these decisions.
Control Flow
Control flow refers to the flow of controlling instructions in a script. It is the order in which different lines of code are called: statements, instructions or functions calls. The most common control flow structure is the if, else, else if statement. These statements run conditional tests, which then trigger subsequent statements or actions, depending if the statements are true or not. Other control flow statements include for loops, while loops, switch statements and for in statements. An everyday life example of control flow would be hanging out your washing. For each item in the washing basket, hang it on the line, until there are no washing items left. This would look like: for ( i=washing.length-1; i >= 0 ; i- - ) { washing[i] . hang }
Arrays Vs Literals
Accessing data from an array requires the user to provide the location of the array item they wish to access. This is done with square bracket notation. If I want to access the 3rd item in my array, the correct statement would be myArray[2] (using 0 based indexing). Accessing data from an object containing {“property”: “value”} pairs, can be done using dot notation or square bracket notation, referencing the property of the object. Each method will return the value. myObject.property will return “value”, and so will myObject[“property”].
Functions
Functions let us pre-package code that can be used repeatedly, with different inputs and parameters. It saves a lot of re-inventing the wheel.


---
style: slate
---
{% include redirect/head.html %}
{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}
{% include imports/meta.html %}
{% include layouts/frontmatter_meta.html %}
{% include imports/fonts.html %}
{% include imports/stylesheets.html %}
{% include layouts/frontmatter_stylesheets.html %}
{% include imports/javascripts.html %}
{% include layouts/frontmatter_javascripts.html %}
{% include redirect/body.html %}


What is immediately most striking about the Hudson River is the sudden transition you feel from West Street once you cross it to the riverside. I plan on demonstrating this significant change through my audio project. The river is an interesting place because of the juxtaposition of machines and natural water. It isn't immediately noticeable when visiting the space because of just how slow-paced and relaxed you can feel, but when paying attention to sound it is much easier to hear the roar of the highway and the whirr of helicopters not so far off. Miasma talks about assemblage in his work, and I want to use my audio project as a means to investigate the assemblage of the river through the affect produced by the sound of the space.
There is so much to work with when considering the sounds you hear along the Hudson. I would like to split my audio into three different categories: Natural, Mechanical, and Human noises.
Natural - The natural noises produced by the river obviously include things like the sound of the water hitting the wall next to the river, and birds such as finches seagulls and geese (which I saw during my trip to the river today). One other aspect of the audio I'm going to incorporate will actually be the wind you feel whenever you walk to the end of a pier stretching into the river. While it is often the bane of an audio recorder's existence, I believe that the wind and weather plays a very crucial role in the affect of the space. By listening to my audio, I hope that the listener will feel the affect so intensely that they can paint a vivid picture of what they think the weather is at the river (during the time of recording) in their minds. If I'm very lucky, we will experience a heavy rainfall I will be able to record as well.
Mechanical - The mechanical noises I hope to incorporate into my audio project will focus mainly on the manmade technology that surrounds the river. I will record how, no matter how far away you get into the river, the mechanical noises don't ever totally disappear. This is interesting because physically, entering the vicinity of the river creates a very calm, quiet affect. But when you start to pay closer attention, you hear everything from the car horns to the ferries to the portable stereos, albeit farther away. The mechanical noise does not go away and I plan on showing that in my audio work, as this creates an interesting relationship between the natural and the unnatural properties of the river, traditionally a soley-natural space.
Human - This one has a slight overlap with mechanical noise, but only slightly. When I say human noise I mean the noises people produce while occupying the space of the river. This varies in my experience from quiet conversation to screaming children to screaming adults. Because the River is a public space, all kinds of people are able to visit it and use it for many different types of things. Joggers along the river punctuate the calm vibe with loud footsteps and heavy breathing, while mothers walk their crying children to the water. Often times, groups of people will gather next to the water and listen to music (this is the overlap with mechanical noise). By documenting human noise, I will be able to see how we change the affect of the river according to our own actions.


--- layout: paper title: Publications --- Jointly Identifying Temporal Relations with Markov Logic, , Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP (ACL '09) 2009 [pdf]
@inproceedings{yoshikawa09jointly, address={Suntec, Singapore}, year={2009}, author={Yoshikawa, Katsumasa and Riedel, Sebastian and Asahara, Masayuki and Matsumoto, Yuji}, bdsk-url-1={http://www.aclweb.org/anthology/P/P09/P09-1046}, title={Jointly Identifying Temporal Relations with Markov Logic}, pages={405--413}, month={August}, publisher={Association for Computational Linguistics}, booktitle={Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP (ACL '09)}, }


| Class and Description |
|---|
| AccuracyListenerInterface
Provides an interface that allows implementers to receive information
char by char about the quality of the recognition.
|
| AccuracyProviderInterface
Interface to be used by OCR recognizers to accept an accuracy listener to
report information to.
|
| Class and Description |
|---|
| AccuracyListenerInterface
Provides an interface that allows implementers to receive information
char by char about the quality of the recognition.
|
| OCRIdentification
Provides a data structure to manage an OCR character recognition attempt.
|
| Class and Description |
|---|
| AccuracyListenerInterface
Provides an interface that allows implementers to receive information
char by char about the quality of the recognition.
|
| AccuracyProviderInterface
Interface to be used by OCR recognizers to accept an accuracy listener to
report information to.
|
| Class and Description |
|---|
| AccuracyListenerInterface
Provides an interface that allows implementers to receive information
char by char about the quality of the recognition.
|
| OCRComp
Provides enum to identify the different ocr plugin types.
|
| OCRIdentification
Provides a data structure to manage an OCR character recognition attempt.
|


eHMP UI Bootstrap Library
Test Cases
Test Cases
PSI 10
This table contains 508 test cases for PSI 10
Description
Test Case(s)
Allergies Applet
Test Case
[Excel, 37KB]
Conditions Applet
Test Case
[Excel, 43KB]
Timeline
Test Case
[Excel, 33KB]


Overview
Private Room 1 bed · Musical Theme Bed Room at Pontian
Status:
Success
Renting period:
23/4/2016 - 25/4/2016
Number of Guest:
2 Adults / 1 Children / 0 Infant
Total rental fee:
RM230


Digital Minimalism
Source: Nikhil Thota
A few months ago I was offered (and have since accepted) a full time offer to work at Facebook in San Francisco and in that time I have been reflecting on my own usage of social media and the amount of value it has added to my life.
A common trend I’ve been seeing is the urgency to delete all your social media IMMEDIATELY or even go completely off-the-grid to avoid the unimaginable long-term implications of having your attention and personal data potentially manipulated and abused. I don’t think that we can thrive in today’s world without utilizing the platforms that allow us such a dense level of interconnectivity. I’m not saying that things couldn’t be engineered better; what I am saying however, is that we can take control of how these platforms influence us and in a sense, take control of our own evolution.
Anyways, here are five things I’ve done which have allowed me to be a participant in the digital world, but not have my attention micromanaged:
1. Unsubscribe from irrelevant emails
Inbox-zero isn’t a new idea but it’s infinitely more difficult to achieve this if you’re bombarded with emails from random retailers offering coupons and one-in-a-lifetime deals you’re never going to use.
A simple way to de-clutter your inbox is to look at each email you receive from a subscription and if it’s not immediately relevant (or will be in the foreseeable future), just scroll to the bottom and hit that unsubscribe button. Over time you’ll receive less and less irrelevant emails and this will naturally translate into less stress in the back of your mind.
And for those subscriptions and newsletters that you do want to keep, Unroll.me is a great tool I’ve used to manage the amount of content I see in my inbox. It allows you to wrap all relevant subscriptions into a daily newsletter that you see once and can tackle at your own leisure (it even allows you to unsubscribe directly from their platform!)
2. Unfollow people on social media
As you progress through school, jobs, projects, and whatever else you devote your time to, you tend to meet a lot of people who you may add on Facebook, follow on Instagram, but never develop a real relationship with. These acquaintances bloat your feeds and may cause you to miss out on important things that happen to those in your life who do matter.
What I have done is unfollow (or mute) the people that I don’t spend time with in person or plan to in the future. This includes brands, groups, events or influencers who I don’t feel are genuinely inspiring me. The beauty of this is that you are freeing up more time and mental space to interact with the content and people who you truly do want to invest in.
If you don’t want to be dramatic but still want more manageable social media feeds, the mute feature does thankfully exist. This allows you to mute someone’s posts, stories, and other notifications without explicitly unfollowing them and not tarnishing your (probably nonexistent) relationship with them.
3. Take occasional social media purges
It’s no secret that social media messes with the reward circuitry in your brain. One of the best ways to see just how it works is to take a social media purge where you commit to not using it for a certain amount of time. I’ve been surprised at how reflexively I reach for my phone and even more surprised at the free time and mental clarity I have after a couple days of adjusting.
In the past I’ve experimented with social media detoxes ranging from days to weeks and have found that the best strategy to avoid the temptation is to just delete the apps and not re-download until your purge is over. Most of the time you have an urge to check something, it’s simply a reflex and you won’t follow through since downloading the app again will take time and you will have caught yourself by then.
Another strategy, courtesy of Kenton Prescott is to enact a recurring purge, where you keep your phone in airplane mode (or even Do Not Disturb) for some amount of hours a day, limiting the time you spend catching up on notifications. The idea is that everyone can wait a few hours for your attention, even in the case of emergencies.
4. Turn off notifications for non-essential things
This one is pretty simple, just turn off notifications for things that are not essential. Every time your phone or wearable buzzes, you’re losing precious mental bandwidth which can take up to 23 minutes to get back!
In similar fashion to the previous steps, this takes some time and conscious effort daily where you take note of all notifications you get, evaluate if each one is worth the time, and turn off as necessary.
5. Learn how to use built in tools
One of my favorite features on my phone is Do Not Disturb. It allows you to silence all non-critical notifications for an indefinite amount of time. This is what I use when I’m working on school work, personal projects, or even this article. On both iOS and Android, you’re given fairly granular control over what is considered critical so you can pick and choose what is worth the focus lost from a distraction.
Apple and Google also fairly recently rolled out time management tools which allow the user to be restricted from certain applications after a given amount of use. This really helps to add an extra layer of discipline if you’re trying to build the habit of using your phone less.
 Rather, it’s taking a hard look at everything in your life and determining whether something truly provides happiness for you. Digital Minimalism is a subset of this way of thinking and is a philosophy that has allowed me to work in tech and be an active participant of social media, but also maintain my own level of free thinking and choose what I focus on.
I hope this has helped at least one person out there better manage their digital engagement. When I was first starting my foray into this way of thinking, this documentary by Matt D’Avella really helped me understand what minimalism was all about and is something I’d recommend if you’d like to learn more!


# Test for code
Python code question 1 => tab with level indent
```python
print(“level1”)
print(“level2”)
```
Python Question 2 => tabs
```python
print(“level1”)
print(“level2”)
```
Python Question 2 => spaces
```python
print(“level1”)
print(“level2”)
```


Lisp-based languages, like Scheme, are almost
the only programming languages in modern use that do not support infix
notation. In addition, most languages allow infix expressions to be
combined with function call notation of the form
f(x)
. This SRFI provides these
capabilities, both for developers who already use Scheme and want these
conveniences, and also for other developers who may choose to use other
languages in part because they miss these conveniences. Scheme currently
reserves {
...}
“for possible future extensions
to the language”. We propose that {
...}
be used
to support “curly-infix-expression” notation as a homoiconic infix
abbreviation, as a modification of the Scheme reader. It is an
abbreviation in much the same way that 'x is an abbreviation
for (quote x).
A curly-infix list introduces a list
whose visual presentation can be in infix order instead of prefix order.
For example, {n > 5} ⇒
(> n 5), and
{a + b + c} ⇒
(+ a b c). By intent, there is no precedence,
but e.g., {x + {y * z}} maps cleanly to
(+ x (* y z)). Forms with mixed infix
operators and other complications have “$nfx$
” prepended to
enable later processing, e.g.,
{4 + 5 * 6} ⇒
($nfx$ 4 + 5 * 6). Also, inside a
curly-infix list (recursively), expressions of the form
f(
...)
are simply an abbreviation
for (f
...)
.
Note that this is derived from the “readable” project. We intend to later submit at least one additional SRFI that will build on top of this SRFI, but curly-infix-expressions are useful on their own.


Available bootstrap templates
vertically centered with social login
with collapsible divs using tables with rows and cols
box material design card material design mail-like view
colorful icon grouped
event list Circular tabs full screen background