text
stringlengths
1
22.8M
Songtradr is an American B2B music platform that claims to facilitate brands, content creators, and digital platforms in their use of music for licensing purposes. As of 2019, Songtradr was the largest music licensing platform in the world. The platform offers products that can assist agencies, artists, and labels in the finding, licensing, and managing of music across various formats. Platform Songtradr is an automated music licensing marketplace. As of 2019 it was the marketplace for the work of 400,000 artists across 190 countries. Songs represented on the platform are licensed by companies for advertisements, films, and television content, and recordings are searchable through the Songtradr database. Artists can upload their music to the platform and set licensing fees. Acquisitions and investments In 2019, Songtradr acquired the creative licensing agency Big Sync Music. In 2020, Songtradr acquired Cuesongs, which was originally founded by singer-songwriter Peter Gabriel. In 2022 Cuesongs and Big Sync Music were merged. In 2020, Songtradr announced it had invested AUS $1.42 million (approximately US $1.03m) in Jaxsta. This was followed up by a further AUS $3 million investment in April, 2022. In March 2021, Songtradr acquired Song Zu, a sound design company with studios in Sydney and Singapore. In April, Songtradr acquired the music streaming platforms Pretzel and Tunefind. In June 2021, Songtradr acquired MassiveMusic. The Music Network reported that "the new deal will see MassiveMusic’s bespoke creative and strategic offerings integrated within Songtradr, giving brands and agencies access to a host of tech-enabled music licensing and sonic branding services under the same roof." In July 2022, Songtradr acquired music metadata company Musicube. In March 2023, Songtradr acquired London-headquartered B2B music company 7digital for £19.4 million (USD $23.4m). In September 2023, Epic Games announced it was selling album-sales platform Bandcamp to Songtradr for an undisclosed amount. In October, it fired approximately half of Bandcamp's staff. References 2014 establishments in California American music websites Companies based in Santa Monica, California
Abbeydorney () is a village in County Kerry, Ireland. Located north of the county town of Tralee, the village had a population of 418 as of the 2016 census of Ireland. Abbeydorney falls within the civil parish of O'Dorney. History Abbey The name of the village derives from the translation of the Irish Mainistir Ó dTorna - in English O'Dorney Abbey - which was the Cistercian Order Abbeydorney Abbey, established in 1154 and located north of the village. The abbey is often called Kyrie Eleison (which is Greek for Lord, have mercy). It was suppressed in 1537 during the reign of King Henry VIII of England. Village The village that developed around the abbey is of an agrarian nature and the institutions that have developed reflect this. In 1885, Abbeydorney GAA club was established, and in 1895 Abbeydorney Co-operative Dairy Society was formed. In 1920, during the War of Independence, the village creamery and a number of houses were burned to the ground by RIC Auxiliaries and Black and Tans in a reprisal attack. Transport Abbeydorney railway station serving the village opened on 20 December 1880 on the line from Tralee to Limerick via Listowel. Passenger services were withdrawn on 4 February 1963, although the route through Abbeydorney continued to be used by freight trains for a while before the line to Listowel was finally closed altogether in 1977 and then to Tralee 1978. The station closed on 6 February 1978. Sport The local Abbeydorney hurling team have won four County Championships, the last in 1974, and in more recent times their minor teams have won the minor county championship in 1999 and again in 2008. The Abbeydorney Ladies Football Club was the feeding ground for the great Kerry Ladies teams of the 1980s and 1990s. In more recent years they secured back-to-back All-Irelands. They won the Junior All-Ireland Club title in 2004 and followed that a year later in 2005 by winning the All-Ireland Intermediate Club title. Common surnames According to Irish census of 1901 and 1911, common names in the area at the time included: Sullivan, Connor, Stack, Walsh, Shanahan, Buckley, Fitzgerald, Lawlor, Dowling, Glavin, McCarthy, Slattery, Brosnan, Hayes, Lynch, Moriarty, O'Connor, O'Leary, Lovett, Mahony, Maunsell, Murphy, Brennan, Cronin, Nolan, Sheehan, and Sheehy. Notable people Amelia Wilmot, member of Cumann na mBan and spy during the Irish War of Independence. See also List of towns and villages in Ireland References Towns and villages in County Kerry
The Norwegian Hospital and Health Service Association () is an interest organisation in Norway. It was founded as the Norwegian Hospital Association in 1937. It is a member body of the International Hospital Federation and the European Association of Hospital Managers. It organizes health trusts, health service bodies of municipalities, private hospitals, health education institutions, patient organizations, health utility suppliers and interested people. Chairman of the board is Erik K. Normann, secretary-general is May Britt Buhaug and the organizational headquarters are in Nedre Slottsgate in Oslo. References External links Official site Medical and health organisations based in Norway Organizations established in 1937 Organisations based in Oslo 1937 establishments in Norway
Bahr is a hamlet in the Dutch province of Gelderland. It is located in the municipality Zevenaar, about 3 km southeast of Rheden. The village was first mentioned in 1272 as de Bare. It may mean "barren land". It became part of Gelderland in 1735. The hamlet has no place name signs. In 1840, it was home to 144 people. Nowadays it consists of about 20 houses. According to the 19th-century historian A.J. van der Aa, it had about 170 inhabitants in the middle of the 19th century. The large castle "Bahr" was located here, until it was demolished after a siege in 1495. See also Van Baer (family) References Populated places in Gelderland Zevenaar
The Vermilion Tigers are a junior "B" ice hockey team based in Vermilion, Alberta, Canada. They are members of the North Eastern Alberta Junior B Hockey League (NEAJBHL). They play their home games at Vermilion Stadium. History The Tigers are two-time Canadian Western Junior B Keystone Cup Champions. The first team from Alberta ever win the Keystone Cup, winning in 1984 and 1985. Season-by-season record Note: GP = Games played, W = Wins, L = Losses, OTL = Overtime Losses, Pts = Points, GF = Goals for, GA = Goals against, PIM = Penalties in minutes NHL alumni Awards and trophies NEAJBHL League Champions 2008 Coach of The Year Mike Applegate: 2006–07 & 2009–10 Taylor Holt & Mark Hines: 2012–13 General Manager of the Year Darcy Fadden: 2010–11 External links Official website of the Vermilion Tigers Ice hockey teams in Alberta
WMKV (89.3 FM) is a radio station in Reading, Ohio, United States, a suburb of Cincinnati. It is the first FM educational public radio station to be licensed to a retirement community and also streams live via webcast. Operating from the campus of Maple Knoll Village, WMKV broadcasts talk programs, classic shows from the old-time radio era, and features musical standards and big band music. The station also carries the audio of WKRC-TV's morning and evening news. The station's transmitter has an effective radiated power of 410 watts. Starting in July 2013, WMKV's programming has been also carried by Lakota Local School District's WLHS 89.9 FM. In addition to its streaming audio service, three WMKV programs are available as podcasts via iTunes: "WMKV World Front," "WMKV Computer Talk," and "The Big Broadcast." History WMKV has been broadcasting since 1995. It aired a revival of Moon River from 1995 to 1999. In 1999, WMKV took over 89.3 FM after Reading High School shut down its high school radio station, WRCJ. In November 2004, WMKV was the subject of a front-page Los Angeles Times profile. The writer, P.J. Huffstutter, had discovered the station while reporting on the 2004 American presidential election from Ohio. See also List of community radio stations in the United States External links WMKV Maple Knoll Village LifeSphere WMKV-FM adds simulcast on FM 89.9 MKV Adult standards radio stations in the United States Community radio stations in the United States 1995 establishments in Ohio
Kaiparathina fasciata is a species of sea snail, a marine gastropod mollusk in the family Trochidae. Distribution This marine species occurs off the Southern Norfolk Ridge, New Caledonia References Marshall B.A. (1993) A review of the genus Kaiparathina Laws, 1941 (Mollusca: Gastropoda: Trochoidea). The Veliger 36: 185-198. External links To World Register of Marine Species fasciata Gastropods described in 1993
You Are Me (French: Toi, c'est moi) is a 1936 French musical comedy film directed by René Guissart and starring Jacques Pills, Georges Tabet, and Claude May. It is an operetta film based on a stage work of the same title. Pills and Tabet were paired in another film On the Road, released the same year. The film's sets were designed by the art director René Renoux. Cast Jacques Pills as Bobby Guibert - un fêtard impénitent, l'ami inséparable de Pat Georges Tabet as Patrice 'Pat' Duvallon - un fêtard impénitent, l'ami inséparable de Bobby André Berley as Pedro Hernandez Claude May as Maricousa Hernandez Louis Baron fils as Pfutz - le secrétaire Junie Astor as Viviane Robinet Pauline Carton as Honorine Guibert - la tante de Bobby Saturnin Fabre as Adolphe Robinet - le résident Paul Hams as Cicéron Anaclara as Bédélia Lucette Desmoulins Odette Barencey Claude Marty Liliane Lesaffre References Bibliography Dayna Oscherwitz & MaryEllen Higgins. The A to Z of French Cinema. Scarecrow Press, 2009. External links 1936 films French musical comedy films 1936 musical comedy films 1930s French-language films Films directed by René Guissart Operetta films French black-and-white films 1930s French films
is a town located in Kawabe District in Hyōgo Prefecture, Japan. , the town had an estimated population of 29,579 in 12552 households and a population density of 330 persons per km². The total area of the town is . Geography Inagawa is located in the southeastern part of Hyōgo Prefecture. Although it is a relatively short distance of 25 kilometers in a straight line from Osaka Station and Umeda Station, which are the terminal stations of the Kansai region in downtown Osaka, Inagawa retains the atmosphere of an old village with forests and rural scenery. The southern part of the town forms part of the Tada Basin, one of the prominent basins in Hyōgo Prefecture that continues into neighboring Kawanishi. A lot of nature remains in the northern part, and firefly, Japanese giant salamander and forest tree frogs inhabit. In addition, the Inagawa Astronomical Observatory Astropia is located within the Ono Alpsland, the area around the summit of Mt. Oya, the highest peak in the Hanshin region at an altitude of 753 meters. The mascot of Inagawa is Inabō (いなぼう), a character of a wild boar. Surrounding municipalities Hyōgo Prefecture Kawanishi Takarazuka Sanda Tamba-Sasayama Osaka Prefecture Nose Climate Inagawa has a Humid subtropical climate (Köppen Cfa) characterized by warm summers and cool winters with light snowfall. The average annual temperature in Inagawa is 14.0 °C. The average annual rainfall is 1583 mm with September as the wettest month. The temperatures are highest on average in January, at around 25.8 °C, and lowest in January, at around 2.6 °C. Demographics Per Japanese census data, the population of Inagawa has quadrupled since the 1970s. The population growth rate for Inagawa is the highest in the nation, with numerous housing development planned and completed. In southern part of Inagawa, there are three large new towns, the Hankyu-Nissei Newtown (阪急日生ニュータウン), Inagawa Parktown (猪名川パークタウン), and Tsutsujigaoka (つつじが丘) and are located on the centre of Inagawa. History The area of Inagawa was part of ancient Settsu Province. The Tada silver mine has been in operation since the Nara period. In the Edo Period, this area was tenryo territory under the direct control of the Tokugawa shogunate. The villages of Nakatani (中谷村) and Mutsuse (六瀬村) were established on April 1, 1889 with the creation of the modern municipalities system. The two villages merged on April 10,19555 to form the town of Inagawa. Government Inagawa has a mayor-council form of government with a directly elected mayor and a unicameral town council of 16 members. Inagawa, together with the city of Kawanishi, contributes three members to the Hyōgo Prefectural Assembly. In terms of national politics, the town is part of Hyōgo 5t district of the lower house of the Diet of Japan. Economy Since the closure of the Tada Silver Mine in 1973, Inagawa is largely a commuter town for neighboring Nishikawa and Osaka. Education Inagawa has six public elementary schools and two public middle school operated by the town government, and one public high school operated by the Hyōgo Prefectural Board of Education. Transportation Railways Nose Electric Railway - Nissei Line Highway Shin-Meishin Expressway Sister city relations (Ballarat, Victoria) Local attractions Tada Silver and Copper Mine (多田銀銅山) is located in the southern part of Inagawa. It is claimed, with some uncertainty, that Toyotomi Hideyoshi's treasures are buried there. Notable people from Inagawa Tatsuya Ikeda (池田達也), professional football player Maiko Nakaoka (中岡麻衣子), professional football player Eriko Hirose (廣瀬栄理子) Nobuyuki Mori (森信行), musician Ayumu Yamamoto (山本歩), professional football player References External links Inagawa official website Towns in Hyōgo Prefecture
Phylloporia is a genus of moths of the family Incurvariidae. Selected species Phylloporia bistrigella (Haworth, 1828) Phylloporia latipennella Zeller, 1877 References Phylloporia at funet Incurvariidae Adeloidea genera
University of Pardubice ( or UPA) is a university in Pardubice, the Czech Republic. In 2021 it had nearly 8,000 students. It is the only university in Pardubice Region. History In the aftermath of the World War II, chemical factories in the city asked for the establishment of a specialised university in their vicinity. The university was started under the name of (Chemical Institute) in 1950, renamed to (Institute of Chemical Technology) in 1954. Since 1990, new faculties have been added, and in 1994 the institution was renamed to University of Pardubice. Faculties Jan Perner Transportat Faculty (Dopravní fakulta Jana Pernera, DF JP, est. 1992) Faculty of Economics And Administration (Fakulta ekonomicko-správní Pardubice, FES, est. 1991) Faculty of Arts and Philosophy (Fakulta filozofická, formerly Fakulta humanitních studií, est. 1992) Faculty of Chemical Technology (Fakulta chemicko-technologická, FChT, est. 1950) Faculty of Art Restoration (Fakulta restaurování in Litomyšl, FR, est. 2005) Faculty of Electrical Engineering and Informatics (Fakulta elektrotechniky a informatiky, FEI, est. 2002) Faculty of Health Studies (Fakulta zdravotnických studií, FZS, est. 2002) References External links University of Pardubice (en) Univerzita Pardubica (cz) Universities in the Czech Republic Pardubice Region Universities and colleges established in 1950 1950 establishments in Czechoslovakia
Gerard Francis Loft (6 April 1933 − 4 February 2007) was a New Zealand Roman Catholic bishop. Ordained to the priesthood on 20 July 1958, Loft was named bishop of the Roman Catholic Diocese of Auki, Solomon Islands in 1983 and resigned in 2004. References 1933 births 2007 deaths Religious leaders from Wellington City Roman Catholic bishops in the Solomon Islands 20th-century Roman Catholic bishops in New Zealand 20th-century Roman Catholic bishops in Oceania Roman Catholic bishops of Auki New Zealand expatriates in the Solomon Islands Expatriate bishops
Ongacious is predominantly a Nigerian family magazine show with a special culinary slant; studio production format (with sprinkling of location shoot). The show is a weekly culinary magazine show, which is targeted at families. On each episode, there will be a mix of content that appeals to the whole family, from aerobics to wellness to family talk to meal of the day, to City in Focus documentary, music from the band and the studio audience. The Hosts will coordinate the various segments on the show with refreshing music from the live band. Segments Wellness (Pre-recorded) The health benefits of regular exercise and physical activity are hard to ignore. Everyone benefits from exercise, regardless of age, gender or physical ability. Hence this segment takes viewers through scheduled routine of exercise (majorly dance routines) with the aim of reducing stress and achieving a healthier lifestyle. Healthy living (Pre-recorded, but simulated as a Skype call) Medical personnel from recognized institutions will be invited for a live chat on various medical conditions/issues and advise on the various healthy ways of preventing/managing these conditions. Topics could include diabetes, obesity in children, low blood pressure, etc. Family Talk (Live on set) A consultant is invited on the show based on specific topical family issues and expert analysis is done on these issues with advices/references given. Topics could range from relationships with in-laws, couple’s joint bank account, bullying, peer pressure etc. City in Fokus (CIF) Here, the guest cook and celebrity guest from the CIF are introduced. There is a conversation between the guest cook (who is a fan of the celebrity guest) and the hosts before the celebrity guest is introduced to the anxious guest cook and audience. There is meant to be a connection between the guest cook and the celebrity guest. The Docufeature is being played so as to create a familiar platform for the guest cook and celebrity guest. Guest Cook: From the CIF that has been profiled, the shortlisted candidates (based on recipe earlier supplied), who could be indigenous to that community, married, lived or schooled there, would then be invited on set to prepare the meal of the day. Celebrity Guest: The celebrity (actors, actresses, artists, sport personnel, photographers, models, blogger, fashion designers, makeup artists, TV personalities etc.) with a very strong relationship with the city in focus (indigenous to that community, married, lived or schooled there) is invited on the show to the surprise of the guest cook and studio audience, to add spice to the show. Meal of the day After having a few conversations with the hosts and guests, the guest cooks and celebrity guest proceeds into the kitchen to prepare the meal of the day. A local meal from the CIF is prepared in a healthy way using the different varieties of Onga seasonings for the celebrity guests to savour. Music is dished out by the live band to the enjoyment of the guest and audience seated. The show ends with the Approval of the meal by the Celebrity and the Host signs off the show, with the band playing music while they continue to enjoy their meal. Season 1 The first season of Ongacious kicked off on Saturday 7 April 2018, and is shown on several stations across Nigeria including DSTV, African Magic, TVC, AIT and others. In the first season of the show we visited 26 cities touching all the zones in Nigeria. Season 2 The second season of the show kicked off on Saturday 16 March 2019. It premiered with the prestigious city of Ikorodu in Lagos state with Veteran actor Babatunde Omidina popularly referred to as Baba Suwe with the amazing delicacy called Asaro (Yam Porridge). In the second season of the show we visited 26 cities covering all the zones in Nigeria. References Nigerian television talk shows
Entomoliva mirabilis is a species of sea snail, a marine gastropod mollusk in the family Ancillariidae. Description The length of the shell attains 25.2 mm. Distribution This marine species occurs off New Caledonia. References External links Bouchet P. & Kilburn R.N. (1991). A new genus of Ancillinae from New Caledonia, with the description of two new species. Bulletin du Museum National d'Histoire Naturelle 4A12 Page 531-539 MNHN, Paris: holotype Ancillariidae Gastropods described in 1991
The Black Box is the 25th novel by American crime author Michael Connelly, and the sixteenth novel featuring Los Angeles Police Department detective Harry Bosch. The book was published on 26 November 2012, "in part to honor the 20th anniversary of the character". Plot Bosch tackles a 20-year-old cold case which took place during the 1992 Los Angeles riots. A white photojournalist is found killed near a burned-out store. Harry Bosch and Jerry Edgar were the original detectives called out to the scene. Riots Task Force later took up the case but it remained unsolved over the years. The case is reopened when Harry matches a shell casing he discovered at the scene to three other murders. Attempts to stall Harry's investigation by his supervisor as well as the police chief, to avoid a bad publicity fallout, fail. In his personal life, Harry's daughter Maddie says she wants to become a member of the LAPD, after having expressed an interest in a law enforcement career in The Drop. The story also introduces a part-time recurring character, Nancy Mendenhall, an IAD investigator. The 'Black Box', just like ones in the airlines, refers to the piece of the puzzle that will tie all ends together. Reception The book placed at #2 on the Chronicle bestseller list for San Francisco Bay Area booksellers, in December 2012. In 2012, The Black Box won the world's most lucrative crime fiction award, the RBA Prize for Crime Writing worth €125,000. References 2012 American novels Harry Bosch series Novels set in Los Angeles American detective novels Little, Brown and Company books
Ricardo Daniel Pepi (born January 9, 2003) is an American professional soccer player who plays as a striker for Eredivisie club PSV Eindhoven and the United States national team. Pepi had his breakthrough with Major League Soccer club FC Dallas and was named the MLS Young Player of the Year in 2021. In 2022 he joined Bundesliga club FC Augsburg and was later loaned to Eredivisie club FC Groningen, where he scored 12 goals in 29 league appearances. In 2023 he signed with PSV Eindhoven for €9 million ($9.8m). Born to Mexican-American ancestry, he represented the United States at the youth U17 level. He made his senior debut in 2021 and won the CONCACAF Nations League in 2023. Early life Pepi was born in El Paso, Texas, and raised in nearby San Elizario. He has Mexican ancestry through his family who were from Mexico, with Pepi regularly crossing the border to neighboring Ciudad Juárez to visit family. Pepi began playing recreational soccer when he was only four years old in local El Paso leagues. He soon began playing competitive organized soccer for a club coached by his father, Daniel Pepi. The club would soon become affiliated with Major League Soccer club FC Dallas, who scouted Pepi following the Copa Chivas tournament in 2016, offering the then 13-year old the opportunity to join the FC Dallas youth academy. In his first season, Pepi was put into the under-13 side and scored 18 goals in just 15 games, leading him to rise up the ranks within the club. He was soon promoted to the under-17 side as a 15-year old, scoring 19 goals in eight matches. Club career North Texas SC On December 8, 2018, Pepi became the first signing for North Texas SC, the new affiliate club for FC Dallas' in USL League One. On March 30, 2019, Pepi made his professional debut in North Texas SC's first ever match, scoring a hat-trick in a 3–2 victory over the Chattanooga Red Wolves. Following the match, North Texas SC head coach Eric Quill stated: "I'd like to say that it shocks me, but it doesn't shock me. He's been in unbelievable form in the preseason. Every game, he's growing. He's got such a hunger to score goals, that is rare. He can finish in any way." In the following match against Forward Madison, Pepi scored for the second match in a row deep into second half stoppage time to give North Texas SC the 1–0 home victory. He was then called into the international under-17 squad. When he returned, Pepi scored again in his third game of the season against Lansing Ignite in a 2–2 draw. On October 12, 2019, Pepi returned to North Texas SC for the semifinals of the USL League One playoffs. He scored a brace for North Texas SC against Forward Madison in a 2–0 home victory, advancing the side to the final. After the match, Pepi was called into the under-17 side, thus not being available for selection against Greenville Triumph in the final on October 19. Despite his absence, North Texas SC proceeded to win the match 1–0 through Arturo Rodríguez, thus winning their first championship and giving Pepi his first trophy. Pepi was named as a finalist for the USL Young Player of the Year on October 17, but lost out to Arturo Rodríguez. FC Dallas On June 11, 2019, Pepi was loaned to North Texas SC parent club FC Dallas on a short-term loan ahead of their U.S. Open Cup match against OKC Energy. The next day, Pepi made his competitive debut for FC Dallas against OKC Energy, starting in the 4–0 victory at Toyota Stadium. He appeared again for FC Dallas in the next round on June 19, starting in the 2–1 defeat. On June 21, 2019, Pepi was signed by FC Dallas to a homegrown player deal, becoming the club's fourth youngest academy signing at 16 years and 163 days old. The next day, on June 22, Pepi made his Major League Soccer debut, coming on as an 84th minute substitute in a 3–0 home victory over Toronto FC. He finished his first season with FC Dallas with nine appearances and 0 goals. On March 7, 2020, Pepi scored his first professional goal for FC Dallas, a 96th-minute equalizer in a 2–2 draw against the Montreal Impact. He scored his second goal of the season on September 9 in a 3–2 defeat away against Minnesota United. On November 22, Pepi scored an equalizer for FC Dallas after trailing 1-0 in second-half stoppage time in the first round of the 2020 MLS Cup Playoffs against the Portland Timbers. The match would eventually be decided in a penalty shootout, with Pepi converting his penalty in the lead up to FC Dallas advancing 8–7. 2021 season On April 17, Pepi made his first appearance of the 2021 season against the Colorado Rapids, coming on as an 81st minute substitute in the 0–0 draw. In the next match on April 24, Pepi scored his first goal of the season, a consolation for FC Dallas in a 3–1 away defeat against the San Jose Earthquakes. From that match on, Pepi would continue to feature as a regular starter for Luchi Gonzalez and on June 19, Pepi scored his second goal of the season against Minnesota United. His goal was an equalizer in a 1–1 draw. He then scored both goals for FC Dallas in a 2–1 victory against the New England Revolution on June 27. On July 24, Pepi scored his first professional hat-trick in a 4–0 home victory against the LA Galaxy. The three goals in a single match made him the youngest player in Major League Soccer history to score a hat-trick. A week later, on August 4, it was announced that Pepi was selected by Bob Bradley to participate in the 2021 MLS All-Star Game against the Liga MX All-Stars. During the match on August 25, Pepi came on as a halftime substitute as the match ended 1–1 in regulation time, going into a penalty shootout. During the shootout, Pepi scored the winning goal for the Major League Soccer All-Stars to give the league a 3–2 victory. In his next match, on August 29 against Austin FC, Pepi scored two goals for FC Dallas in a 5–3 away victory. FC Augsburg On January 3, 2022, it was announced that Pepi had signed with FC Augsburg of the Bundesliga. The transfer fee was reported to be $20 million plus add-ons. The move made him the most expensive American MLS player to sign for a European club, the most expensive transfer by Augsburg, and the second most expensive player to transfer from MLS to a European league. He made his league debut for Augsburg on January 8, coming on in the 60th minute in a 3–1 defeat to Hoffenheim. Loan to FC Groningen On September 1, 2022, it was announced that Pepi would go on a year-long loan to Eredivisie outfit FC Groningen for the duration of the 2022–23 season. In his competitive debut for the club against Cambuur he tallied an assist on the game's only goal. Pepi's hot start continued in the following match in which he broke an 11-month goal drought in a 2–1 defeat to Sparta Rotterdam. His most recent goal had come on October 7, 2021, in a 2–0 victory over Jamaica for the United States in World Cup qualifying, marking him just 20 days shy of a year without scoring a competitive goal. Following the September international break, Pepi notched his second goal in as many league games, scoring Groningen's only goal as they suffered a 4–1 defeat to AZ Alkmaar. The following week he scored a brace in a 3–2 defeat to RKC Waalwijk, in the process becoming the first Eredivisie player in the 21st century to score or assist on five goals in his first four league games. In a 3–0 victory over Excelsior on February 25, Pepi scored his tenth goal of his loan spell in just his 20th competitive game for Groningen. Despite playing for a relegation-threatened side, Pepi earned a spot on the official Eredivisie Team of the Month for February 2023 as the only outfield player not from league powerhouses Ajax, PSV, and Feyenoord. PSV Eindhoven On July 7, 2023, Pepi signed a five-year contract with PSV Eindhoven after the Dutch club agreed to pay $9.8 million to Augsburg for Pepi's transfer. International career Born in the United States, Pepi was eligible to play for both the United States and Mexico through his parents. He had also previously attended training camps for both the United States under-17 and Mexico under-17 sides. On April 22, 2019, Pepi was included in the United States under-17 squad by Raphaël Wicky for the CONCACAF U-17 Championship. On May 12, Pepi scored his first international goal against Panama, followed by a brace against Canada to help the United States advance to the final. In October 2019, Pepi was included again in the under-17 squad, this time for the FIFA U-17 World Cup. On August 26, 2021, manager Gregg Berhalter selected Pepi in the United States squad for 2022 FIFA World Cup qualification. On September 8, 2021, Pepi made his debut for the United States and scored the winning goal in a 4–1 away victory against Honduras. His goal was the second of the match, giving the United States a 2–1 lead. He scored twice in his second match, a 2–0 qualifying win against Jamaica played in Austin, Texas. Despite the early success, Pepi was ultimately not called up to the team's 26-man 2022 World Cup roster. In his first international match following the World Cup, Pepi scored his fourth and fifth international goals as part of a brace in a 7–1 Nations League victory over Grenada. Four days later, he scored the game-winning goal against El Salvador to send the United States into the 2023 Nations League semifinals. In the Nations League semifinal against Mexico, he scored off the bench securing the 3–0 U.S. win. Career statistics Club International As of match played September 12, 2023. United States score listed first, score column indicates score after each Pepi goal. Honors North Texas SC USL League One Regular Season: 2019 USL League One Championship: 2019 PSV Johan Cruyff Shield: 2023 United States CONCACAF Nations League: 2022–23 Individual MLS All-Star: 2021 MLS Young Player of the Year: 2021 References External links Profile at FC Dallas 2003 births Living people American sportspeople of Mexican descent Soccer players from El Paso, Texas American men's soccer players Men's association football defenders North Texas SC players FC Augsburg players FC Groningen players FC Dallas players PSV Eindhoven players Bundesliga players Eredivisie players USL League One players Major League Soccer players American expatriate men's soccer players Expatriate men's footballers in the Netherlands American expatriate soccer players in Germany American expatriate sportspeople in the Netherlands Homegrown Players (MLS) United States men's youth international soccer players United States men's international soccer players
```xml import { render, screen } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import React from "react"; import { Link, MemoryRouter, Outlet, Route, Routes } from "react-router-dom"; import { STYLE_WRAPPER } from "../../util/test-utils"; import { MainNavPageInfo } from "./mainNavContext"; import { MainNavLayout } from "./MainNavLayout"; const TestPageA = () => { return ( <div> <MainNavPageInfo pageInfo={{ title: "breadcrumb-a1", id: "a1", path: "/a1" }} /> Page A1 <Link to="a2">go-a2</Link> <Outlet /> </div> ); }; const TestChildPageA = () => { return ( <div> <MainNavPageInfo pageInfo={{ title: "breadcrumb-a2", id: "a2", path: "/a1/a2" }} /> Page A2 <Link to="a3">go-a3</Link> <Outlet /> </div> ); }; const TestGrandChildPageA = () => { return ( <div> <MainNavPageInfo pageInfo={{ title: "breadcrumb-a3", id: "a3", path: "/a1/a2/a3" }} /> Page A3 <Link to="/b1/b2">go-b2</Link> </div> ); }; const TestPageB = () => { return ( <div> <MainNavPageInfo pageInfo={{ title: "breadcrumb-b1", id: "b1", path: "/b1" }} /> Page B1 <Outlet /> </div> ); }; const TestChildNonMainNavPageB = () => { return ( <div> {/* Not a Main Nav page */} Page B2 <Link to="b3">go-b3</Link> <Outlet /> </div> ); }; const TestGrandChildPageB = () => { return ( <div> <MainNavPageInfo pageInfo={{ title: "breadcrumb-b3", id: "b3", path: "/b1/b2/b3" }} /> Page B3 <Link to="/c">go-c</Link> </div> ); }; const TestPageC = () => { return ( <div> <MainNavPageInfo pageInfo={{ title: "breadcrumbc", id: "c", path: "/c" }} /> Page C </div> ); }; const TestApp = ({ location = "/" }: { location?: string }) => { return ( <STYLE_WRAPPER> <MemoryRouter initialEntries={[location]}> <Routes> <Route element={<MainNavLayout />}> <Route element={<TestPageA />} path="a1"> <Route element={<TestChildPageA />} path="a2"> <Route element={<TestGrandChildPageA />} path="a3" /> </Route> </Route> <Route element={<TestPageB />} path="b1"> <Route element={<TestChildNonMainNavPageB />} path="b2"> <Route element={<TestGrandChildPageB />} path="b3" /> </Route> </Route> <Route element={<TestPageC />} path="c" /> </Route> </Routes> </MemoryRouter> </STYLE_WRAPPER> ); }; describe("MainNavLayout", () => { it("navigates and renders breadcrumbs correctly", async () => { const user = userEvent.setup(); render(<TestApp location="/a1" />); await screen.findByText(/Page A1/); // No breadcrumbs when there is only 1 page expect(screen.queryByText(/breadcrumb-a1/)).not.toBeInTheDocument(); await user.click(screen.getByText(/go-a2/)); await screen.findByText(/Page A2/); expect(screen.getByText(/breadcrumb-a1/)).toBeInTheDocument(); expect(screen.getByText(/breadcrumb-a2/)).toBeInTheDocument(); await user.click(screen.getByText(/go-a3/)); await screen.findByText(/Page A3/); expect(screen.getByText(/breadcrumb-a1/)).toBeInTheDocument(); expect(screen.getByText(/breadcrumb-a2/)).toBeInTheDocument(); expect(screen.getByText(/breadcrumb-a3/)).toBeInTheDocument(); await user.click(screen.getByText(/go-b2/)); await screen.findByText(/Page B2/); // No breadcrumbs because only one of the pages is a main nav page expect(screen.queryByText(/breadcrumb-b1/)).not.toBeInTheDocument(); expect(screen.queryByText(/breadcrumb-b3/)).not.toBeInTheDocument(); await user.click(screen.getByText(/go-b3/)); await screen.findByText(/Page B3/); expect(screen.getByText(/breadcrumb-b1/)).toBeInTheDocument(); expect(screen.getByText(/breadcrumb-b3/)).toBeInTheDocument(); // Test that single non-parent pages work as well await user.click(screen.getByText(/go-c/)); await screen.findByText(/Page C/); expect(screen.queryByText(/breadcrumb-c/)).not.toBeInTheDocument(); }); }); ```
```javascript import React from 'react' import ReactTooltip from 'react-tooltip' import TextField, { enterKeyCode } from 'components/common/TextField' import { mount } from 'enzyme' describe('TextField', () => { const generateProps = () => { return { onChange: sinon.spy(), onEnterKey: sinon.spy(), label: 'label', text: 'text', rows: 1 } } it('should render the text field', () => { const props = generateProps() const textField = mount(<TextField {...props} />) assert(textField.find('label').text() === props.label) assert(textField.find('input').exists()) assert(textField.find('input').prop('value') === props.text) }) it('should render the text field using the textarea element if rows are > 2', () => { const props = generateProps() props.rows = 2 const textField = mount(<TextField {...props} />) assert(textField.find('textarea').exists()) assert(textField.find('textarea').prop('value') === props.text) }) it('should call onChange if there is some input', () => { const props = generateProps() const textField = mount(<TextField {...props} />) textField.find('input').simulate('change', {target: {value: 'input'}}) assert(props.onChange.calledOnce) }) it('should call onEnterKey if the enter key is pressed', () => { const props = generateProps() const textField = mount(<TextField {...props} />) textField.find('input').simulate('keydown', {keyCode: enterKeyCode, target: {value: ''}}) assert(props.onEnterKey.calledOnce) }) it('should not call onEnterKey if the other key is pressed', () => { const props = generateProps() const textField = mount(<TextField {...props} />) textField.find('input').simulate('keydown', {keyCode: 0, target: {value: ''}}) assert(props.onEnterKey.notCalled) }) it('should show the tooltip if there is information prop', () => { const props = generateProps() props.information = 'info' const textField = mount(<TextField {...props} />) assert(textField.find(ReactTooltip).exists()) }) }) ```
Alport is a hamlet in the White Peak area of Derbyshire, England. It lies east of Youlgreave, at the confluence of the River Bradford and the River Lathkill. The oldest house in the hamlet is Monks Hall. There also used to be a pub, which was demolished thanks the construction of a main road, which leads to the A6 and towards Buxton. A Grade-II listed stone bridge crosses the River near the centre of the hamlet, close to the 18th century mill. There are lead mines in the area, and at the Alport mine, an early steam-powered Nutating disc engine was installed. In chronostratigraphy, the British sub-stage of the Carboniferous period, the 'Alportian' derives its name from study of a core from a borehole drilled at Alport. The name Alport means "Old town", possibly with market trading connotations. The hamlet lies on the line of the Derbyshire Portway, an ancient trading route. Governance Alport is within the civil parish of Youlgreave which, in turn, is part of the Derbyshire Dales district. External links Derbyshiredale District Nomination See also Derbyshire lead mining history Alport Height near Wirksworth, Derbyshire Alport Castles in the High Peak Estate Listed buildings in Harthill, Derbyshire Listed buildings in Youlgreave References Hamlets in Derbyshire Towns and villages of the Peak District Derbyshire Dales
Ajitsinhji Ground is cricket ground in Jamnagar, Saurashtra.The ground was established in 1933. It hosted its first match in 1933 when Marylebone Cricket Club toured India and Ceylon in 1933/34. The match was played between Jamnagar cricket team and Marylebone Cricket Club which was drawn. In the match international player like England captain Douglas Jardine, Cyril Walters and Indian fast-bowler Amar Singh were included. It took four year for hosting its first-class and first Ranji Trophy match which was played between Western India cricket team and Maharashtra cricket team which was won by Western India by 78 runs. Ranga Sohoni took 11 wickets in the match. Since then ground hosted 26 more first-class matches. In 1986, Saurashtra cricket team and Maharashtra cricket team played last first-class match on this ground as match was drawn. In cricket returned to the ground when Wills Trophy match was hosted between Wills XI and Tamil Nadu cricket team. Since then, the ground hosted one more match in Deodhar Trophy in 2005. But since 2006 the ground has not hosted any of the match. In 2013, Government of Gujarat declared that the stadium will be renovated with pavilion, Sports Coaching Centre, capacity of 20,000 spectators as well as up 70 meter boundary and four corners of the ground will also have practice pitches and the mandatory parking facilities outside. See also English cricket team in India in 1933–34 References External links Cricinfo Cricketarchive Going Places: India's Small Town Cricket Heroes Cricket grounds in Saurashtra (region) Sports venues in Saurashtra (region) Jamnagar Defunct cricket grounds in India Sports venues completed in 1933 1933 establishments in India 20th-century architecture in India
Sinneli is a neighbourhood in the municipality and district of Kaş, Antalya Province, Turkey. Its population is 129 (2022). References Neighbourhoods in Kaş District
```yaml name: SpaceEye description: Live satellite imagery for your desktop background. website: path_to_url category: Utilities repository: path_to_url keywords: - taskbar - toolbar - space - satellite - desktop wallpaper - live - earth - open source license: MIT ```
Michael King Fitchett (30 November 1927 – 1 April 2021) was a sportsman who played first-class cricket for Victoria and Australian rules football with Hawthorn during the early 1950s. Fitchett attended Scotch College, Melbourne. He played regularly for Victoria in the 1951/52 Sheffield Shield season and scored his only first-class hundred in an innings against Western Australia at Perth, his 108 coming from seventh position down the order. From his 13 first-class games he scored 589 runs at 32.72 and also took nine wickets. He captained Victoria in two matches. His football career lasted three Victorian Football League seasons from 1950 to 1952, playing 30 games and kicking 14 goals. Fitchett was an outstanding golfer. Metropolitan Golf Club in Oakleigh South has his name on most honour boards as Mens & Mixed Champion, President and Life Member. See also List of Victoria first-class cricketers References External links Cricinfo profile 1927 births 2021 deaths People educated at Scotch College, Melbourne People from Hawthorn, Victoria Hawthorn Football Club players Old Scotch Football Club players Australian cricketers Victoria cricketers Cricketers from Melbourne Australian rules footballers from Melbourne
Kristof Goddaert (21 November 1986 – 18 February 2014) was a Belgian road racing cyclist who competed as a professional between 2008 and 2014 for the , and squads. Born in Sint Niklaas, Belgium, Goddaert left at the end of the 2012 season, and joined the new team for the 2013 season. On 18 February 2014, Goddaert was killed during a training ride in Antwerp, when he fell from his bike and was struck by a De Lijn bus. Major results 2007 3rd Nationale Sluitingsprijs 2008 2nd Tour de Vendée 4th Omloop van de Vlaamse Scheldeboorden 5th Memorial Rik Van Steenbergen 9th Paris–Tours 2009 3rd Paris–Brussels 7th Memorial Rik Van Steenbergen 7th Munsterland Giro 7th Omloop van het Houtland 2010 1st Stage 3 Tour de Wallonie 5th Le Samyn 2011 8th Gent–Wevelgem 2012 2nd Road race, National Road Championships 5th Tro Bro Leon 7th Halle–Ingooigem 2013 7th Grote Prijs Wase Polders 8th Overall Tour de l'Eurometropole References External links CyclingNews Kristof Goddaert's profile on Cycling Base Belgian male cyclists 1986 births 2014 deaths Sportspeople from Sint-Niklaas Cyclists from East Flanders Cycling road incident deaths Road incident deaths in Belgium
You've Been Watching Me is an album by the American composer and saxophonist Tim Berne's Snakoil which was released on the ECM label in 2015. Reception The Allmusic review by Thom Jurek awarded the album 4 stars and stated "You've Been Watching Me is the most structured record from Snakeoil as well as the most varied. The band's language has expanded with the addition of Ferreira, yet it's more intuitive -- where the space and complexity are different shades in the face of beauty". Writing in The Guardian, John Fordham commented "The original alto sax, clarinets, piano and drums now expands to include the subtle and cinematic Ryan Ferreira’s guitar. Though this is the most collectivised edition of Snakeoil, a wealth of fascinating detail remains ... Some Berne followers might find the sense of being lost within his tightening mazes increases with this more collective venture, but DownBeat magazine nailed Berne’s current music by declaring that it “rocks and thinks, explores, deconstructs and, yes, it swings”". The All About Jazz review by Karl Ackermann said that "You've Been Watching Me represents another forward-looking development for Berne and Snakeoil. The quintet works in various breakout formations adding to the variety of textures and sounds. There's an openness in this setting that adds depth and drama to the improvisations that weave through the arrangements. Berne's music has never been anything less than challenging, but here it is broader and more accessible without sacrificing edginess; You've Been Watching Me is a major achievement in Berne's portfolio". JazzTimes reviewer Mike Shanley wrote "Snakeoil’s third album finds Berne continuing to assert his intense writing style under the ECM banner, with guitarist/collaborator David Torn handling the production for a second time and maintaining the saxophonist’s personality ... Previous Berne groups have focused on acoustic frenzy (Bloodcount) and dabbled in noisy electric structures (Science Friction). Snakeoil is poised to be his strongest band yet, because it combines those qualities". Track listing All compositions by Tim Berne "Lost in Redding" – 6:58 "Small World in a Small Town" – 18:26 "Embraceable Me" – 14:12 "Angles" – 2:26 "You've Been Watching Me" – 1:46 "Semi Self Detached" – 10:23 "False Impressions" – 13:22 Personnel Tim Berne - alto saxophone Oscar Noriega - clarinet, bass clarinet Ryan Ferreira – electric guitar, acoustic guitar Matt Mitchell - piano, electronics Ches Smith - drums, percussion References ECM Records albums Tim Berne albums 2015 albums Albums produced by David Torn
Freda Swain (31 October 190229 January 1985) was a British composer, pianist and music educator. Biography Freda Swain was born in Portsmouth, England, the daughter of Thomas and Gertrude (née Allen) Swain. Her first piano lessons (from age 11) were at the Tobias Matthay Piano School in London, given by Matthay's sister Dora. Three years later she went to study composition with Charles Villiers Stanford and piano with Arthur Alexander at the Royal College of Music, earning awards including the Sullivan Prize in 1921. In 1924 Swain began teaching at the Royal College and in 1936 she founded the British Music Movement to help promote the efforts of young composers and artists. Swain married Arthur Alexander in 1921, and before World War II the couple toured South Africa and Australia, lecturing, broadcasting and performing recitals. They were both on the founding board of the Surrey College of Music from the mid-1940s. From 1942 they lived in a bungalow on Chinnor Hill in Oxfordshire. Alexander died in 1969. Freda Swain died on 29 January 1985. Composition Swain wrote some 450 pieces, piano and chamber music as well as many songs, but also opera and orchestral works, including two piano concertos and a clarinet concerto. Few were performed aside from a series featured in the NEMO Series of concerts that Swain herself founded after the war. Her first major success was The Harp of Aengus for violin and orchestra (after the Yeats poem), with soloist Achille Rivarde at the Queen's Hall in January 1925. The solo Violin Sonata was premiered by May Harrison at the Wigmore Hall on 8 December 1933. Her ‘Airmail’ Piano Concerto, mailed in instalments to her husband Arthur Alexander while he was stuck in South Africa during World War II, was performed by Alexander in Cape Town. She composed a one-act opera Second Chance, but left two other operas incomplete. Piano compositions include three large scale piano sonatas and 40 or so other works for solo piano, including many educational pieces. There is also a substantial cello sonata, two violin sonatas (one with piano, the other unaccompanied), two string quartets, a piano quartet, a sextet with horn and clarinet, a Suite for Six Trumpets and many other chamber and instrumental pieces. Swain's surviving manuscripts were handed down to her pupil and friend David Stevens, founder of the Swain-Alexander Trust. In turn they were passed on to Swiss pianist Timon Altwegg in 2005, who has begun recording the piano works for Toccata Classics. Selected works Chamber Dance Forms from an Unknown Country, for flute, oboe, clarinet and piano (1958) Festival Suite for horn, piano and percussion (1967) Lamentations, for 2 cellos and piano (1960) Piano Quintet (1938) The Sea for piano quartet (1938) Sextet (with horn and clarinet) Solemn Salutation for brass ensemble (1951) String Quartet No 1 in E minor Norfolk (1924) String Quartet No 2 in G minor (1949) Suite for Six Trumpets (1952) Tercet for violin, viola and cello Instrumental By the Loch for cello and piano (1960) Cello Sonata in C Contrasts (1953) for clarinet and piano ('Heather Hill' and 'Derry Down') A Country Pastoral for organ (1957) Danse Barbare for violin and cello English Reel for viola and piano (1958) English Pastoral for organ (1958) Fantasy Suite for oboe and piano Laburnum Tree for clarinet and piano (1960) Pipe Tunes for clarinet and piano Rhapsody for clarinet and piano (for Frederick Thurston) Sonata for violin in C minor Sonata for violin in B minor, The River Sonata for violin in G minor (No 4?) (1947) Song at Evening for viola and piano (1958) Summer Rhapsody No 1 for viola and piano (performed 1936) Waving Grass for clarinet and piano (1960) The Willow Tree for clarinet and piano (1948) Orchestral Clarinet Concerto Concertino for clarinet, horn and strings The Harp of Angus (1925), tone poem for violin and orchestra Miniature Suite for string orchestra (1952) A Pastoral Fantasy (1936-7) Piano Concerto 'Airmail' (1939) Piano Concerto Walking and Dream Tide for string orchestra (or cello and piano) Opera Second Chance, premiered at Bath in 1955, libretto Swain and M. Rodd The Shadowy Waters (operatic setting, based on Yeats) The Spell (incomplete) Piano The Croon of the Sea (1920) Crossbow Castle (suite, four pieces) An English Idyll (1942) Humoresque Mountain Ash (1931) Prelude and Toccata (1955) The Red Flower Scherzo for three pianos Sonata Saga in F minor (1924, rev. 1929 and 1930) Sonata No 1 in A minor, The Skerries (1936-7, rev. 1945) Sonata No 2 in F sharp minor (1950) Sonatina Two South Africa Impressions: 'Mimosa' and 'The Lonely Dove' Spring Mood Waltz Charming The Windmill Songs April (text: A. E. Coppard) Blessing (text: Austin Clarke) The Chevalier's Lament (text: Robert Burns) Experience (Chinese text: translated Arthur Waley) The Green Lad From Donegal The Indwelling, song cycle for voices, strings, piano and drum (fp. 1961) The Lark on Portsdown Hill (text: composer) Sweet Content (text: Robert Greene) Sympathy (text: Emily Brontë) Winter Field over 100 songs, including settings of Bridges, A. E. Housman and Shakespeare Choral Bells of Heaven (Christmas carol, text: Mary Brandon) Breathe on Me, Breath of God, anthem Cantata In memoriam A Gaelic Prayer, anthem Now Rest We All Content (wedding anthem, text: Mary Brandon) Psalm 150 (1973) Rejoice in the Lord (1961) Unseen Heralds (text: Mary Brandon) External links Portrait of Freda Swain, by Ena Limbeek Freda Swain: Piano Music, Volume One, Toccata Classics Song at Evening, Helen Callus and Philip Bush References 1902 births 1985 deaths 20th-century British composers 20th-century British pianists 20th-century classical composers 20th-century English women musicians 20th-century women composers Academics of the Royal Academy of Music Alumni of the Royal Academy of Music British classical composers British music educators Musicians from Portsmouth British women classical composers British women music educators
Shisakhani is a village development committee in Baglung District in the Daulagiri Zone of central Nepal. At the time of the 1991 Nepal census it had a population of 1,845 and had 311 houses in the village. References Populated places in Baglung District
Boot Polish is a 1954 Hindi comedy drama directed by Prakash Arora and produced by Raj Kapoor. It won Best Film at the Filmfare Awards. The film stars Ratan Kumar and Naaz in the lead roles. Plot Bhola (Ratan Kumar) and Belu (Naaz) are left in the care of their wicked aunt Kamla (Chand Burke), a prostitute, after their mother dies. She forces them to beg on the streets and takes the whole collection at night, often by beating them brutally. A bootlegger and neighbour of Kamla, named John (David) teach them self-respect and to work for a living instead of begging. Both kids start saving from their begging money by giving lesser paise to Kamla, so they can buy a shoe-polish kit and begin shining shoes. The duo manage to buy a shoe-polish kit and starts the business. But when Kamla discovers this, she beats them and kicks them out of the house. Meanwhile, John discovers that Belu wants a new frock and Bhola needs a new shirt as their current rags are torn and worn out. Overwhelmed by the emotions to help Belu and Bhola, John Chacha decided to sell unauthorized liquor and gets arrested by the police. The children, on the other hand, are left to fend for themselves. When it rains, and people stop having their shoes polished, the children are in danger of starving. Bhola wishes never to beg again and rejects a coin tossed to him on a rainy night. When Belu takes it out of hunger, Bhola slaps her, and she drops it. When the police come, intent on taking the children, Belu escapes onto a train, but Bhola is arrested. On board the train, Belu is adopted by a wealthy family, and she is sad for her brother. Bhola searches for Belu after getting out of custody but cannot find her. After running away from an orphanage, he is unable to find work and extremely hungry and resorts to begging. He encounters Belu while begging at the railway station where Belu and her adopted family are boarding a train for vacation. Humiliated, Bhola runs away, but his sister pursues him. John Chacha has also come to the station to say goodbye and joins the chase, but he falls and is injured. Bhola stops running, and Belu and Bhola are reunited. The wealthy family adopts Bhola also, and they live happily ever after. Cast Ratan Kumar as Bhola Naaz as Belu David as John Chand Burke as Kamla Bhudo Advani as Pedro Raj Kapoor as himself Production In a piece for the Indian Express on 2 April 1954 issue titled 'Why I Produced Boot Polish', Raj Kapoor wrote, "In Awaara I tried to prove that Vagabonds are not born, but are created in the slums of our modern cities, in the midst of dire poverty and evil environment. Boot Polish graphically shows the problem of destitute children, their struggle for existence and their fight against organised beggary. The purpose of this film is to bring home to you that these orphans are as much your responsibility as that of the Government. Individual charity will not solve this problem because the only solution is co-operative effort on a National scale." Awards 1955 Cannes Film Festival Special Mention to a child actress - Naaz Filmfare Awards Best Cinematographer - Tara Dutt Best Film - Raj Kapoor Best Supporting Actor - David Soundtrack Lyrics were written by Hasrat Jaipuri, Shailendra and Deepak. Music for the songs were composed by Shankar–Jaikishan. References External links Boot Polish (1954) on YouTube Review Essay in Visual Anthropology: Virtue Ethics of Boot Polish and Dosti, as Compared with Slumdog Millionaire 1954 films 1950s Hindi-language films Films scored by Shankar–Jaikishan R. K. Films films Filmfare Awards winners Articles containing video clips Films about poverty in India 1954 comedy-drama films Indian comedy-drama films Indian black-and-white films
Mark Wyatt may refer to: Mark Wyatt (rugby union, born 1961) (born 1961) Bermudan-born Canadian rugby union player Mark Wyatt (rugby union, born 1957) (born 1957) Welsh rugby union player F. Mark Wyatt (1920–2006), CIA agent
Cornwall Glacier () is a glacier long, flowing south from Crossover Pass in the Shackleton Range to join Recovery Glacier east of Ram Bow Bluff. It was first mapped in 1957 by the Commonwealth Trans-Antarctic Expedition, and named for General Sir James Handyside Marshall-Cornwall, a member of the Committee of Management of the Commonwealth Trans-Antarctic Expedition, 1955–58. See also List of glaciers in the Antarctic Glaciology References Glaciers of Coats Land
Lagerstroemia speciosa (giant crepe-myrtle, Queen's crepe-myrtle, banabá plant, or pride of India, or "Queen's Flower" or "Jarul") is a species of Lagerstroemia native to tropical southern Asia. It is a deciduous tree with bright pink to light purple flowers. The name "Queen's Flower" is derived from the specific epithet 'reginae' or 'flosreginae', which means "imperial or flower of the queen". The tree bears beautiful attractive flowers in profusion in purple, lilac or pinkish-violet colours, and lasts for many months. Its timber is next only to teak in its strength. It is called Queen Crape myrtle as its flowers look like delicate crape paper. Etymology The genus Lagerstroemia was first described by Carl Linnaeus. The name Lagerstroemia recognizes Magnus von Lagerstroem, a Swedish naturalist and a merchant who provided specimens from the East for Linnaeus. Names The names in English and other languages are as under: () English: Pride of India, Queen Crepe Myrtle. () Khmer: ត្របែកព្រៃ (Trobaek Prey) (بوڠور راي) (), (), () () Growth It is a small to medium-sized to large tree growing to tall, with an attractive symmetrical crown having a short bole or trunk with smooth, flaky light grey or cream-coloured bark. The leaves are simple, deciduous, oval to elliptic with stout petiole, long and broad, with an acute apex. The flowers are produced in erect panicles long, each flower with six white to purple petals long. It has simple leaves with, glabrous, large, elliptic or oblong lanceolate. The fruits are ellipsoid or sub-globose woody capsules. They are green at first, but later turn brown and finally black. The fruits hang on to the trees. It is easily raised through seeds. It grows best on rich deep alluvial loams and prefers warm, humid and moist soils and can withstand water logging. Flowering occurs 3–5 years after planting and the main flowering season is April–June with a second flush in July–August. The fruits ripen in November–January. p. 198 Cultivation and uses It is grown in South East Asia, China India, Bangladesh and the Philippines and even extends to Australia. It is native to India particularly in the western ghats of India covering Belgaum, north and south Kanara, Malabar and Travancore and also in Assam and West Bengal. It is also widely cultivated as an ornamental plant in tropical and subtropical areas.The leaves of the banabá and other parts are used widely in the Philippines, Taiwan, and Japan as a tea preparation. Banabá herb is one of the 69 herbal plants promoted by the Philippine Department of Health (DOH). In Vietnam, the plant's young leaves are consumed as vegetables, and its old leaves and mature fruit are used in traditional medicine for reducing glucose in blood. The seeds have narcotic properties. Chemistry Chemical compounds that have been isolated from the extract include corosolic acid, lager-stroemin, flosin B, and reginin A. Medicinal uses Giant Crape Myrtle's seeds are narcotic, bark and leaves are purgative, roots are astringent, stimulant and febrifuge (fever removing). Decoction of leaves is used in diabetes. In Manipur, its fruit is used locally applied for apathy of the mouth Recognition Pride of India or Tāmhan in Marathi is recognised as the state flower of the state of Maharashtra in India. In Hindu mythology, it is said that worshipping Lord Brahma results in blossoming of these flowers of Giant Crape Myrtle and Banaba tree and as such it brings prosperity to the house. In Buddhism In Theravada Buddhism, this plant is said to have been used as the tree for achieving enlightenment, or Bodhi by the eleventh Buddha ("Paduma – පදුම"), and the twelfth Buddha (Naarada – නාරද)t. The plant is known as මුරුත (Murutha) in Sinhala and Mahaasona – මහාසොණ in Sanskrit. Gallery References Huxley, A., ed. (1992). New RHS Dictionary of Gardening 3: 10. External links Flora of Pakistan: Lagerstroemia speciosa speciosa Flora of tropical Asia Medicinal plants of Asia Taxa named by Carl Linnaeus Taxa named by Christiaan Hendrik Persoon Symbols of Maharashtra
Martavious Lee (born August 10, 1989) is an American football cornerback who is currently a free agent. He played college football at Utah. Professional career Baltimore Ravens On May 8, 2013, he signed with the Baltimore Ravens as an undrafted free agent. On August 25, 2013, he was waived by the Ravens. San Jose SaberCats On October 4, 2013, Lee was assigned to the San Jose SaberCats of the Arena Football League. On January 2, 2014, he was reassigned by the SaberCats. External links Utah Utes bio Baltimore Ravens bio References 1989 births Living people Baltimore Ravens players San Jose SaberCats players Utah Utes football players
Rudolf Litsch (born 4 August 1944) is an Austrian weightlifter. He competed in the men's middle heavyweight event at the 1972 Summer Olympics. References 1944 births Living people Austrian male weightlifters Olympic weightlifters for Austria Weightlifters at the 1972 Summer Olympics Place of birth missing (living people)
An open service interface definition (OSID) is a programmatic interface specification describing a service. These interfaces are specified by the Open Knowledge Initiative (OKI) to implement a service-oriented architecture (SOA) to achieve interoperability among applications across a varied base of underlying and changing technologies. Rationale To preserve the investment in software engineering, program logic is separated from underlying technologies through the use of software interfaces each of which defines a contract between a service consumer and a service provider. This separation is the basis of any valid SOA. While some methods define the service interface boundary at a protocol or server level, OSIDs place the boundary at the application level to effectively insulate the consumer from protocols, server identities, and utility libraries that are in the domain to a service provider resulting in software which is easier to develop, longer-lasting, and usable across a wider array of computing environments. OSIDs assist in software design and development by breaking up the problem space across service interface boundaries. Because network communication issues are addressed within a service provider and below the interface, there isn't an assumption that every service provider implement a remote communications protocol (though many do). OSIDs are also used for communication and coordination among the various components of complex software which provide a means of organizing design and development activities for simplified project management. OSID providers (implementations) are often reused across a varied set of applications. Once software is made to understand the interface contract for a service, other compliant implementations may be used in its place. This achieves reusability at a high level (a service level) and also serves to easily scale software written for smaller more dedicated purposes. An OSID provider implementation may be composed of an arbitrary number of other OSID providers. This layering technique is an obvious means of abstraction. When all the OSID providers implement the same service, this is called an adapter pattern. Adapter patterns are powerful techniques to federate, multiplex, or bridge different services contracting from the same interface without the modification to the application. List Agent Assessment Authentication Authorization CourseManagement Dictionary Filing Grading Hierarchy Logging Messaging Repository Scheduling Workflow References Baving, T., Cook, D., Green, T. Integrating the Educational Enterprise. 2003. Kraan, W. O.K.I. and IMS, wires and sockets revisited. Kahn, J. Screen Shots: Repository OSID Interoperability. 2005. Kumar, V., Merriman, J., Thorne, S. Open Knowledge Initiative Final Report. 2004. Kahn, J. Repository Developer's Guide. 2006. Kahn, J. Managing Complexity and Surviving Technology Change. 2005. External links OSID wiki PHP OSIDs Software architecture Service-oriented (business computing)
Antony R. H. Copley (1 July 1937 – 18 July 2016) was a British historian. He was an honorary professor at the University of Kent at Canterbury, and specialised in nineteenth century French history and modern Indian history. He was born on 1 July 1937 in Hertfordshire, the son of Alan Copley, a solicitor, and Iris Copley, and educated at Gresham's School and Worcester College, Oxford. In 1967, he joined the staff at the University of Kent at Canterbury, and was granted an honorary professorship when he retired. In 1959 Copley was found by the police in a public lavatory and arrested for importuning with immoral purposes. On the advice of his solicitor father, he pleaded guilty. At the time of his death he was looking forward to a general pardon for men who like himself had been convicted of homosexual acts. Publications "Sexual Moralities in France 1780-1980", Routledge (1989) Gandhi: Against the Tide, Oxford University Press (1996) Religions in Conflict: Ideology, Cultural Contact and Conversion in Late-Colonial India, Oxford India Paperbacks, 2000 Gandhi, Freedom, and Self-Rule (Global Encounters: Studies in Comparative Political Theory) by Anthony J. Parel, Judith M. Brown, Antony Copley and Fred Dallmayr (2000) Gurus and their followers: New religious reform movements in Colonial India, Oxford University Press, (2000) A Spiritual Bloomsbury: Hinduism and Homosexuality in the Lives and Writings of Edward Carpenter, E.M. Forster, and Christopher Isherwood, Lexington, (2006) Hinduism in Public and Private Reform, Hindutva, Gender, and Sampraday, Oxford India Paperbacks, 2009 Music and the Spiritual: Composers and Politics in the 20th Century, Ziggurat, (2012) A Memoir: Historian and Homosexual: Search for a Postwar Identity: Edited Diaries and Journals, Fastprint publishing, (2016) References 1937 births 2016 deaths Academics of the University of Kent Alumni of Worcester College, Oxford British LGBT historians People educated at Gresham's School 21st-century British LGBT people 20th-century British historians 21st-century British historians 20th-century British LGBT people
The Rivière Angers flows entirely in the township of Angers, in the unorganized territory of Rivière-Bonaventure, in Bonaventure Regional County Municipality, in the administrative region of Gaspésie-Îles-de-la-Madeleine, in Quebec, in Canada. The Angers river flows northeast, then east into a forest area in a narrow plain bordered by mountains. Its lower part runs parallel to the north shore of the Chaleur Bay (French: La Baie-des-Chaleurs). The Angers river flows on the west bank of the Cascapedia River. The latter flows south to the north shore of Chaleur Bay which opens east to the Gulf of St. Lawrence. Geography The hydrographic slopes neighboring the Angers river are: North side: Argument stream; East side: Cascapedia River; South side: Stewart River; West side: McCarthy Brook, Mann Brook. The Angers river takes its source at of altitude in mountainous and forested area. This source is located at: West of the limit of the unorganized territory of Rivière-Nouvelle; North of the city limit of Carleton-sur-Mer (MRC of Avignon Regional County Municipality); North of the limit of the north shore of the Chaleur Bay. From its source, the Angers river flows over , according to the following segments: towards the North-East by meandering in mountains, until the confluence of the Angers South River (coming from the South); north, to the confluence of Argument stream (coming from the West); towards the North-East, up to the confluence of the "Petit Nord stream" (coming from the North-West); towards the East, up to the confluence of the "Grand Nord stream"; towards the South-East, until the confluence of the "Litigation brook" (coming from the South); towards the East, up to the confluence of the "Grand Nord stream"; eastwards, to the confluence of the river. The Angers river flows on the west bank of the Cascapedia River at the limit of the cantons of Angers and Maria. This confluence is located at: North-West of the center of the village of Saint-Jules-de-Cascapédia; upstream from Île du Cheval, located on the Cascapedia River; northwest of the route 132 bridge located near the confluence of the Cascapedia River. Toponymy The toponym "Rivière Angers" was formalized on December 5, 1968, at the Commission de toponymie du Québec. See also Cascapedia River Chaleur Bay Rivière-Bonaventure, an unorganized territory Bonaventure Regional County Municipality List of rivers of Quebec References External links Rivière-Angers old forest - Fir-birch and cedar and fir-yellow birch forest Rivers of Gaspésie–Îles-de-la-Madeleine
Thomas "Trooper" Washington (April 21, 1944 – November 19, 2004) was an American professional basketball player born and raised in Philadelphia. Biography A 6'7" forward from Cheyney University of Pennsylvania, Washington was drafted in 1967 in the 5th round by the Cincinnati Royals, but he played instead in the American Basketball Association from 1967 to 1973 as a member of the Pittsburgh / Minnesota Pipers, Los Angeles Stars, The Floridians, and New York Nets. He won the 1968 ABA Championship with the Pittsburgh Pipers and appeared in the 1969 ABA All-Star Game. In his ABA career, Washington averaged 10.6 points per game and 10.0 rebounds per game. Death Washington died suddenly while coaching his first game as head coach of the Pennsylvania Pit Bulls, a team in a league also called the American Basketball Association. References 1944 births 2004 deaths American men's basketball players Cheyney Wolves men's basketball players Cincinnati Royals draft picks Los Angeles Stars players Miami Floridians players Minnesota Pipers players New York Nets players Pittsburgh Pipers players Centers (basketball) Power forwards (basketball) Basketball players from Philadelphia
Eastside Park (originally dedicated as Washington Park, alternately referred to as East Side Park) is a park located in Paterson, New Jersey. The park is bordered by Martin Luther King, Jr. Way (Broadway) to the north, McLean Boulevard (State Route 20) to the east, Park Avenue to the south, and Derrom Avenue to the west. Eastside Park is the cornerstone of the Eastside Park Historic District, a state and nationally registered historic place added to the National Register of Historic Places on July 7, 2004. History Eastside Park has its roots in the development plans of former Civil War Colonel Andrew Derrom, who had purchased undeveloped lands between 1868 and 1872 and built a mansion and club house in the Eastside section of the city in 1880. A year later, city leaders decided to establish a public parks system for the city, but a city ordinance authorizing the purchasing of land in the city's took seven more years to be enacted, with the first land purchased by the city being Colonel Derrom's 66-acre property for $75,000. In 1899, Eastside Park was formally designed by John Y. Culyer, a landscape architect from New York City who served as a commissioner on the Paterson Parks Commission. Culyer's resume included serving as the assistant engineer in both the Central Park and Prospect Park developments by Frederick Law Olmsted. Ironically, Culyer was tasked with the Eastside Park project while Olmstead had won the city's Westside Park design competition, and both parks would be considered examples of the growing City Beautiful movement. Eastside Park soon became the catalyst and anchor for the rapid development of Paterson's Eastside neighborhood, with the Eastside Park Historic District area directly adjacent to the park becoming the location of mansions built by the city's industrialists and mill owners. By 1915, the surrounding neighborhood included over 500 structures, and the park had been modified to include a stable, pavilion, arbors, and a club house. The original mansion built by Colonel Derrom had been torn down, however. During the 20th century, the park underwent continual change, including the addition of tennis courts and the renovation of the park's baseball fields through the state Department of Environmental Protection "Green Acres" program. One of these baseball fields has since been named in honor of Larry Doby, a star athlete and graduate from nearby Eastside High School, who later became the first African-American to play in the American League, being picked up by the Cleveland Indians in 1947. However, during these additions, some of the original pathways and structural elements were removed. The original stable and pavilion have been modified and restored, and are among the few architectural representatives of Culyer's 1899 design. The city's Eastside Neighborhood Association takes special care of the park, and often has cleaning days in the park that coincide with their annual neighborhood House Tour. Monuments Alice Weight Memorial Fountain: The fountain, erected in 1916, is of an elaborate Italian renaissance inspired piece. The large shell-motif bowl is mounted on a quadripartite pedestal made up of baroque inspired brackets with foliate decoration. A circular concrete base is interspersed with marble sections and a contemporary decorative wrought iron fence surrounds this plaza. The fountain was given by Mary H. Weight from New York City in honor of her older sister. Charles Curie Monument: Designed by George Thomas Brewster, the bronze bust rests on a neo-classical granite pedestal, and was erected in 1913 in honor of a local war hero who served as a captain in the Civil War. Civil War Monument: The Civil War monument was installed in Eastside Park in 1922 by Gaetano Federici. This monument consists of an Egyptian-revival obelisk on a classical revival base which is surmounted by a statue of a Union soldier. The four-sided object has bronze plaques on each face. The overall monument is surrounded by four bronze Confederate cannons on granite blocks. Pulaski Monument: The Kazimierz Pulaski monument was commissioned by the "Americans of Polish Descent" group to honor the Polish Count and Patriot general of the American Revolution. His statue was made by Gaetano Federici for the 150th anniversary of Pulaski's death. The granite pedestal was replaced in 2000 with inscriptions added to memorialize soldiers from World War II. Buildings The Charles E. Van Buren house is an 1860s farm-house that predates the park itself and the purchase by Colonel Derrom, and was built in the Greek revival style of architecture. The Van Buren home is a two-story 5 bay rectangular wood frame plan, and was occupied by the Van Buren family until 1888 when the property was purchased by the city. The home was used as the city's Park Superintendent's residence, and was later used as office space for the Department of Parks and Recreation. The Victorian Band Stand was inspired by the Arts and Crafts movement, and was constructed during the Victorian era at the turn of the 20th century. It is similar in design to the Women's Comfort Station, and could accommodate as many as 5,000 people for one of twenty concerts given in a season. Women's Comfort Station: By 1892 there was a suitable need for a commode and toilet for ladies and children and a place for shelter for the visitors in case of sudden storms. The city Parks Commission decided to convert the stone carriage house into a toilet and shelter at the expense of about $2500. The building was surrounded with a spacious piazza about twenty feet wide. By 1906, the Parks Commission decided to build a new structure. The Women's Comfort Station is 40 feet by 60 feet and two stories tall with a mansard roof, and provided a stable with five stalls, a haymow, a wagon, tool house, and workshop. The Cricket Club House, while a historic structure, has for years been vacant. Cricket was a highly popular sport in Paterson, and was played continuously in the park until the 1930s. The original field was situated on the grounds of the park's south lawn, and soon was expanded for baseball usage. A wood-frame cricket club house was erected on the site but burned down in 1899. In 1900, the new clubhouse was erected, which is the stone and concrete building standing presently. References Geography of Paterson, New Jersey Landscape design history of the United States Urban public parks
Reinhard Rychly (born 7 November 1951) is a German former gymnast. He competed at the 1972 Summer Olympics in all artistic gymnastics events and won a bronze medal with the East German team. Individually his best achievement was 15th place on the horizontal bar. References 1951 births Living people German male artistic gymnasts Olympic gymnasts for East Germany East German male artistic gymnasts Gymnasts at the 1972 Summer Olympics Olympic bronze medalists for East Germany Olympic medalists in gymnastics Sportspeople from Rostock Medalists at the 1972 Summer Olympics People from Bezirk Rostock
Maria Nicklisch (1904–1995) was a German stage actress. She also appeared in several films. Selected filmography Kitty and the World Conference (1939) References Bibliography Arthur Holmberg. The Theatre of Robert Wilson. Cambridge University Press, 1996. External links 1904 births 1995 deaths German film actresses German stage actresses
Świderek () is a village in the administrative district of Gmina Augustów, within Augustów County, Podlaskie Voivodeship, in north-eastern Poland. References Villages in Augustów County
Kyai Gedhe Pamanahan was the first ruler of the Sultanate of Mataram. He is also referred to as Kyai Gedhe Mataram. He was the descendant of Ki Ageng Selo (Sela is a village near present-day Demak). His father, Ki Ageng Ngenis, was a preacher who spread Islam in Surakarta. Pamanahan became the war advisor of the king of Pajang, Sultan Hadiwijaya. After Hadiwijaya won a battle against Aria Panangsang with his advice, he gave Pamanahan the land to the south, near modern Surakarta, which became the Sultanate of Mataram, with the right of autonomous government. References Sultans of Mataram Indonesian monarchs 16th-century monarchs in Asia 16th-century Indonesian people
Kuluin is a suburb of Maroochydore in the Sunshine Coast Region, Queensland, Australia. Kuluin had a population of 2,363 people in the and 2,700 in the . History The locality takes its name from an Aboriginal word in the Kabi language meaning black swan. Kuluin State School opened in 1987. In the , Kuluin had a population of 2363 people. Education Kuluin State School is a government primary (Prep-6) school for boys and girls at Tallow Wood Drive (). In 2017, the school had an enrolment of 622 students with 47 teachers (41 full-time equivalent) and 21 non-teaching staff (16 full-time equivalent). In 2018, the school had an enrolment of 596 students with 46 teachers (38 full-time equivalent) and 20 non-teaching staff (15 full-time equivalent). The school includes a special education program. There are no secondary schools in Kuluin. The nearest government secondary school is Maroochydore State High School in neighbouring Maroochydore to the east. Amenities There are a number of parks in the area: Daintree Cl Park, Drain () Daintree Park () Kuluin Neighbourhood Park () Kuskoff Park () Martins Creek Bushland Conservation Reserve () Martins Creek Soccer Ground () Mcarthur Park () South Eudlo Creek Bushland Conservation Reserve () Tallow Wood Drive Environmental Park () References External links Suburbs of the Sunshine Coast Region Maroochydore
Cohoba is a Taíno transliteration for a ceremony in which the ground seeds of the cojóbana tree (Anadenanthera spp.) were inhaled, the Y-shaped nasal snuff tube used to inhale the substance, and the psychoactive drug that was inhaled. Use of this substance produced a hallucinogenic, entheogenic, or psychedelic effect. The cojóbana tree is believed by some to be Anadenanthera peregrina although it may have been a generalized term for psychotropics, including the quite toxic Datura and related genera (Solanaceae). The corresponding ceremony using cohoba-laced tobacco is transliterated as cojibá. This was said to have produced the sense of a visionary journey of the kind associated with the practice of shamanism. The practice of snuffing cohoba was popular with the Taíno and Arawakan peoples, with whom Christopher Columbus made contact. However, the use of Anadenanthera spp. powder was widespread in South America, being used in ancient times by the Wari culture and Tiwanaku people of Peru and Bolivia and also by the Yanomami people of Brazil and Venezuela. Other names for cohoba include vilca, cebíl, and yopó. In Tiwanaku culture, a snuff tray was used along with an inhaling tube. Fernando Ortiz, the founder of Cuban Cultural Studies, offers a detailed analysis of the use of cohoba in his important anthropological work, . History Cohoba is also known as yopo. Historically, this narcotic snuff was prepared and used by the indigenous people living in South America and the Indians of the Caribbean. Early accounts of it first appeared during the time of Christopher Columbus's exploration, with its first documentation written in 1496 by Ramon Pane—who travelled with Columbus in the second voyage. The name of "cohoba" refers to the finely ground, cinnamon-colored snuff itself, as well as the ceremonial practice using it by South American tribes. Cuiva and Piaroa people of Orinocoan descent commonly consume Cohoba. As a part of important shamanistic rituals, cohoba represents identity and sociality. The blending step of the plant mixture determines the potency of cohoba, based on the quality of the ingredients and its preparation. Cohoba seeds are harvested once they mature, from October to February, such that cohoba can be prepared fresh by shamans throughout the year, when necessary. The bark of the cohoba tree is then collected, with its quality judged by the fineness and whiteness of the powdered ash after burning the bark. Meanwhile, the seeds of the cohoba plant are pulverized and skillfully blended with the powdered bark ash to create a dough resembling butter. Once the desired texture is achieved, the dough is flattened into a cookie and cooked over a fire. Traditionally, yopo is taken by deep inhalation through bifurcated tubes from a special apparatus resembling a slightly deep, concave wooden plate. Symptoms Though there are myriad somatic symptoms, ranging from violent sneezing to increased mucus production and bloodshot eyes, cohoba is appreciated for the altered, other-worldly state of consciousness it lends to the user. Even though cohoba is often snuffed with tobacco, it has pharmacologically intriguing properties distinct from tobacco. The active components in cohoba responsible for the hallucinogenic effects are DMT (N,N-dimethyltryptamine) and bufotenine (N,N-dimethyl-5-hydroxytryptamine). The effects of DMT include kaleidoscopic visions similar to LSD that may lead to scenery hallucinations, accompanied by auditory hallucinations. The psychotic effects derived from bufotenine have been suggested to have resulted from central nervous system activity. Though cohoba usage is not as widespread as before, it is still taken up today by various localities of South America for the aforementioned rich, hallucinogenic properties. References Psychedelic drugs Entheogens Taíno
The Finnish People's Organisation (Finnish: , SKJ) (Swedish: , FFO) was a bilingual Nazi party founded by Jaeger Captain Arvi Kalsta. Supporters of the movement were also called Kalstaites after the leader. The inaugural meeting of the organization was held in March 1933 and was attended by about 500 members. SKJ published the magazines Herää Suomi ('Finland Awake'), Hakkorset and Hakaristi ('Swastika', editor Thorvald Oljemark). In addition to its own magazines, the organization had its own publishing house Vasara. The organization wore a brown uniform like the Sturmabteilung of the German Nazi Party, and used the greeting "Finland Awake!" The party received some support among the Swedish-speaking population of Uusimaa. The organization received only 2,733 votes in the 1933 Finnish parliamentary election, with Jaakko Seise receiving almost quarter of the votes. However, at its peak SKJ had 20,000 members. Due to Kalsta moving to Rovaniemi to run a hotel the party ceased its activities in 1936, but Kalsta resumed his Nazi career in 1940 by founding the Organisation of National Socialists. Election results Parliament of Finland Sources online version References External links The party program (in Finnish) Defunct political parties in Finland Nationalist parties in Finland Nazi parties Political parties established in 1933 Nazism in Finland Banned far-right parties Anti-communist organisations in Finland
Helena Ciak (born 15 December 1989) is a French basketball player for Lyon ASVEL and the French national team, where she participated at the 2014 FIBA World Championship. Ciak switched to Dynamo Kursk in 2016 and won with her team the EuroLeague. References External links 1989 births Living people Sportspeople from Dunkirk French women's basketball players Centers (basketball) Basketball players at the 2016 Summer Olympics Basketball players at the 2020 Summer Olympics Olympic basketball players for France French expatriate sportspeople in Russia French expatriate basketball people in Russia France women's national basketball team players Medalists at the 2020 Summer Olympics Olympic medalists in basketball Olympic bronze medalists for France
```cython # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # # path_to_url # # Unless required by applicable law or agreed to in writing, # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # specific language governing permissions and limitations # distutils: language = c++ # cython: embedsignature = True include "config.pxi" from libcpp.string cimport string from libcpp cimport bool as c_bool from libcpp.map cimport map cimport cpython from cython.operator cimport dereference as deref from libkudu_client cimport * from kudu.compat import tobytes, frombytes, dict_iter from kudu.schema cimport Schema, ColumnSchema, ColumnSpec, KuduValue, KuduType from kudu.errors cimport check_status from kudu.util import to_unixtime_micros, from_unixtime_micros, \ from_hybridtime, to_unscaled_decimal, from_unscaled_decimal, \ unix_epoch_days_to_date, date_to_unix_epoch_days from errors import KuduException import six # True if this python client was compiled with a # compiler that supports __int128 which is required # for decimal type support. This is generally true # except for EL6 environments. IF PYKUDU_INT128_SUPPORTED == 1: CLIENT_SUPPORTS_DECIMAL = True ELSE: CLIENT_SUPPORTS_DECIMAL = False try: import pandas CLIENT_SUPPORTS_PANDAS = True except ImportError: CLIENT_SUPPORTS_PANDAS = False # Replica selection enums LEADER_ONLY = ReplicaSelection_Leader CLOSEST_REPLICA = ReplicaSelection_Closest FIRST_REPLICA = ReplicaSelection_First cdef dict _replica_selection_policies = { 'leader': ReplicaSelection_Leader, 'closest': ReplicaSelection_Closest, 'first': ReplicaSelection_First } # Read mode enums READ_LATEST = ReadMode_Latest READ_AT_SNAPSHOT = ReadMode_Snapshot READ_YOUR_WRITES = ReadMode_ReadYourWrites cdef dict _read_modes = { 'latest': ReadMode_Latest, 'snapshot': ReadMode_Snapshot, 'read_your_writes': ReadMode_ReadYourWrites } ENCRYPTION_OPTIONAL = EncryptionPolicy_Optional ENCRYPTION_REQUIRED_REMOTE = EncryptionPolicy_RequiredRemote ENCRYPTION_REQUIRED = EncryptionPolicy_Required cdef dict _encryption_policies = { 'optional': EncryptionPolicy_Optional, 'required_remote': EncryptionPolicy_RequiredRemote, 'required': EncryptionPolicy_Required } cdef dict _type_names = { KUDU_INT8 : "KUDU_INT8", KUDU_INT16 : "KUDU_INT16", KUDU_INT32 : "KUDU_INT32", KUDU_INT64 : "KUDU_INT64", KUDU_STRING : "KUDU_STRING", KUDU_BOOL : "KUDU_BOOL", KUDU_FLOAT : "KUDU_FLOAT", KUDU_DOUBLE : "KUDU_DOUBLE", KUDU_BINARY : "KUDU_BINARY", KUDU_UNIXTIME_MICROS : "KUDU_UNIXTIME_MICROS", KUDU_DECIMAL : "KUDU_DECIMAL", KUDU_VARCHAR : "KUDU_VARCHAR", KUDU_DATE : "KUDU_DATE" } # Range Partition Bound Type enums EXCLUSIVE_BOUND = PartitionType_Exclusive INCLUSIVE_BOUND = PartitionType_Inclusive cdef dict _partition_bound_types = { 'exclusive': PartitionType_Exclusive, 'inclusive': PartitionType_Inclusive } def _check_convert_range_bound_type(bound): # Convert bounds types to constants and raise exception if invalid. def invalid_bound_type(bound_type): raise ValueError('Invalid range partition bound type: {0}' .format(bound_type)) if isinstance(bound, int): if bound >= len(_partition_bound_types) \ or bound < 0: invalid_bound_type(bound) else: return bound else: try: return _partition_bound_types[bound.lower()] except KeyError: invalid_bound_type(bound) def _correct_pandas_data_type(dtype): """ This method returns the correct Pandas data type for some data types that are converted incorrectly by Pandas. Returns ------- pdtype : type """ import numpy as np if dtype == "int8": return np.int8 if dtype == "int16": return np.int16 if dtype == "int32": return np.int32 if dtype == "float": return np.float32 else: return None cdef class TimeDelta: """ Wrapper interface for kudu MonoDelta class, which is used to specify timedeltas for timeouts and other uses. """ cdef: MonoDelta delta def __cinit__(self): pass @staticmethod def from_seconds(seconds): """ Construct a new TimeDelta from fractional seconds. Parameters ---------- seconds : double Returns ------- delta : TimeDelta """ cdef TimeDelta result = TimeDelta() result.init(MonoDelta.FromSeconds(seconds)) return result @staticmethod def from_millis(int64_t ms): """ Construct a new TimeDelta from integer milliseconds. Parameters ---------- ms : int Returns ------- delta : TimeDelta """ cdef TimeDelta result = TimeDelta() result.init(MonoDelta.FromMilliseconds(ms)) return result @staticmethod def from_micros(int64_t us): """ Construct a new TimeDelta from integer microseconds. Parameters ---------- us : int Returns ------- delta : TimeDelta """ cdef TimeDelta result = TimeDelta() result.init(MonoDelta.FromMicroseconds(us)) return result @staticmethod def from_nanos(seconds): """ Construct a new TimeDelta from integer nanoseconds. Parameters ---------- ns : int Returns ------- delta : TimeDelta """ cdef TimeDelta result = TimeDelta() result.init(MonoDelta.FromNanoseconds(seconds)) return result cpdef double to_seconds(self): """ Return timedelta as fractional seconds. """ return self.delta.ToSeconds() cpdef int64_t to_millis(self): """ Return timedelta as exact milliseconds. """ return self.delta.ToMilliseconds() cpdef int64_t to_micros(self): """ Return timedelta as exact microseconds. """ return self.delta.ToMicroseconds() cpdef int64_t to_nanos(self): """ Return timedelta as exact nanoseconds. """ return self.delta.ToNanoseconds() cdef init(self, const MonoDelta& val): self.delta = val def __repr__(self): cdef object as_string if self.delta.Initialized(): as_string = self.delta.ToString() return 'kudu.TimeDelta({0})'.format(as_string) else: return 'kudu.TimeDelta()' def __richcmp__(TimeDelta self, TimeDelta other, int op): if op == cpython.Py_EQ: return self.delta.Equals(other.delta) elif op == cpython.Py_NE: return not self.delta.Equals(other.delta) elif op == cpython.Py_LT: return self.delta.LessThan(other.delta) elif op == cpython.Py_LE: return not self.delta.MoreThan(other.delta) elif op == cpython.Py_GT: return self.delta.MoreThan(other.delta) elif op == cpython.Py_GE: return not self.delta.LessThan(other.delta) else: raise ValueError('invalid operation: {0}'.format(op)) cdef class Client: """ The primary class for interacting with a Kudu cluster. Can connect to one or more Kudu master servers. Do not instantiate this class directly; use kudu.connect instead. """ def __cinit__(self, addr_or_addrs, admin_timeout_ms=None, rpc_timeout_ms=None, sasl_protocol_name=None, require_authentication=False, encryption_policy=ENCRYPTION_OPTIONAL, jwt=None, trusted_certificates=None): cdef: string c_addr vector[string] c_addrs KuduClientBuilder builder TimeDelta timeout # Python programs will often have already imported _ssl, which # has the side effect of initializing OpenSSL. So, we detect # whether _ssl is present, and if we can import it, we disable # Kudu's initialization to avoid a conflict. try: import _ssl except: pass else: check_status(DisableOpenSSLInitialization()) if isinstance(addr_or_addrs, six.string_types): addr_or_addrs = [addr_or_addrs] elif not isinstance(addr_or_addrs, list): addr_or_addrs = list(addr_or_addrs) # Raise exception for empty iters, otherwise the connection call # will hang if not addr_or_addrs: raise ValueError("Empty iterator for addr_or_addrs.") self.master_addrs = addr_or_addrs for addr in addr_or_addrs: c_addrs.push_back(tobytes(addr)) builder.master_server_addrs(c_addrs) if admin_timeout_ms is not None: timeout = TimeDelta.from_millis(admin_timeout_ms) builder.default_admin_operation_timeout(timeout.delta) if rpc_timeout_ms is not None: timeout = TimeDelta.from_millis(rpc_timeout_ms) builder.default_rpc_timeout(timeout.delta) if sasl_protocol_name is not None: builder.sasl_protocol_name(sasl_protocol_name) if require_authentication: builder.require_authentication(require_authentication) if jwt is not None: builder.jwt(tobytes(jwt)) if trusted_certificates is not None: for c in trusted_certificates: builder.trusted_certificate(tobytes(c)) builder.encryption_policy(encryption_policy) check_status(builder.Build(&self.client)) # A convenience self.cp = self.client.get() def __dealloc__(self): self.close() property is_multimaster: def __get__(self): return self.cp.IsMultiMaster() cpdef close(self): # Nothing yet to clean up here pass def latest_observed_timestamp(self): """ Get the highest timestamp observed by the client in UTC. This is intended to gain external consistency across clients. Note: The latest observed timestamp can also be used to start a snapshot scan on a table which is guaranteed to contain all data written or previously read by this client. This should be treated as experimental as it this method will change or disappear in a future release. Additionally, note that 1 must be added to the value to be used in snapshot reads (this is taken care of in the from_hybridtime method). Returns ------- latest : datetime.datetime """ return from_hybridtime(self.cp.GetLatestObservedTimestamp()) def create_table(self, table_name, Schema schema, partitioning, n_replicas=None, owner=None, comment=None): """ Creates a new Kudu table from the passed Schema and options. Parameters ---------- table_name : string schema : kudu.Schema Create using kudu.schema_builder partitioning : Partitioning object n_replicas : int Number of replicas to set. This should be an odd number. If not provided (or if <= 0), falls back to the server-side default. """ cdef: KuduTableCreator* c Status s c = self.cp.NewTableCreator() try: c.table_name(tobytes(table_name)) c.schema(schema.schema) self._apply_partitioning(c, partitioning, schema) if n_replicas: c.num_replicas(n_replicas) if owner: c.set_owner(tobytes(owner)) if comment: c.set_comment(tobytes(comment)) s = c.Create() check_status(s) finally: del c cdef _apply_partitioning(self, KuduTableCreator* c, part, Schema schema): cdef: vector[string] v PartialRow lower_bound PartialRow upper_bound PartialRow split_row KuduRangePartition* range_partition # Apply hash partitioning. for col_names, num_buckets, seed in part._hash_partitions: v.clear() for n in col_names: v.push_back(tobytes(n)) if seed: c.add_hash_partitions(v, num_buckets, seed) else: c.add_hash_partitions(v, num_buckets) # Apply range partitioning if part._range_partition_cols is not None: v.clear() for n in part._range_partition_cols: v.push_back(tobytes(n)) c.set_range_partition_columns(v) if part._range_partitions_with_custom_hash_schemas: for p in part._range_partitions_with_custom_hash_schemas: if not isinstance(p.lower_bound, PartialRow): lower_bound = schema.new_row(p.lower_bound) else: lower_bound = p.lower_bound lower_bound._own = 0 if not isinstance(p.upper_bound, PartialRow): upper_bound = schema.new_row(p.upper_bound) else: upper_bound = p.upper_bound upper_bound._own = 0 range_partition = new KuduRangePartition( lower_bound.row, upper_bound.row, p.lower_bound_type, p.upper_bound_type) for col_names, num_buckets, seed in p.hash_dimensions: v.clear() for n in col_names: v.push_back(tobytes(n)) range_partition.add_hash_partitions(v, num_buckets, seed if seed else 0) c.add_custom_range_partition(range_partition) if part._range_partitions: for partition in part._range_partitions: if not isinstance(partition[0], PartialRow): lower_bound = schema.new_row(partition[0]) else: lower_bound = partition[0] lower_bound._own = 0 if not isinstance(partition[1], PartialRow): upper_bound = schema.new_row(partition[1]) else: upper_bound = partition[1] upper_bound._own = 0 c.add_range_partition( lower_bound.row, upper_bound.row, _check_convert_range_bound_type(partition[2]), _check_convert_range_bound_type(partition[3]) ) if part._range_partition_splits: for split in part._range_partition_splits: if not isinstance(split, PartialRow): split_row = schema.new_row(split) else: split_row = split split_row._own = 0 c.add_range_partition_split(split_row.row) def delete_table(self, table_name): """ Delete/drop a Kudu table without reserving. Raises KuduNotFound if the table does not exist. Notes ----- The deleted table may turn to soft-deleted status with the flag default_deleted_table_reserve_seconds set to nonzero on the master side. The delete operation or drop operation means that the service will directly delete the table after receiving the instruction. Which means that once we delete the table by mistake, we have no way to recall the deleted data. We have added a new API @soft_delete_table to allow the deleted data to be reserved for a period of time, which means that the wrongly deleted data may be recalled. In order to be compatible with the previous versions, this interface will continue to directly delete tables without reserving the table. Refer to soft_delete_table for detailed usage examples. Parameters ---------- table_name : string """ check_status(self.cp.DeleteTable(tobytes(table_name))) def soft_delete_table(self, table_name, reserve_seconds=None): """ Soft delete/drop a table. Notes ----- Usage Example1: Equal to delete_table(table_name) and the table will not be reserved. client.soft_delete_table(table_name) Usage Example2: The table will be reserved for 600s after delete operation. We can recall the table in time after the delete. client.soft_delete_table(table_name, 600) client.recall_table(table_id) Parameters ---------- table_name : string Name of the table to drop. reserve_seconds : int Reserve seconds after being deleted. """ if reserve_seconds is not None: check_status(self.cp.SoftDeleteTable(tobytes(table_name), reserve_seconds)) else: check_status(self.cp.SoftDeleteTable(tobytes(table_name))) def recall_table(self, table_id, new_table_name=None): """ Recall a deleted but still reserved table. Parameters ---------- table_id : string ID of the table to recall. new_table_name : string New table name for the recalled table. The recalled table will use the original table name if the parameter is empty string (i.e. ""). """ if new_table_name is not None: check_status(self.cp.RecallTable(tobytes(table_id), tobytes(new_table_name))) else: check_status(self.cp.RecallTable(tobytes(table_id))) def table_exists(self, table_name): """Return True if the indicated table exists in the Kudu cluster. Parameters ---------- table_name : string Returns ------- exists : bool """ cdef: string c_name = tobytes(table_name) c_bool exists check_status(self.cp.TableExists(c_name, &exists)) return exists def deserialize_token_into_scanner(self, serialized_token): """ Deserializes a ScanToken using the client and returns a scanner. Parameters ---------- serialized_token : String Serialized form of a ScanToken. Returns ------- scanner : Scanner """ token = ScanToken() return token.deserialize_into_scanner(self, serialized_token) def table(self, table_name): """ Construct a kudu.Table and retrieve its schema from the cluster. Raises KuduNotFound if the table does not exist. Parameters ---------- table_name : string Returns ------- table : kudu.Table """ table_name = tobytes(table_name) cdef Table table = Table(table_name, self) check_status(self.cp.OpenTable(table_name, &table.table)) table.init() return table def list_tables(self, match_substring=None): """ Retrieve a list of non-soft-deleted table names in the Kudu cluster with an optional substring filter. Parameters ---------- match_substring : string, optional If passed, the string must be exactly contained in the table names Returns ------- tables : list[string] Table names returned from Kudu """ cdef: vector[string] tables string c_match size_t i if match_substring is not None: c_match = tobytes(match_substring) check_status(self.cp.ListTables(&tables, c_match)) else: check_status(self.cp.ListTables(&tables)) result = [] for i in range(tables.size()): result.append(frombytes(tables[i])) return result def list_soft_deleted_tables(self, match_substring=None): """ Retrieve a list of soft-deleted table names in the Kudu cluster with an optional substring filter. Parameters ---------- match_substring : string, optional If passed, the string must be exactly contained in the table names Returns ------- tables : list[string] Table names returned from Kudu """ cdef: vector[string] tables string c_match size_t i if match_substring is not None: c_match = tobytes(match_substring) check_status(self.cp.ListSoftDeletedTables(&tables, c_match)) else: check_status(self.cp.ListSoftDeletedTables(&tables)) result = [] for i in range(tables.size()): result.append(frombytes(tables[i])) return result def list_tablet_servers(self): """ Retrieve a list of tablet servers currently running in the Kudu cluster Returns ------- tservers : list[TabletServer] List of TabletServer objects """ cdef: vector[KuduTabletServer*] tservers size_t i check_status(self.cp.ListTabletServers(&tservers)) result = [] for i in range(tservers.size()): ts = TabletServer() ts._own = 1 result.append(ts._init(tservers[i])) return result def new_session(self, flush_mode='manual', timeout_ms=5000, **kwargs): """ Create a new KuduSession for applying write operations. Parameters ---------- flush_mode : {'manual', 'sync', 'background'}, default 'manual' See Session.set_flush_mode timeout_ms : int, default 5000 Timeout in milliseconds mutation_buffer_sz : Size in bytes of the buffer space. mutation_buffer_watermark : Watermark level as percentage of the mutation buffer size, this is used to trigger a flush in AUTO_FLUSH_BACKGROUND mode. mutation_buffer_flush_interval : The duration of the interval for the time-based flushing, in milliseconds. In some cases, while running in AUTO_FLUSH_BACKGROUND mode, the size of the mutation buffer for pending operations and the flush watermark for fresh operations may be too high for the rate of incoming data: it would take too long to accumulate enough data in the buffer to trigger flushing. I.e., it makes sense to flush the accumulated operations if the prior flush happened long time ago. This parameter sets the wait interval for the time-based flushing which takes place along with the flushing triggered by the over-the-watermark criterion. By default, the interval is set to 1000 ms (i.e. 1 second). mutation_buffer_max_num : The maximum number of mutation buffers per KuduSession object to hold the applied operations. Use 0 to set the maximum number of concurrent mutation buffers to unlimited Returns ------- session : kudu.Session """ cdef Session result = Session() result.s = self.cp.NewSession() result.set_flush_mode(flush_mode) result.set_timeout_ms(timeout_ms) if "mutation_buffer_sz" in kwargs: result.set_mutation_buffer_space(kwargs["mutation_buffer_sz"]) if "mutation_buffer_watermark" in kwargs: result.set_mutation_buffer_flush_watermark(kwargs["mutation_buffer_watermark"]) if "mutation_buffer_flush_interval" in kwargs: result.set_mutation_buffer_flush_interval(kwargs["mutation_buffer_flush_interval"]) if "mutation_buffer_max_num" in kwargs: result.set_mutation_buffer_max_num(kwargs["mutation_buffer_max_num"]) return result def new_table_alterer(self, Table table): """ Create a TableAlterer object that can be used to apply a set of steps to alter a table. Parameters ---------- table : Table Table to alter. NOTE: The TableAlterer.alter() method will return a new Table object with the updated information. Examples -------- table = client.table('example') alterer = client.new_table_alterer(table) table = alterer.rename('example2').alter() Returns ------- alterer : TableAlterer """ return TableAlterer(table) #your_sha256_hash------ # Handle marshalling Python values to raw values. Since range predicates # require a const void*, this is one valid (though a bit verbose) # approach. Note that later versions of Cython handle many Python -> C type # casting problems (and integer overflows), but these should all be tested # rigorously in our test suite cdef class RawValue: cdef: void* data def __cinit__(self): self.data = NULL cdef class Int8Val(RawValue): cdef: int8_t val def __cinit__(self, obj): self.val = <int8_t> obj self.data = &self.val cdef class Int16Val(RawValue): cdef: int16_t val def __cinit__(self, obj): self.val = <int16_t> obj self.data = &self.val cdef class Int32Val(RawValue): cdef: int32_t val def __cinit__(self, obj): self.val = <int32_t> obj self.data = &self.val cdef class Int64Val(RawValue): cdef: int64_t val def __cinit__(self, obj): self.val = <int64_t> obj self.data = &self.val cdef class DoubleVal(RawValue): cdef: double val def __cinit__(self, obj): self.val = <double> obj self.data = &self.val cdef class FloatVal(RawValue): cdef: float val def __cinit__(self, obj): self.val = <float> obj self.data = &self.val cdef class BoolVal(RawValue): cdef: c_bool val def __cinit__(self, obj): self.val = <c_bool> obj self.data = &self.val cdef class StringVal(RawValue): cdef: # Python "str" object that was passed into the constructor. # We hold a reference to this so that the underlying data # doesn't go out of scope. object py_str # Heap-allocated Slice object, owned by this instance, # which points to the data in 'py_str' cdef Slice* val def __cinit__(self, obj): self.py_str = obj self.val = new Slice(<char*>self.py_str, len(self.py_str)) # The C++ API expects a Slice* to be passed to the range predicate # constructor. self.data = self.val def __dealloc__(self): del self.val cdef class UnixtimeMicrosVal(RawValue): cdef: int64_t val def __cinit__(self, obj): self.val = to_unixtime_micros(obj) self.data = &self.val cdef class DateVal(RawValue): cdef: int32_t val def __cinit__(self, obj): self.val = date_to_unix_epoch_days(obj) self.data = &self.val #your_sha256_hash------ cdef class TabletServer: """ Represents a Kudu tablet server, containing the uuid, hostname and port. Create a list of TabletServers by using the kudu.Client.list_tablet_servers method after connecting to a cluster """ cdef: const KuduTabletServer* _tserver public bint _own cdef _init(self, const KuduTabletServer* tserver): self._tserver = tserver self._own = 0 return self def __dealloc__(self): if self._tserver != NULL and self._own: del self._tserver def __richcmp__(TabletServer self, TabletServer other, int op): if op == 2: # == return ((self.uuid(), self.hostname(), self.port()) == (other.uuid(), other.hostname(), other.port())) elif op == 3: # != return ((self.uuid(), self.hostname(), self.port()) != (other.uuid(), other.hostname(), other.port())) else: raise NotImplementedError def uuid(self): return frombytes(self._tserver.uuid()) def hostname(self): return frombytes(self._tserver.hostname()) def port(self): return self._tserver.port() cdef class Table: """ Represents a Kudu table, containing the schema and other tools. Create by using the kudu.Client.table method after connecting to a cluster. """ def __cinit__(self, name, Client client): self._name = name self.parent = client # Users should not instantiate directly self.schema = Schema() cdef init(self): # Called after the refptr has been populated self.schema.schema = &self.ptr().schema() self.schema.own_schema = 0 self.schema.parent = self self.num_replicas = self.ptr().num_replicas() def __len__(self): # TODO: is this cheaply knowable? raise NotImplementedError def __getitem__(self, key): spec = self.schema[key] return Column(self, spec) property name: """Name of the table.""" def __get__(self): return frombytes(self.ptr().name()) property id: """Identifier string for the table.""" def __get__(self): return frombytes(self.ptr().id()) # XXX: don't love this name property num_columns: """Number of columns in the table's schema.""" def __get__(self): return len(self.schema) property owner: """Name of the owner of the table.""" def __get__(self): return frombytes(self.ptr().owner()) property comment: """Comment on the table.""" def __get__(self): return frombytes(self.ptr().comment()) def rename(self, new_name): raise NotImplementedError def drop(self): raise NotImplementedError def new_insert(self, record=None): """ Create a new Insert operation. Pass the completed Insert to a Session. If a record is provided, a PartialRow will be initialized with values from the input record. The record can be in the form of a tuple, dict, or list. Dictionary keys can be either column names, indexes, or a mix of both names and indexes. Parameters ---------- record : tuple/list/dict Returns ------- insert : Insert """ return Insert(self, record) def new_insert_ignore(self, record=None): """ Create a new InsertIgnore operation. Pass the completed InsertIgnore to a Session. If a record is provided, a PartialRow will be initialized with values from the input record. The record can be in the form of a tuple, dict, or list. Dictionary keys can be either column names, indexes, or a mix of both names and indexes. Parameters ---------- record : tuple/list/dict Returns ------- insertIgnore : InsertIgnore """ return InsertIgnore(self, record) def new_upsert(self, record=None): """ Create a new Upsert operation. Pass the completed Upsert to a Session. If a record is provided, a PartialRow will be initialized with values from the input record. The record can be in the form of a tuple, dict, or list. Dictionary keys can be either column names, indexes, or a mix of both names and indexes. Parameters ---------- record : tuple/list/dict Returns ------- upsert : Upsert """ return Upsert(self, record) def new_upsert_ignore(self, record=None): """ Create a new UpsertIgnore operation. Pass the completed UpsertIgnore to a Session. If a record is provided, a PartialRow will be initialized with values from the input record. The record can be in the form of a tuple, dict, or list. Dictionary keys can be either column names, indexes, or a mix of both names and indexes. Parameters ---------- record : tuple/list/dict Returns ------- upsertIgnore : UpsertIgnore """ return UpsertIgnore(self, record) def new_update(self, record=None): """ Create a new Update operation. Pass the completed Update to a Session. If a record is provided, a PartialRow will be initialized with values from the input record. The record can be in the form of a tuple, dict, or list. Dictionary keys can be either column names, indexes, or a mix of both names and indexes. Parameters ---------- record : tuple/list/dict Returns ------- update : Update """ return Update(self, record) def new_update_ignore(self, record=None): """ Create a new UpdateIgnore operation. Pass the completed UpdateIgnore to a Session. If a record is provided, a PartialRow will be initialized with values from the input record. The record can be in the form of a tuple, dict, or list. Dictionary keys can be either column names, indexes, or a mix of both names and indexes. Parameters ---------- record : tuple/list/dict Returns ------- updateIgnore : UpdateIgnore """ return UpdateIgnore(self, record) def new_delete(self, record=None): """ Create a new Delete operation. Pass the completed Update to a Session. If a record is provided, a PartialRow will be initialized with values from the input record. The record can be in the form of a tuple, dict, or list. Dictionary keys can be either column names, indexes, or a mix of both names and indexes. Parameters ---------- record : tuple/list/dict Returns ------- delete : Delete """ return Delete(self, record) def new_delete_ignore(self, record=None): """ Create a new DeleteIgnore operation. Pass the completed DeleteIgnore to a Session. If a record is provided, a PartialRow will be initialized with values from the input record. The record can be in the form of a tuple, dict, or list. Dictionary keys can be either column names, indexes, or a mix of both names and indexes. Parameters ---------- record : tuple/list/dict Returns ------- deleteIgnore : DeleteIgnore """ return DeleteIgnore(self, record) def scanner(self): """ Create a new scanner for this table for retrieving a selection of table rows. Examples -------- scanner = table.scanner() scanner.add_predicate(table['key'] > 10) scanner.open() batch = scanner.read_all() tuples = batch.as_tuples() Returns ------- scanner : kudu.Scanner """ cdef Scanner result = Scanner(self) result.scanner = new KuduScanner(self.ptr()) return result def scan_token_builder(self): """ Create a new ScanTokenBuilder for this table to build a series of scan tokens. Examples -------- builder = table.scan_token_builder() builder.set_fault_tolerant().add_predicate(table['key'] > 10) tokens = builder.build() for token in tokens: scanner = token.into_kudu_scanner() scanner.open() tuples = scanner.read_all_tuples() Returns ------- builder : ScanTokenBuilder """ return ScanTokenBuilder(self) cdef class Column: """ A reference to a Kudu table column intended to simplify creating predicates and other column-specific operations. Write arithmetic comparisons to create new Predicate objects that can be passed to a Scanner. Examples -------- scanner.add_predicate(table[col_name] <= 10) """ cdef readonly: Table parent ColumnSchema spec str name def __cinit__(self, Table parent, ColumnSchema spec): self.name = spec.name self.parent = parent self.spec = spec def __repr__(self): result = ('Column({0}, parent={1}, type={2})' .format(self.name, self.parent.name, self.spec.type.name)) return result def __richcmp__(Column self, value, int op): cdef: KuduPredicate* pred KuduValue val Slice col_name_slice ComparisonOp cmp_op Predicate result object _name = tobytes(self.name) col_name_slice = Slice(<char*> _name, len(_name)) if op == 0: # < cmp_op = KUDU_LESS elif op == 1: # <= cmp_op = KUDU_LESS_EQUAL elif op == 2: # == cmp_op = KUDU_EQUAL elif op == 4: # > cmp_op = KUDU_GREATER elif op == 5: # >= cmp_op = KUDU_GREATER_EQUAL else: raise NotImplementedError val = self.spec.type.new_value(value) pred = (self.parent.ptr() .NewComparisonPredicate(col_name_slice, cmp_op, val._value)) result = Predicate() result.init(pred) return result def in_list(Column self, values): """ Creates a new InListPredicate for the Column. If a single value is provided, then an equality comparison predicate is created. Parameters ---------- values : list Examples -------- scanner.add_predicate(table['key'].in_list([1, 2, 3]) Returns ------- pred : Predicate """ cdef: KuduPredicate* pred KuduValue kval vector[C_KuduValue*] vals Slice col_name_slice Predicate result object _name = tobytes(self.name) col_name_slice = Slice(<char*> _name, len(_name)) try: for val in values: kval = self.spec.type.new_value(val) vals.push_back(kval._value) except TypeError: while not vals.empty(): _val = vals.back() del _val vals.pop_back() raise pred = (self.parent.ptr() .NewInListPredicate(col_name_slice, &vals)) result = Predicate() result.init(pred) return result def is_not_null(Column self): """ Creates a new IsNotNullPredicate for the Column which can be used for scanners on this table. Examples -------- scanner.add_predicate(table[col_name].is_not_null()) Returns ------- pred : Predicate """ cdef: KuduPredicate* pred Slice col_name_slice Predicate result object _name = tobytes(self.name) col_name_slice = Slice(<char*> _name, len(_name)) pred = (self.parent.ptr() .NewIsNotNullPredicate(col_name_slice)) result = Predicate() result.init(pred) return result def is_null(Column self): """ Creates a new IsNullPredicate for the Column which can be used for scanners on this table. Examples -------- scanner.add_predicate(table[col_name].is_null()) Returns ------- pred : Predicate """ cdef: KuduPredicate* pred Slice col_name_slice Predicate result object _name = tobytes(self.name) col_name_slice = Slice(<char*> _name, len(_name)) pred = (self.parent.ptr() .NewIsNullPredicate(col_name_slice)) result = Predicate() result.init(pred) return result class RangePartition(object): """ Argument to Client.add_custom_range_partition(...) to contain information on the range bounds and range-specific hash schema. """ def __init__(self, lower_bound=None, upper_bound=None, lower_bound_type='inclusive', upper_bound_type='exclusive'): """ Parameters ---------- lower_bound : PartialRow/list/tuple/dict upper_bound : PartialRow/list/tuple/dict lower_bound_type : {'inclusive', 'exclusive'} or constants kudu.EXCLUSIVE_BOUND and kudu.INCLUSIVE_BOUND upper_bound_type : {'inclusive', 'exclusive'} or constants kudu.EXCLUSIVE_BOUND and kudu.INCLUSIVE_BOUND """ self.lower_bound = lower_bound self.upper_bound = upper_bound self.lower_bound_type = _check_convert_range_bound_type(lower_bound_type) self.upper_bound_type = _check_convert_range_bound_type(upper_bound_type) self.hash_dimensions = [] def add_hash_partitions(self, column_names, num_buckets, seed=None): """ Adds a dimension with the specified parameters to the custom hash schema for this range partition. Parameters ---------- column_names : list of string column names on which to compute hash function num_buckets : the number of buckets for the hash function seed : int - optional; the seed for the hash function mapping rows to buckets Returns ------- self: this object """ if isinstance(column_names, str): column_names = [column_names] self.hash_dimensions.append( (column_names, num_buckets, seed) ) return self class Partitioning(object): """ Argument to Client.create_table(...) to describe table partitioning. """ def __init__(self): self._hash_partitions = [] self._range_partition_cols = None self._range_partitions = [] self._range_partitions_with_custom_hash_schemas = [] self._range_partition_splits = [] def add_hash_partitions(self, column_names, num_buckets, seed=None): """ Adds a set of hash partitions to the table. For each set of hash partitions added to the table, the total number of table partitions is multiplied by the number of buckets. For example, if a table is created with 3 split rows, and two hash partitions with 4 and 5 buckets respectively, the total number of table partitions will be 80 (4 range partitions * 4 hash buckets * 5 hash buckets). Optionally, a seed can be used to randomize the mapping of rows to hash buckets. Setting the seed may provide some amount of protection against denial of service attacks when the hashed columns contain user provided values. Parameters ---------- column_names : list of string column names on which to partition num_buckets : the number of buckets to create seed : int - optional Hash: seed for mapping rows to hash buckets. Returns ------- self: this object """ if isinstance(column_names, str): column_names = [column_names] self._hash_partitions.append( (column_names, num_buckets, seed) ) return self def set_range_partition_columns(self, column_names): """ Sets the columns on which the table will be range-partitioned. Every column must be a part of the table's primary key. If not set, the table will be created with the primary-key columns as the range-partition columns. If called with an empty vector, the table will be created without range partitioning. Parameters ---------- column_names : list of string column names on which to partition Returns ------- self: this object """ if isinstance(column_names, str): column_names = [column_names] self._range_partition_cols = column_names return self def add_range_partition(self, lower_bound=None, upper_bound=None, lower_bound_type='inclusive', upper_bound_type='exclusive'): """ Add a range partition to the table. Multiple range partitions may be added, but they must not overlap. All range splits specified by add_range_partition_split must fall in a range partition. The lower bound must be less than or equal to the upper bound. If this method is not called, the table's range will be unbounded. Parameters ---------- lower_bound : PartialRow/list/tuple/dict upper_bound : PartialRow/list/tuple/dict lower_bound_type : {'inclusive', 'exclusive'} or constants kudu.EXCLUSIVE_BOUND and kudu.INCLUSIVE_BOUND upper_bound_type : {'inclusive', 'exclusive'} or constants kudu.EXCLUSIVE_BOUND and kudu.INCLUSIVE_BOUND Returns ------- self : Partitioning """ if self._range_partition_cols: self._range_partitions.append( (lower_bound, upper_bound, lower_bound_type, upper_bound_type) ) else: raise ValueError("Range Partition Columns must be set before " + "adding a range partition.") return self def add_custom_range_partition(self, range_partition): """ Parameters ---------- range_partition : range partition with custom hash schema to add Returns ------- self : Partitioning """ if self._range_partition_cols is None: raise ValueError("Range Partition Columns must be set before " + "adding a range partition.") self._range_partitions_with_custom_hash_schemas.append(range_partition) return self def add_range_partition_split(self, split_row): """ Add a range partition split at the provided row. Parameters ---------- split_row : PartialRow/list/tuple/dict Returns ------- self : Partitioning """ if self._range_partition_cols: self._range_partition_splits.append(split_row) else: raise ValueError("Range Partition Columns must be set before " + "adding a range partition split.") return self cdef class Predicate: """ Wrapper for a KuduPredicate. Pass to Scanner.add_predicates """ cdef: KuduPredicate* pred def __cinit__(self): self.pred = NULL def __dealloc__(self): if self.pred != NULL: del self.pred cdef init(self, KuduPredicate* pred): self.pred = pred FLUSH_AUTO_SYNC = FlushMode_AutoSync FLUSH_AUTO_BACKGROUND = FlushMode_AutoBackground FLUSH_MANUAL = FlushMode_Manual cdef dict _flush_modes = { 'manual': FlushMode_Manual, 'sync': FlushMode_AutoSync, 'background': FlushMode_AutoBackground } cdef class Session: """ Wrapper for a client KuduSession to build up write operations to interact with the cluster. """ def __cinit__(self): pass def set_flush_mode(self, flush_mode='manual'): """ Set the session operation flush mode Parameters ---------- flush_mode : {'manual', 'sync', 'background'}, default 'manual' You can also use the constants FLUSH_MANUAL, FLUSH_AUTO_SYNC, and FLUSH_AUTO_BACKGROUND """ cdef Status status cdef FlushMode fmode if isinstance(flush_mode, int): # todo: validation fmode = <FlushMode> flush_mode else: try: fmode = _flush_modes[flush_mode.lower()] except KeyError: raise ValueError('Invalid flush mode: {0}' .format(flush_mode)) status = self.s.get().SetFlushMode(fmode) check_status(status) def set_timeout_ms(self, int64_t ms): """ Set the session timeout in milliseconds """ self.s.get().SetTimeoutMillis(ms) def set_mutation_buffer_space(self, size_t size_bytes): """ Set the amount of buffer space used by this session for outbound writes. The effect of the buffer size varies based on the flush mode of the session: AUTO_FLUSH_SYNC: since no buffering is done, this has no effect. AUTO_FLUSH_BACKGROUND: if the buffer space is exhausted, then write calls will block until there is space available in the buffer. MANUAL_FLUSH: if the buffer space is exhausted, then write calls will return an error By default, the buffer space is set to 7 MiB (i.e. 7 * 1024 * 1024 bytes). Parameters ---------- size_bytes : Size of the buffer space to set (number of bytes) """ status = self.s.get().SetMutationBufferSpace(size_bytes) check_status(status) def set_mutation_buffer_flush_watermark(self, double watermark_pct): """ Set the buffer watermark to trigger flush in AUTO_FLUSH_BACKGROUND mode. This method sets the watermark for fresh operations in the buffer when running in AUTO_FLUSH_BACKGROUND mode: once the specified threshold is reached, the session starts sending the accumulated write operations to the appropriate tablet servers. The flush watermark determines how much of the buffer space is taken by newly submitted operations. Setting this level to 100% results in flushing the buffer only when the newly applied operation would overflow the buffer. By default, the buffer flush watermark is set to 50%. Parameters ---------- watermark_pct : Watermark level as percentage of the mutation buffer size """ status = self.s.get().SetMutationBufferFlushWatermark(watermark_pct) check_status(status) def set_mutation_buffer_flush_interval(self, unsigned int millis): """ Set the interval for time-based flushing of the mutation buffer. In some cases, while running in AUTO_FLUSH_BACKGROUND mode, the size of the mutation buffer for pending operations and the flush watermark for fresh operations may be too high for the rate of incoming data: it would take too long to accumulate enough data in the buffer to trigger flushing. I.e., it makes sense to flush the accumulated operations if the prior flush happened long time ago. This method sets the wait interval for the time-based flushing which takes place along with the flushing triggered by the over-the-watermark criterion. By default, the interval is set to 1000 ms (i.e. 1 second). Parameters ---------- millis : The duration of the interval for the time-based flushing, in milliseconds. """ status = self.s.get().SetMutationBufferFlushInterval(millis) check_status(status) def set_mutation_buffer_max_num(self, unsigned int max_num): """ Set the maximum number of mutation buffers per Session object. A Session accumulates write operations submitted via the Apply() method in mutation buffers. A Session always has at least one mutation buffer. The mutation buffer which accumulates new incoming operations is called the current mutation buffer. The current mutation buffer is flushed using the Session.flush() method or it's done by the Session automatically if running in AUTO_FLUSH_BACKGROUND mode. After flushing the current mutation buffer, a new buffer is created upon calling Session.apply(), provided the limit is not exceeded. A call to Session.apply() blocks if it's at the maximum number of buffers allowed; the call unblocks as soon as one of the pending batchers finished flushing and a new batcher can be created. The minimum setting for this parameter is 1 (one). The default setting for this parameter is 2 (two). Parameters ---------- max_num : The maximum number of mutation buffers per Session object to hold the applied operations. Use 0 to set the maximum number of concurrent mutation buffers to unlimited. """ status = self.s.get().SetMutationBufferMaxNum(max_num) check_status(status) def apply(self, WriteOperation op): """ Apply the indicated write operation Examples -------- # Executes a single Insert operation session = client.new_session() op = table.new_insert() op['key'] = 0 op['value1'] = 5 op['value2'] = 3.5 session.apply(op) session.flush() """ return op.add_to_session(self) def flush(self): """ Flush pending operations """ check_status(self.s.get().Flush()) def get_pending_errors(self): """ Returns a list of buffered Kudu errors. A second value is returned indicating if there were more errors than could be stored in the session's error buffer (i.e. False means there was no error overflow) Returns ------- errors, overflowed : list, bool """ cdef: KuduError error vector[C_KuduError*] v_errors c_bool overflowed size_t i self.s.get().GetPendingErrors(&v_errors, &overflowed) result = [] for i in range(v_errors.size()): error = KuduError() error.error = v_errors[i] result.append(error) return result, overflowed def get_write_op_metrics(self): """ Return the cumulative write operation metrics since the beginning of the session. Returns ------- metrics : Dictionary """ _map = self.s.get().GetWriteOpMetrics().Get() # Convert map to python dictionary result = {} for it in _map: result[frombytes(it.first)] = it.second return result cdef class Row: """ A single row from a row batch """ cdef: RowBatch parent # This object is owned by the parent RowBatch KuduRowPtr row def __cinit__(self, batch): self.parent = batch def __dealloc__(self): pass cpdef tuple as_tuple(self): """ Return the row as a Python tuple """ cdef: int i, k tuple tup k = self.parent.batch.projection_schema().num_columns() tup = cpython.PyTuple_New(k) for i in range(k): val = None if not self.is_null(i): val = self.get_slot(i) cpython.Py_INCREF(val) cpython.PyTuple_SET_ITEM(tup, i, val) return tup cdef inline get_bool(self, int i): cdef c_bool val check_status(self.row.GetBool(i, &val)) # The built-in bool is masked by the libcpp typedef return bool(val) cdef inline get_int8(self, int i): cdef int8_t val check_status(self.row.GetInt8(i, &val)) return val cdef inline get_int16(self, int i): cdef int16_t val check_status(self.row.GetInt16(i, &val)) return val cdef inline get_int32(self, int i): cdef int32_t val check_status(self.row.GetInt32(i, &val)) return val cdef inline get_int64(self, int i): cdef int64_t val check_status(self.row.GetInt64(i, &val)) return val cdef inline get_double(self, int i): cdef double val check_status(self.row.GetDouble(i, &val)) return val cdef inline get_float(self, int i): cdef float val check_status(self.row.GetFloat(i, &val)) return val cdef inline get_string(self, int i): cdef Slice val check_status(self.row.GetString(i, &val)) return cpython.PyBytes_FromStringAndSize(<char*> val.mutable_data(), val.size()) cdef inline get_binary(self, int i): cdef Slice val check_status(self.row.GetBinary(i, &val)) return cpython.PyBytes_FromStringAndSize(<char*> val.mutable_data(), val.size()) cdef inline get_unixtime_micros(self, int i): cdef int64_t val check_status(self.row.GetUnixTimeMicros(i, &val)) return val cdef inline __get_unscaled_decimal(self, int i): IF PYKUDU_INT128_SUPPORTED == 1: cdef int128_t val check_status(self.row.GetUnscaledDecimal(i, &val)) return val ELSE: raise KuduException("The decimal type is not supported when GCC version is < 4.6.0" % self) cdef inline get_decimal(self, int i): scale = self.parent.batch.projection_schema().Column(i).type_attributes().scale() return from_unscaled_decimal(self.__get_unscaled_decimal(i), scale) cdef inline get_varchar(self, int i): cdef Slice val check_status(self.row.GetVarchar(i, &val)) return cpython.PyBytes_FromStringAndSize(<char*> val.mutable_data(), val.size()) cdef inline get_date(self, int i): cdef int32_t val check_status(self.row.GetDate(i, &val)) return unix_epoch_days_to_date(val) cdef inline get_slot(self, int i): cdef: Status s DataType t = self.parent.batch.projection_schema().Column(i).type() if t == KUDU_BOOL: return self.get_bool(i) elif t == KUDU_INT8: return self.get_int8(i) elif t == KUDU_INT16: return self.get_int16(i) elif t == KUDU_INT32: return self.get_int32(i) elif t == KUDU_INT64: return self.get_int64(i) elif t == KUDU_DOUBLE: return self.get_double(i) elif t == KUDU_FLOAT: return self.get_float(i) elif t == KUDU_STRING: return frombytes(self.get_string(i)) elif t == KUDU_BINARY: return self.get_binary(i) elif t == KUDU_UNIXTIME_MICROS: return from_unixtime_micros(self.get_unixtime_micros(i)) elif t == KUDU_DECIMAL: return self.get_decimal(i) elif t == KUDU_VARCHAR: return frombytes(self.get_varchar(i)) elif t == KUDU_DATE: return self.get_date(i) else: raise TypeError("Cannot get kudu type <{0}>" .format(_type_names[t])) cdef inline bint is_null(self, int i): return self.row.IsNull(i) cdef class RowBatch: """ Class holding a batch of rows from a Scanner """ # This class owns the KuduScanBatch data cdef: KuduScanBatch batch def __len__(self): return self.batch.NumRows() def __getitem__(self, i): return self.get_row(i).as_tuple() def __iter__(self): cdef int i = 0 for i in range(len(self)): yield self.get_row(i).as_tuple() def as_tuples(self): """ Return RowBatch as a list of Python tuples To simplify testing for the moment. """ cdef list tuples = [] for i in range(self.batch.NumRows()): tuples.append(self.get_row(i).as_tuple()) return tuples cdef Row get_row(self, i): # TODO: boundscheck # For safety, we need to increment the parent reference count and hold # on to a reference internally so that if the RowBatch goes out of # scope we won't end up with orphaned Row objects. This isn't the best, # but an intermediate solution until we can do something better.. cdef Row row = Row(self) row.row = self.batch.Row(i) return row cdef class Scanner: """ A class for defining a selection of data we wish to scan out of a Kudu table. Create a scanner using Table.scanner. """ cdef: Table table KuduScanner* scanner bint is_open def __cinit__(self, Table table = None): self.table = table self.scanner = NULL self.is_open = 0 def __dealloc__(self): # We own this one if self.scanner != NULL: del self.scanner cdef inline ensure_open(self): if not self.is_open: self.open() def add_predicates(self, preds): """ Add a list of scan predicates to the scanner. Select columns from the parent table and make comparisons to create predicates. Returns a reference to itself to facilitate chaining. Examples -------- c = table[col_name] preds = [c >= 0, c <= 10] scanner.add_predicates(preds) Parameters ---------- preds : list of Predicate Returns ------- self : scanner """ for pred in preds: self.add_predicate(pred) return self cpdef add_predicate(self, Predicate pred): """ Add a scan predicates to the scanner. Select columns from the parent table and make comparisons to create predicates. Returns a reference to itself to facilitate chaining. Examples -------- pred = table[col_name] <= 10 scanner.add_predicate(pred) Parameters ---------- pred : kudu.Predicate Returns ------- self : scanner """ cdef KuduPredicate* clone # We clone the KuduPredicate so that the Predicate wrapper class can be # reused clone = pred.pred.Clone() check_status(self.scanner.AddConjunctPredicate(clone)) return self def set_projected_column_names(self, names): """ Sets the columns to be scanned. Parameters ---------- names : list of string Returns ------- self : Scanner """ if isinstance(names, str): names = [names] cdef vector[string] v_names for name in names: v_names.push_back(tobytes(name)) check_status(self.scanner.SetProjectedColumnNames(v_names)) return self def set_selection(self, replica_selection): """ Set the replica selection policy while scanning. Parameters ---------- replica_selection : {'leader', 'closest', 'first'} You can also use the constants LEADER_ONLY, CLOSEST_REPLICA, and FIRST_REPLICA Returns ------- self : Scanner """ cdef ReplicaSelection selection def invalid_selection_policy(): raise ValueError('Invalid replica selection policy: {0}' .format(replica_selection)) if isinstance(replica_selection, int): if 0 <= replica_selection < len(_replica_selection_policies): check_status(self.scanner.SetSelection( <ReplicaSelection> replica_selection)) else: invalid_selection_policy() else: try: check_status(self.scanner.SetSelection( _replica_selection_policies[replica_selection.lower()])) except KeyError: invalid_selection_policy() return self def set_projected_column_indexes(self, indexes): """ Sets the columns to be scanned. Parameters ---------- indexes : list of integers representing column indexes Returns ------- self : Scanner """ cdef vector[int] v_indexes = indexes check_status(self.scanner.SetProjectedColumnIndexes(v_indexes)) return self def set_read_mode(self, read_mode): """ Set the read mode for scanning. Parameters ---------- read_mode : {'latest', 'snapshot', 'read_your_writes'} You can also use the constants READ_LATEST, READ_AT_SNAPSHOT, READ_YOUR_WRITES Returns ------- self : Scanner """ cdef ReadMode rmode def invalid_selection_policy(): raise ValueError('Invalid read mode: {0}' .format(read_mode)) if isinstance(read_mode, int): if 0 <= read_mode < len(_read_modes): check_status(self.scanner.SetReadMode( <ReadMode> read_mode)) else: invalid_selection_policy() else: try: check_status(self.scanner.SetReadMode( _read_modes[read_mode.lower()])) except KeyError: invalid_selection_policy() return self def set_snapshot(self, timestamp, format=None): """ Set the snapshot timestamp for this scanner. Parameters --------- timestamp : datetime.datetime or string If a string is provided, a format must be provided as well. NOTE: This should be in UTC. If a timezone aware datetime object is provided, it will be converted to UTC, otherwise, all other input is assumed to be UTC. format : Required if a string timestamp is provided Uses the C strftime() function, see strftime(3) documentation. Returns ------- self : Scanner """ # Confirm that a format is provided if timestamp is a string if isinstance(timestamp, six.string_types) and not format: raise ValueError( "To use a string timestamp you must provide a format. " + "See the strftime(3) documentation.") snapshot_micros = to_unixtime_micros(timestamp, format) if snapshot_micros >= 0: check_status(self.scanner.SetSnapshotMicros( <uint64_t> snapshot_micros)) else: raise ValueError( "Snapshot Timestamps be greater than the unix epoch.") return self def set_limit(self, limit): """ Set a limit on the number of rows returned by this scanner. Must be a positive value. Parameters ---------- limit : the maximum number of rows to return Returns ------- self : Scanner """ if limit <= 0: raise ValueError("Limit must be positive.") check_status(self.scanner.SetLimit(<int64_t> limit)) def set_fault_tolerant(self): """ Makes the underlying KuduScanner fault tolerant. Returns a reference to itself to facilitate chaining. Returns ------- self : Scanner """ check_status(self.scanner.SetFaultTolerant()) return self def new_bound(self): """ Returns a new instance of a PartialRow to be later set with add_lower_bound()/add_exclusive_upper_bound(). Returns ------- bound : PartialRow """ return self.table.schema.new_row() def add_lower_bound(self, bound): """ Sets the (inclusive) lower bound of the scan. Returns a reference to itself to facilitate chaining. Parameters ---------- bound : PartialRow/tuple/list/dictionary Returns ------- self : Scanner """ cdef: PartialRow row # Convert record to bound if not isinstance(bound, PartialRow): row = self.table.schema.new_row(bound) else: row = bound check_status(self.scanner.AddLowerBound(deref(row.row))) return self def add_exclusive_upper_bound(self, bound): """ Sets the (exclusive) upper bound of the scan. Returns a reference to itself to facilitate chaining. Parameters ---------- bound : PartialRow/tuple/list/dictionary Returns ------- self : Scanner """ cdef: PartialRow row # Convert record to bound if not isinstance(bound, PartialRow): row = self.table.schema.new_row(bound) else: row = bound check_status(self.scanner.AddExclusiveUpperBound(deref(row.row))) return self def get_projection_schema(self): """ Returns the schema of the projection being scanned Returns ------- schema : kudu.Schema """ result = Schema() # Had to instantiate a new schema to return a pointer since the # GetProjectionSchema method does not cdef KuduSchema* schema = new KuduSchema(self.scanner. GetProjectionSchema()) result.schema = schema return result def get_resource_metrics(self): """ Return the cumulative resource metrics since the scan was started. Returns ------- metrics : Dictionary """ _map = self.scanner.GetResourceMetrics().Get() # Convert map to python dictionary result = {} for it in _map: result[frombytes(it.first)] = it.second return result def open(self): """ Returns a reference to itself to facilitate chaining Returns ------- self : Scanner """ if not self.is_open: check_status(self.scanner.Open()) self.is_open = 1 return self def has_more_rows(self): """ Returns True if there are more rows to be read. """ return self.scanner.HasMoreRows() def read_all_tuples(self): """ Compute a RowBatch containing all rows from the scan operation (which hopefully fit into memory, probably not handled gracefully at the moment). """ cdef list tuples = [] cdef RowBatch batch self.ensure_open() while self.has_more_rows(): batch = self.next_batch() tuples.extend(batch.as_tuples()) return tuples def xbatches(self): """ This method acts as a generator to enable more effective memory management by yielding batches of tuples. """ self.ensure_open() while self.has_more_rows(): yield self.next_batch().as_tuples() def read_next_batch_tuples(self): return self.next_batch().as_tuples() cpdef RowBatch next_batch(self): """ Retrieve the next batch of rows from the scanner. Returns ------- batch : RowBatch """ if not self.has_more_rows(): raise StopIteration cdef RowBatch batch = RowBatch() check_status(self.scanner.NextBatch(&batch.batch)) return batch def set_cache_blocks(self, cache_blocks): """ Sets the block caching policy. Returns a reference to itself to facilitate chaining. Parameters ---------- cache_blocks : bool Returns ------- self : Scanner """ check_status(self.scanner.SetCacheBlocks(cache_blocks)) return self def keep_alive(self): """ Keep the current remote scanner alive. Keep the current remote scanner alive on the Tablet server for an additional time-to-live (set by a configuration flag on the tablet server). This is useful if the interval in between NextBatch() calls is big enough that the remote scanner might be garbage collected (default ttl is set to 60 secs.). This does not invalidate any previously fetched results. Returns ------- self : Scanner """ check_status(self.scanner.KeepAlive()) return self def get_current_server(self): """ Get the TabletServer that is currently handling the scan. More concretely, this is the server that handled the most recent open() or next_batch() RPC made by the server. Returns ------- tserver : TabletServer """ cdef: TabletServer tserver = TabletServer() KuduTabletServer* tserver_p = NULL check_status(self.scanner.GetCurrentServer(&tserver_p)) tserver._own = 1 tserver._init(tserver_p) return tserver def close(self): """ Close the scanner. Closing the scanner releases resources on the server. This call does not block, and will not ever fail, even if the server cannot be contacted. Note: The scanner is reset to its initial state by this function. You'll have to re-add any projection, predicates, etc if you want to reuse this object. Note: When the Scanner object is garbage collected, this method is run. This method call is only needed if you want to explicitly release the resources on the server. """ self.scanner.Close() def to_pandas(self, index=None, coerce_float=False): """ Returns the contents of this Scanner to a Pandas DataFrame. This is only available if Pandas is installed. Note: This should only be used if the results from the scanner are expected to be small, as Pandas will load the entire contents into memory. Parameters ---------- index : string, list of fields Field or list of fields to use as the index coerce_float : boolean Attempt to convert decimal values to floating point (double precision). Returns ------- dataframe : DataFrame """ import pandas as pd self.ensure_open() # Here we are using list comprehension with the batch generator to avoid # doubling our memory footprint. dfs = [ pd.DataFrame.from_records(batch, index=index, coerce_float=coerce_float, columns=self.get_projection_schema().names) for batch in self.xbatches() if len(batch) != 0 ] df = pd.concat(dfs, ignore_index=not(bool(index))) types = {} for column in self.get_projection_schema(): pandas_type = _correct_pandas_data_type(column.type.name) if pandas_type is not None and \ not(column.nullable and df[column.name].isnull().any()): types[column.name] = pandas_type for col, dtype in types.items(): df[col] = df[col].astype(dtype, copy=False) return df cdef class ScanToken: """ A ScanToken describes a partial scan of a Kudu table limited to a single contiguous physical location. Using the KuduScanTokenBuilder, clients can describe the desired scan, including predicates, bounds, timestamps, and caching, and receive back a collection of scan tokens. """ cdef: KuduScanToken* _token def __cinit__(self): self._token = NULL def __dealloc__(self): if self._token != NULL: del self._token cdef _init(self, KuduScanToken* token): self._token = token return self def into_kudu_scanner(self): """ Returns a scanner under the current client. Returns ------- scanner : Scanner """ cdef: Scanner result = Scanner() KuduScanner* _scanner = NULL check_status(self._token.IntoKuduScanner(&_scanner)) result.scanner = _scanner return result def tablet(self): """ Returns the Tablet associated with this ScanToken Returns ------- tablet : Tablet """ tablet = Tablet() return tablet._init(&self._token.tablet()) def serialize(self): """ Serialize token into a string. Returns ------- serialized_token : string """ cdef string buf check_status(self._token.Serialize(&buf)) return buf def deserialize_into_scanner(self, Client client, serialized_token): """ Returns a new scanner from the serialized token created under the provided Client. Parameters ---------- client : Client serialized_token : string Returns ------- scanner : Scanner """ cdef: Scanner result = Scanner() KuduScanner* _scanner check_status(self._token.DeserializeIntoScanner(client.cp, serialized_token, &_scanner)) result.scanner = _scanner return result cdef class ScanTokenBuilder: """ This class builds ScanTokens for a Table. """ cdef: KuduScanTokenBuilder* _builder Table _table def __cinit__(self, Table table): self._table = table self._builder = new KuduScanTokenBuilder(table.ptr()) def __dealloc__(self): if self._builder != NULL: del self._builder def set_projected_column_names(self, names): """ Sets the columns to be scanned. Returns a reference to itself to facilitate chaining. Parameters ---------- names : list of strings Returns ------- self : ScanTokenBuilder """ if isinstance(names, str): names = [names] cdef vector[string] v_names for name in names: v_names.push_back(tobytes(name)) check_status(self._builder.SetProjectedColumnNames(v_names)) return self def set_projected_column_indexes(self, indexes): """ Sets the columns to be scanned. Returns a reference to itself to facilitate chaining. Parameters ---------- indexes : list of integers representing column indexes Returns ------- self : ScanTokenBuilder """ cdef vector[int] v_indexes = indexes check_status(self._builder.SetProjectedColumnIndexes(v_indexes)) return self def set_batch_size_bytes(self, batch_size): """ Sets the batch size in bytes. Returns a reference to itself to facilitate chaining. Parameters ---------- batch_size : Size of batch in bytes Returns ------- self : ScanTokenBuilder """ check_status(self._builder.SetBatchSizeBytes(batch_size)) return self def set_read_mode(self, read_mode): """ Set the read mode for scanning. Parameters ---------- read_mode : {'latest', 'snapshot'} You can also use the constants READ_LATEST, READ_AT_SNAPSHOT Returns ------- self : ScanTokenBuilder """ cdef ReadMode rmode def invalid_selection_policy(): raise ValueError('Invalid read mode: {0}' .format(read_mode)) if isinstance(read_mode, int): if 0 <= read_mode < len(_read_modes): check_status(self._builder.SetReadMode( <ReadMode> read_mode)) else: invalid_selection_policy() else: try: check_status(self._builder.SetReadMode( _read_modes[read_mode.lower()])) except KeyError: invalid_selection_policy() return self def set_snapshot(self, timestamp, format=None): """ Set the snapshot timestamp for this ScanTokenBuilder. Parameters --------- timestamp : datetime.datetime or string If a string is provided, a format must be provided as well. NOTE: This should be in UTC. If a timezone aware datetime object is provided, it will be converted to UTC, otherwise, all other input is assumed to be UTC. format : Required if a string timestamp is provided Uses the C strftime() function, see strftime(3) documentation. Returns ------- self : ScanTokenBuilder """ # Confirm that a format is provided if timestamp is a string if isinstance(timestamp, six.string_types) and not format: raise ValueError( "To use a string timestamp you must provide a format. " + "See the strftime(3) documentation.") snapshot_micros = to_unixtime_micros(timestamp, format) if snapshot_micros >= 0: check_status(self._builder.SetSnapshotMicros( <uint64_t> snapshot_micros)) else: raise ValueError( "Snapshot Timestamps be greater than the unix epoch.") return self def set_timeout_millis(self, millis): """ Sets the scan request timeout in milliseconds. Returns a reference to itself to facilitate chaining. Parameters ---------- millis : int64_t timeout in milliseconds Returns ------- self : ScanTokenBuilder """ check_status(self._builder.SetTimeoutMillis(millis)) return self def set_timout_millis(self, millis): """ See set_timeout_millis(). This method is deprecated due to having a typo in the method name and will be removed in a future release. """ return self.set_timeout_millis(millis) def set_fault_tolerant(self): """ Makes the underlying KuduScanner fault tolerant. Returns a reference to itself to facilitate chaining. Returns ------- self : ScanTokenBuilder """ check_status(self._builder.SetFaultTolerant()) return self def set_selection(self, replica_selection): """ Set the replica selection policy while scanning. Parameters ---------- replica_selection : {'leader', 'closest', 'first'} You can also use the constants LEADER_ONLY, CLOSEST_REPLICA, and FIRST_REPLICA Returns ------- self : ScanTokenBuilder """ cdef ReplicaSelection selection def invalid_selection_policy(): raise ValueError('Invalid replica selection policy: {0}' .format(replica_selection)) if isinstance(replica_selection, int): if 0 <= replica_selection < len(_replica_selection_policies): check_status(self._builder.SetSelection( <ReplicaSelection> replica_selection)) else: invalid_selection_policy() else: try: check_status(self._builder.SetSelection( _replica_selection_policies[replica_selection.lower()])) except KeyError: invalid_selection_policy() return self def add_predicates(self, preds): """ Add a list of scan predicates to the ScanTokenBuilder. Select columns from the parent table and make comparisons to create predicates. Examples -------- c = table[col_name] preds = [c >= 0, c <= 10] builder.add_predicates(preds) Parameters ---------- preds : list of Predicate """ for pred in preds: self.add_predicate(pred) cpdef add_predicate(self, Predicate pred): """ Add a scan predicates to the scan token. Select columns from the parent table and make comparisons to create predicates. Examples -------- pred = table[col_name] <= 10 builder.add_predicate(pred) Parameters ---------- pred : kudu.Predicate Returns ------- self : ScanTokenBuilder """ cdef KuduPredicate* clone # We clone the KuduPredicate so that the Predicate wrapper class can be # reused clone = pred.pred.Clone() check_status(self._builder.AddConjunctPredicate(clone)) def new_bound(self): """ Returns a new instance of a PartialRow to be later set with add_lower_bound()/add_upper_bound(). Returns ------- bound : PartialRow """ return self._table.schema.new_row() def add_lower_bound(self, bound): """ Sets the lower bound of the scan. Returns a reference to itself to facilitate chaining. Parameters ---------- bound : PartialRow/list/tuple/dict Returns ------- self : ScanTokenBuilder """ cdef: PartialRow row # Convert record to bound if not isinstance(bound, PartialRow): row = self._table.schema.new_row(bound) else: row = bound check_status(self._builder.AddLowerBound(deref(row.row))) return self def add_upper_bound(self, bound): """ Sets the upper bound of the scan. Returns a reference to itself to facilitate chaining. Parameters ---------- bound : PartialRow/list/tuple/dict Returns ------- self : ScanTokenBuilder """ cdef: PartialRow row # Convert record to bound if not isinstance(bound, PartialRow): row = self._table.schema.new_row(bound) else: row = bound check_status(self._builder.AddUpperBound(deref(row.row))) return self def set_cache_blocks(self, cache_blocks): """ Sets the block caching policy. Returns a reference to itself to facilitate chaining. Parameters ---------- cache_blocks : bool Returns ------- self : ScanTokenBuilder """ check_status(self._builder.SetCacheBlocks(cache_blocks)) return self def build(self): """ Build the set of scan tokens. The builder may be reused after this call. Returns a list of ScanTokens to be serialized and executed in parallel with seperate client instances. Returns ------- tokens : List[ScanToken] """ cdef: vector[KuduScanToken*] tokens size_t i check_status(self._builder.Build(&tokens)) result = [] for i in range(tokens.size()): token = ScanToken() result.append(token._init(tokens[i])) return result cdef class Tablet: """ Represents a remote Tablet. Contains the tablet id and Replicas associated with the Kudu Tablet. Retrieved by the ScanToken.tablet() method. """ cdef: const KuduTablet* _tablet vector[KuduReplica*] _replicas cdef _init(self, const KuduTablet* tablet): self._tablet = tablet return self def id(self): return frombytes(self._tablet.id()) def replicas(self): cdef size_t i result = [] _replicas = self._tablet.replicas() for i in range(_replicas.size()): replica = Replica() result.append(replica._init(_replicas[i])) return result cdef class Replica: """ Represents a remote Tablet's replica. Retrieve a list of Replicas with the Tablet.replicas() method. Contains the boolean is_leader and its respective TabletServer object. """ cdef const KuduReplica* _replica cdef _init(self, const KuduReplica* replica): self._replica = replica return self def is_leader(self): return self._replica.is_leader() def ts(self): ts = TabletServer() return ts._init(&self._replica.ts()) cdef class KuduError: """ Wrapper for a C++ KuduError indicating a client error resulting from applying operations in a session. """ cdef: C_KuduError* error def __cinit__(self): self.error = NULL def __dealloc__(self): # We own this object if self.error != NULL: del self.error def failed_op(self): """ Get debug string representation of the failed operation. Returns ------- op : str """ return frombytes(self.error.failed_op().ToString()) def was_possibly_successful(self): """ Check if there is a chance that the requested operation was successful. In some cases, it is possible that the server did receive and successfully perform the requested operation, but the client can't tell whether or not it was successful. For example, if the call times out, the server may still succeed in processing at a later time. Returns ------- result : bool """ return self.error.was_possibly_successful() def __repr__(self): return "KuduError('%s')" % (self.error.status().ToString()) cdef class PartialRow: def __cinit__(self, Schema schema): # This gets called before any subclass cinit methods self.schema = schema self._own = 1 def __dealloc__(self): if self._own and self.row != NULL: del self.row def __setitem__(self, key, value): if isinstance(key, basestring): self.set_field(key, value) else: if 0 <= key < len(self.schema): self.set_loc(key, value) else: raise IndexError("Column index {0} is out of bounds." .format(key)) def from_record(self, record): """ Initializes PartialRow with values from an input record. The record can be in the form of a tuple, dict, or list. Dictionary keys can be either column names or indexes. Parameters ---------- record : tuple/list/dict Returns ------- self : PartialRow """ if isinstance(record, (tuple, list)): for indx, val in enumerate(record): self[indx] = val elif isinstance(record, dict): for key, val in dict_iter(record): self[key] = val else: raise TypeError("Invalid record type <{0}> for " + "PartialRow.from_record." .format(type(record).__name__)) return self cpdef set_field(self, key, value): cdef: int i = self.schema.get_loc(key) self.set_loc(i, value) cpdef set_loc(self, int i, value): cdef: DataType t = self.schema.loc_type(i) Slice slc if value is None: check_status(self.row.SetNull(i)) return # Leave it to Cython to do the coercion and complain if it doesn't # work. Cython will catch many casting problems but we should verify # with unit tests. if t == KUDU_BOOL: check_status(self.row.SetBool(i, <c_bool> value)) elif t == KUDU_INT8: check_status(self.row.SetInt8(i, <int8_t> value)) elif t == KUDU_INT16: check_status(self.row.SetInt16(i, <int16_t> value)) elif t == KUDU_INT32: check_status(self.row.SetInt32(i, <int32_t> value)) elif t == KUDU_INT64: check_status(self.row.SetInt64(i, <int64_t> value)) elif t == KUDU_FLOAT: check_status(self.row.SetFloat(i, <float> value)) elif t == KUDU_DOUBLE: check_status(self.row.SetDouble(i, <double> value)) elif t == KUDU_STRING: if isinstance(value, unicode): value = value.encode('utf8') slc = Slice(<char*> value, len(value)) check_status(self.row.SetStringCopy(i, slc)) elif t == KUDU_BINARY: if isinstance(value, unicode): raise TypeError("Unicode objects must be explicitly encoded " + "before storing in a Binary field.") slc = Slice(<char*> value, len(value)) check_status(self.row.SetBinaryCopy(i, slc)) elif t == KUDU_VARCHAR: if isinstance(value, unicode): value = value.encode('utf8') slc = Slice(<char*> value, len(value)) check_status(self.row.SetVarchar(i, slc)) elif t == KUDU_UNIXTIME_MICROS: check_status(self.row.SetUnixTimeMicros(i, <int64_t> to_unixtime_micros(value))) elif t == KUDU_DATE: val = date_to_unix_epoch_days(value) check_status(self.row.SetDate(i, <int32_t>val)) elif t == KUDU_DECIMAL: IF PYKUDU_INT128_SUPPORTED == 1: check_status(self.row.SetUnscaledDecimal(i, <int128_t>to_unscaled_decimal(value))) ELSE: raise KuduException("The decimal type is not supported when GCC version is < 4.6.0" % self) else: raise TypeError("Cannot set kudu type <{0}>.".format(_type_names[t])) cpdef set_field_null(self, key): pass cpdef set_loc_null(self, int i): pass cdef add_to_session(self, Session s): pass cdef class WriteOperation: cdef: # Whether the WriteOperation has been applied. # Set by subclasses. bint applied KuduWriteOperation* op PartialRow py_row def __cinit__(self, Table table, record=None): self.applied = 0 self.py_row = PartialRow(table.schema) self.py_row._own = 0 cdef add_to_session(self, Session s): if self.applied: raise Exception check_status(s.s.get().Apply(self.op)) self.op = NULL self.applied = 1 def __setitem__(self, key, value): # Since the write operation is no longer a sub-class of the PartialRow # we need to explicitly retain the item setting functionality and API # style. self.py_row[key] = value cdef class Insert(WriteOperation): def __cinit__(self, Table table, record=None): self.op = table.ptr().NewInsert() self.py_row.row = self.op.mutable_row() if record: self.py_row.from_record(record) def __dealloc__(self): del self.op cdef class InsertIgnore(WriteOperation): def __cinit__(self, Table table, record=None): self.op = table.ptr().NewInsertIgnore() self.py_row.row = self.op.mutable_row() if record: self.py_row.from_record(record) def __dealloc__(self): del self.op cdef class Upsert(WriteOperation): def __cinit__(self, Table table, record=None): self.op = table.ptr().NewUpsert() self.py_row.row = self.op.mutable_row() if record: self.py_row.from_record(record) def __dealloc__(self): del self.op cdef class UpsertIgnore(WriteOperation): def __cinit__(self, Table table, record=None): self.op = table.ptr().NewUpsertIgnore() self.py_row.row = self.op.mutable_row() if record: self.py_row.from_record(record) def __dealloc__(self): del self.op cdef class Update(WriteOperation): def __cinit__(self, Table table, record=None): self.op = table.ptr().NewUpdate() self.py_row.row = self.op.mutable_row() if record: self.py_row.from_record(record) def __dealloc__(self): del self.op cdef class UpdateIgnore(WriteOperation): def __cinit__(self, Table table, record=None): self.op = table.ptr().NewUpdateIgnore() self.py_row.row = self.op.mutable_row() if record: self.py_row.from_record(record) def __dealloc__(self): del self.op cdef class Delete(WriteOperation): def __cinit__(self, Table table, record=None): self.op = table.ptr().NewDelete() self.py_row.row = self.op.mutable_row() if record: self.py_row.from_record(record) def __dealloc__(self): del self.op cdef class DeleteIgnore(WriteOperation): def __cinit__(self, Table table, record=None): self.op = table.ptr().NewDeleteIgnore() self.py_row.row = self.op.mutable_row() if record: self.py_row.from_record(record) def __dealloc__(self): del self.op cdef inline cast_pyvalue(DataType t, object o): if t == KUDU_BOOL: return BoolVal(o) elif t == KUDU_INT8: return Int8Val(o) elif t == KUDU_INT16: return Int16Val(o) elif t == KUDU_INT32: return Int32Val(o) elif t == KUDU_INT64: return Int64Val(o) elif t == KUDU_DOUBLE: return DoubleVal(o) elif t == KUDU_FLOAT: return FloatVal(o) elif t == KUDU_STRING: return StringVal(o) elif t == KUDU_UNIXTIME_MICROS: return UnixtimeMicrosVal(o) elif t == KUDU_BINARY: return StringVal(o) elif t == KUDU_VARCHAR: return StringVal(o) elif t == KUDU_DATE: return DateVal(o) else: raise TypeError("Cannot cast kudu type <{0}>".format(_type_names[t])) cdef class TableAlterer: """ Alters an existing table based on the provided steps. """ def __cinit__(self, Table table): self._table = table self._new_name = None self._init(self._table.parent.cp .NewTableAlterer(tobytes(self._table.name))) def __dealloc__(self): if self._alterer != NULL: del self._alterer cdef _init(self, KuduTableAlterer* alterer): self._alterer = alterer def rename(self, table_name): """ Rename the table. Returns a reference to itself to facilitate chaining. Parameters ---------- table_name : str The new name for the table. Return ------ self : TableAlterer """ self._alterer.RenameTo(tobytes(table_name)) self._new_name = table_name return self def add_column(self, name, type_=None, nullable=None, compression=None, encoding=None, default=None): """ Add a new column to the table. When adding a column, you must specify the default value of the new column using ColumnSpec.default(...) or the default parameter in this method. Parameters ---------- name : string type_ : string or KuduType Data type e.g. 'int32' or kudu.int32 nullable : boolean, default None New columns are nullable by default. Set boolean value for explicit nullable / not-nullable compression : string or int One of kudu.COMPRESSION_* constants or their string equivalent. encoding : string or int One of kudu.ENCODING_* constants or their string equivalent. default : obj Use this to set the column default value Returns ------- spec : ColumnSpec """ cdef: ColumnSpec result = ColumnSpec() result.spec = self._alterer.AddColumn(tobytes(name)) if type_ is not None: result.type(type_) if nullable is not None: result.nullable(nullable) if compression is not None: result.compression(compression) if encoding is not None: result.encoding(encoding) if default: result.default(default) return result def alter_column(self, name, rename_to=None): """ Alter an existing column. Parameters ---------- name : string rename_to : str If set, the column will be renamed to this Returns ------- spec : ColumnSpec """ cdef: ColumnSpec result = ColumnSpec() result.spec = self._alterer.AlterColumn(tobytes(name)) if rename_to: result.rename(rename_to) return result def drop_column(self, name): """ Drops an existing column from the table. Parameters ---------- name : str The name of the column to drop. Returns ------- self : TableAlterer """ self._alterer.DropColumn(tobytes(name)) return self def add_range_partition(self, lower_bound=None, upper_bound=None, lower_bound_type='inclusive', upper_bound_type='exclusive'): """ Add a range partition to the table with the specified lower bound and upper bound. Multiple range partitions may be added as part of a single alter table transaction by calling this method multiple times on the table alterer. This client may immediately write and scan the new tablets when Alter() returns success, however other existing clients may have to wait for a timeout period to elapse before the tablets become visible. This period is configured by the master's 'table_locations_ttl_ms' flag, and defaults to 5 minutes. Parameters ---------- lower_bound : PartialRow/list/tuple/dict upper_bound : PartialRow/list/tuple/dict lower_bound_type : {'inclusive', 'exclusive'} or constants kudu.EXCLUSIVE_BOUND and kudu.INCLUSIVE_BOUND upper_bound_type : {'inclusive', 'exclusive'} or constants kudu.EXCLUSIVE_BOUND and kudu.INCLUSIVE_BOUND Returns ------- self : TableAlterer """ cdef: PartialRow lbound PartialRow ubound if not isinstance(lower_bound, PartialRow): lbound = self._table.schema.new_row(lower_bound) else: lbound = lower_bound lbound._own = 0 if not isinstance(upper_bound, PartialRow): ubound = self._table.schema.new_row(upper_bound) else: ubound = upper_bound ubound._own = 0 self._alterer.AddRangePartition( lbound.row, ubound.row, _check_convert_range_bound_type(lower_bound_type), _check_convert_range_bound_type(upper_bound_type) ) def add_custom_range_partition(self, range_partition): """ Add a range partition with custom hash schema. Multiple range partitions may be added as part of a single alter table transaction by calling this method multiple times on the table alterer. This client may immediately write and scan the new tablets when Alter() returns success, however other existing clients may have to wait for a timeout period to elapse before the tablets become visible. This period is configured by the master's 'table_locations_ttl_ms' flag, and defaults to 5 minutes. Parameters ---------- range_partition : RangePartition Returns ------- self : TableAlterer """ cdef: vector[string] v KuduRangePartition* p PartialRow lower_bound PartialRow upper_bound if not isinstance(range_partition.lower_bound, PartialRow): lower_bound = self._table.schema.new_row(range_partition.lower_bound) else: lower_bound = range_partition.lower_bound lower_bound._own = 0 if not isinstance(range_partition.upper_bound, PartialRow): upper_bound = self._table.schema.new_row(range_partition.upper_bound) else: upper_bound = range_partition.upper_bound upper_bound._own = 0 p = new KuduRangePartition( lower_bound.row, upper_bound.row, range_partition.lower_bound_type, range_partition.upper_bound_type) for col_names, num_buckets, seed in range_partition.hash_dimensions: v.clear() for n in col_names: v.push_back(tobytes(n)) p.add_hash_partitions(v, num_buckets, seed if seed else 0) self._alterer.AddRangePartition(p) def drop_range_partition(self, lower_bound=None, upper_bound=None, lower_bound_type='inclusive', upper_bound_type='exclusive'): """ Drop the range partition from the table with the specified lower bound and upper bound. The bounds must match an existing range partition exactly, and may not span multiple range partitions. Multiple range partitions may be dropped as part of a single alter table transaction by calling this method multiple times on the table alterer. Parameters ---------- lower_bound : PartialRow/list/tuple/dict upper_bound : PartialRow/list/tuple/dict lower_bound_type : {'inclusive', 'exclusive'} or constants kudu.EXCLUSIVE_BOUND and kudu.INCLUSIVE_BOUND upper_bound_type : {'inclusive', 'exclusive'} or constants kudu.EXCLUSIVE_BOUND and kudu.INCLUSIVE_BOUND Returns ------- self : TableAlterer """ cdef: PartialRow lbound PartialRow ubound if not isinstance(lower_bound, PartialRow): lbound = self._table.schema.new_row(lower_bound) else: lbound = lower_bound lbound._own = 0 if not isinstance(upper_bound, PartialRow): ubound = self._table.schema.new_row(upper_bound) else: ubound = upper_bound ubound._own = 0 self._alterer.DropRangePartition( lbound.row, ubound.row, _check_convert_range_bound_type(lower_bound_type), _check_convert_range_bound_type(upper_bound_type) ) def set_owner(self, new_owner): """ Set the owner of the table. Parameters ---------- new_owner : string Returns ------- self : TableAlterer """ self._alterer.SetOwner(tobytes(new_owner)) return self def set_comment(self, new_comment): """ Set the comment on the table. Parameters ---------- new_comment : string Returns ------- self : TableAlterer """ self._alterer.SetComment(tobytes(new_comment)) return self def alter(self): """ Alter table. Returns a new table object upon completion of the alter. Returns ------- table :Table """ check_status(self._alterer.Alter()) return self._table.parent.table(self._new_name or self._table.name) ```
The following are the national records in track cycling in Estonia maintained by Estonia's national cycling federation: Estonian Cycling Federation. Men Women References External links Estonian Cycling Federation web site Estonian records Records Track cycling Track cycling records Estonia
Bruno Nicolai (20 May 1926 – 16 August 1991) was an Italian film music composer, orchestra director, conductor, pianist and musical editor, most active in the 1960s through the 1980s. While studying piano and composition at the Santa Cecilia Conservatory in Rome, he befriended Ennio Morricone and formed a long working relationship, with Nicolai eventually conducting for and co-scoring films with Morricone. Morricone noted in an interview discussing the Dollars Trilogy, "I chose a great musician and friend to be my conductor: Bruno Nicolai, who conducted almost every score of mine from that point on until 1974." Nicolai also scored a number of giallo exploitation films and wrote many scores for director Jesús Franco. His work was featured in the Quentin Tarantino films Kill Bill: Volume 2 and Once Upon a Time in Hollywood. Selected filmography References External links Bruno Nicolai tribute site 1926 births 1991 deaths Italian film score composers Italian male film score composers Spaghetti Western composers Accademia Nazionale di Santa Cecilia alumni Musicians from Rome 20th-century Italian composers 20th-century Italian male musicians
This is a list of vehicles produced by Bugatti (under Ettore Bugatti), Bugatti Automobili S.p.A. and Bugatti Automobiles. Automobiles Ettore Bugatti (1909-1963) Production cars 1910 Type 13 1912–1914 Type 18 1913–1914 Type 23/Brescia Tourer (roadster) 1922–1934 Type 30/38/40/43/44/49 (touring car) 1927–1933 Type 41 "Royale" 1929–1939 Type 46/50/50T (touring car) 1932–1935 Type 55 (roadster) 1934–1940 Type 57/57S/Type 57SC (touring car) 1951–1956 Type 101 (coupe) Race cars 1910–1914 Type 13/Type 15/17/22 1912 Type 16 "Bébé" 1922–1926 Type 29 "Cigare" 1923 Type 32 "Tank" 1924–1930 Type 35/35A/35B/35T/35C/37/39 "Grand Prix" 1927–1930 Type 52 (electric racer for children) 1936–1939 Type 57G "Tank" 1937–1939 Type 50B 1931–1936 Type 53 1931–1936 Type 51/51A/54GP/59 1955–1956 Type 251 Prototypes 1900–1901 Type 2 1903 Type 5 1908 Type 10 "Petit Pur Sang" 1925 Type 36 1929–1930 Type 45/47 Type 56 (electric car) 1939 Type 64 (coupe) 1939 Bugatti Model 100 1943/1947 Type 73C 1957–1962 Type 252 (2-seat sports convertible) Bugatti Automobili S.p.A. (1987–1995) 1991–1995 Bugatti EB 110 1993 Bugatti EB112 (Concept) Bugatti Automobiles S.A.S. (1998–present) Production cars 2005–2015 Bugatti Veyron 2016–present Bugatti Chiron 2019–2021 Bugatti Divo 2020–present Bugatti Centodieci 2021–present Bugatti Bolide 2022-present Bugatti Mistral Prototypes 1998 Bugatti EB 118 1999 Bugatti EB 218 1999 Bugatti 18/3 Chiron 2009 Bugatti 16C Galibier "Royale" 2013 Bugatti Gangloff 2015 Bugatti Vision Gran Turismo 2019 Bugatti La Voiture Noire 2020 Bugatti Bolide 2020 Bugatti Vision References Bugatti Bugatti Car models Bugatti vehicles
The Lost Weekend is an album by the American duo Danny & Dusty, released in 1985 by A&M Records. Danny is Dan Stuart from the band Green on Red and Dusty is Steve Wynn from the band the Dream Syndicate. Their backing band featured members of Green on Red, the Dream Syndicate and the Long Ryders. Track listing All songs written by Dan Stuart and Steve Wynn except where noted. Side one: "The Word Is Out" – 3:57 "Song for the Dreamers" – 5:05 "Miracle Mile" – 4:20 "Baby, We All Gotta Go Down" – 4:17 Side two: "The King of the Losers" – 6:10 "Send Me a Postcard" – 2:55 "Down to the Bone" – 6:20 "Knockin' on Heaven's Door" (Bob Dylan) – 5:41 CD bonus track: "Bend in the Road" 4:10 "The Word Is Out" and "Bend in the Road" were recorded in February 1984 and produced by Rick Novak. Personnel Danny & Dusty Dan Stuart – lead vocals Steve Wynn – lead vocals, guitar with: Sid Griffin – guitar, dobro, vocals Stephen McCarthy – guitar, lap steel, vocals Tom Stevens – bass guitar Chris Cacavas – piano Dennis Duck (Dennis Mehaffey) – drums, vocals Technical Rick Novak - engineer Donald Krieger - art direction, design Dennis Mehaffey, Weinzweig - cover concept Amy McMillan, Howard Rosenberg - photography "Special thanks to Jack Waterson, Alex MacNicol, Chuck Prophet IV, Greg Sowders, Mark Walton, Susie Wrenn, Johnette and bartender Bob Breedon from Bob's Frolic Room (Hollywood)." References External links 1985 debut albums Cowpunk albums A&M Records albums
Wang Ning (born July 1966) is a Chinese politician from Shanxi province. As of November 2014 he was under investigation by the Communist Party's anti-corruption agency. Previously he served as the party chief of Liulin County. Life and career Wang was born and raised in Lin County, Shanxi. He graduated from Shanxi Central Party School of the Chinese Communist Party. Wang began his political career in October 1984, and joined the Chinese Communist Party in March 1986. Beginning in 1984, he served in several posts in Shanxi Military District, including soldier, assistant, and section chief. Wang served as a secretary in General Office of CCP Shanxi Provincial Committee from December 1992 to January 1999. In July 1999 he was promoted to become deputy party chief of Xiaoyi, a position he held until June 2006, then he was appointed the deputy party chief and magistrate of Jiaokou County, he remained in that position until November 2009, when he was transferred to Liulin County and appointed deputy party chief and magistrate. In January 2011, he was promoted to become party chief, the top political position in the County. Downfall On November 12, 2014, he was being investigated by the Central Commission for Discipline Inspection for "serious violations of laws and regulations". On February 15, 2015, he was expelled from the CCP and removed from public office. References 1966 births Chinese Communist Party politicians from Shanxi Living people Political office-holders in Shanxi People's Republic of China politicians from Shanxi Politicians from Lüliang
Viñegra de Moraña is a municipality located in the province of Ávila, Castile and León, Spain. According to the 2004 census (INE), the municipality had a population of 85 inhabitants. References Municipalities in the Province of Ávila
Viannos () is a municipality in the Heraklion regional unit, Crete, Greece. The municipality has an area of . Population 5,563 (2011). The seat of the municipality is in Ano Viannos. In September 1943, German occupation forces inflicted heavy loss of life and property on the region of Viannos in reprisal for its support of the Cretan resistance. In late July 2012, the area was hit by wildfires which caused severe damage in crops and livestock. Province The province of Viannos () was one of the provinces of the Heraklion Prefecture. Its territory corresponded with that of the current municipality Viannos, except a few villages that were part of the province Pediada. It was abolished in 2006. References Municipalities of Crete Populated places in Heraklion (regional unit) Provinces of Greece
The 2001 European Short Track Speed Skating Championships took place between 19 and 21 January 2000 in The Hague, Netherlands. Medal summary Medal table Men's events Women's events Participating nations See also Short track speed skating European Short Track Speed Skating Championships External links Detailed results Results overview European Short Track Speed Skating Championships European Short Track Speed Skating Championships European European Short Track Speed Skating Championships
```go package css_parser import ( "fmt" "testing" "github.com/evanw/esbuild/internal/ast" "github.com/evanw/esbuild/internal/compat" "github.com/evanw/esbuild/internal/config" "github.com/evanw/esbuild/internal/css_printer" "github.com/evanw/esbuild/internal/logger" "github.com/evanw/esbuild/internal/test" ) func expectPrintedCommon(t *testing.T, name string, contents string, expected string, expectedLog string, loader config.Loader, options config.Options) { t.Helper() t.Run(name, func(t *testing.T) { t.Helper() log := logger.NewDeferLog(logger.DeferLogNoVerboseOrDebug, nil) tree := Parse(log, test.SourceForTest(contents), OptionsFromConfig(loader, &options)) msgs := log.Done() text := "" for _, msg := range msgs { text += msg.String(logger.OutputOptions{}, logger.TerminalInfo{}) } test.AssertEqualWithDiff(t, text, expectedLog) symbols := ast.NewSymbolMap(1) symbols.SymbolsForSource[0] = tree.Symbols result := css_printer.Print(tree, symbols, css_printer.Options{ MinifyWhitespace: options.MinifyWhitespace, }) test.AssertEqualWithDiff(t, string(result.CSS), expected) }) } func expectPrinted(t *testing.T, contents string, expected string, expectedLog string) { t.Helper() expectPrintedCommon(t, contents, contents, expected, expectedLog, config.LoaderCSS, config.Options{}) } func expectPrintedLocal(t *testing.T, contents string, expected string, expectedLog string) { t.Helper() expectPrintedCommon(t, contents+" [local]", contents, expected, expectedLog, config.LoaderLocalCSS, config.Options{}) } func expectPrintedLower(t *testing.T, contents string, expected string, expectedLog string) { t.Helper() expectPrintedCommon(t, contents+" [lower]", contents, expected, expectedLog, config.LoaderCSS, config.Options{ UnsupportedCSSFeatures: ^compat.CSSFeature(0), }) } func expectPrintedLowerUnsupported(t *testing.T, unsupportedCSSFeatures compat.CSSFeature, contents string, expected string, expectedLog string) { t.Helper() expectPrintedCommon(t, contents+" [lower]", contents, expected, expectedLog, config.LoaderCSS, config.Options{ UnsupportedCSSFeatures: unsupportedCSSFeatures, }) } func expectPrintedWithAllPrefixes(t *testing.T, contents string, expected string, expectedLog string) { t.Helper() expectPrintedCommon(t, contents+" [prefixed]", contents, expected, expectedLog, config.LoaderCSS, config.Options{ CSSPrefixData: compat.CSSPrefixData(map[compat.Engine]compat.Semver{ compat.Chrome: {Parts: []int{0}}, compat.Edge: {Parts: []int{0}}, compat.Firefox: {Parts: []int{0}}, compat.IE: {Parts: []int{0}}, compat.IOS: {Parts: []int{0}}, compat.Opera: {Parts: []int{0}}, compat.Safari: {Parts: []int{0}}, }), }) } func expectPrintedMinify(t *testing.T, contents string, expected string, expectedLog string) { t.Helper() expectPrintedCommon(t, contents+" [minify]", contents, expected, expectedLog, config.LoaderCSS, config.Options{ MinifyWhitespace: true, }) } func expectPrintedMangle(t *testing.T, contents string, expected string, expectedLog string) { t.Helper() expectPrintedCommon(t, contents+" [mangle]", contents, expected, expectedLog, config.LoaderCSS, config.Options{ MinifySyntax: true, }) } func expectPrintedLowerMangle(t *testing.T, contents string, expected string, expectedLog string) { t.Helper() expectPrintedCommon(t, contents+" [lower, mangle]", contents, expected, expectedLog, config.LoaderCSS, config.Options{ UnsupportedCSSFeatures: ^compat.CSSFeature(0), MinifySyntax: true, }) } func expectPrintedMangleMinify(t *testing.T, contents string, expected string, expectedLog string) { t.Helper() expectPrintedCommon(t, contents+" [mangle, minify]", contents, expected, expectedLog, config.LoaderCSS, config.Options{ MinifySyntax: true, MinifyWhitespace: true, }) } func expectPrintedLowerMinify(t *testing.T, contents string, expected string, expectedLog string) { t.Helper() expectPrintedCommon(t, contents+" [lower, minify]", contents, expected, expectedLog, config.LoaderCSS, config.Options{ UnsupportedCSSFeatures: ^compat.CSSFeature(0), MinifyWhitespace: true, }) } func TestSingleLineComment(t *testing.T) { expectPrinted(t, "a, // a\nb // b\n{}", "a, // a b // b {\n}\n", "<stdin>: WARNING: Comments in CSS use \"/* ... */\" instead of \"//\"\n"+ "<stdin>: WARNING: Comments in CSS use \"/* ... */\" instead of \"//\"\n") expectPrinted(t, "a, ///// a /////\n{}", "a, ///// a ///// {\n}\n", "<stdin>: WARNING: Comments in CSS use \"/* ... */\" instead of \"//\"\n") } func TestEscapes(t *testing.T) { // TIdent expectPrinted(t, "a { value: id\\65nt }", "a {\n value: ident;\n}\n", "") expectPrinted(t, "a { value: \\69 dent }", "a {\n value: ident;\n}\n", "") expectPrinted(t, "a { value: \\69dent }", "a {\n value: \u69DEnt;\n}\n", "") expectPrinted(t, "a { value: \\2cx }", "a {\n value: \\,x;\n}\n", "") expectPrinted(t, "a { value: \\,x }", "a {\n value: \\,x;\n}\n", "") expectPrinted(t, "a { value: x\\2c }", "a {\n value: x\\,;\n}\n", "") expectPrinted(t, "a { value: x\\, }", "a {\n value: x\\,;\n}\n", "") expectPrinted(t, "a { value: x\\0 }", "a {\n value: x\uFFFD;\n}\n", "") expectPrinted(t, "a { value: x\\1 }", "a {\n value: x\\\x01;\n}\n", "") expectPrinted(t, "a { value: x\x00 }", "a {\n value: x\uFFFD;\n}\n", "") expectPrinted(t, "a { value: x\x01 }", "a {\n value: x\x01;\n}\n", "") // THash expectPrinted(t, "a { value: #0h\\61sh }", "a {\n value: #0hash;\n}\n", "") expectPrinted(t, "a { value: #\\30hash }", "a {\n value: #0hash;\n}\n", "") expectPrinted(t, "a { value: #\\2cx }", "a {\n value: #\\,x;\n}\n", "") expectPrinted(t, "a { value: #\\,x }", "a {\n value: #\\,x;\n}\n", "") // THashID expectPrinted(t, "a { value: #h\\61sh }", "a {\n value: #hash;\n}\n", "") expectPrinted(t, "a { value: #\\68 ash }", "a {\n value: #hash;\n}\n", "") expectPrinted(t, "a { value: #\\68ash }", "a {\n value: #\u068Ash;\n}\n", "") expectPrinted(t, "a { value: #x\\2c }", "a {\n value: #x\\,;\n}\n", "") expectPrinted(t, "a { value: #x\\, }", "a {\n value: #x\\,;\n}\n", "") // TFunction expectPrinted(t, "a { value: f\\6e() }", "a {\n value: fn();\n}\n", "") expectPrinted(t, "a { value: \\66n() }", "a {\n value: fn();\n}\n", "") expectPrinted(t, "a { value: \\2cx() }", "a {\n value: \\,x();\n}\n", "") expectPrinted(t, "a { value: \\,x() }", "a {\n value: \\,x();\n}\n", "") expectPrinted(t, "a { value: x\\2c() }", "a {\n value: x\\,();\n}\n", "") expectPrinted(t, "a { value: x\\,() }", "a {\n value: x\\,();\n}\n", "") // TString expectPrinted(t, "a { value: 'a\\62 c' }", "a {\n value: \"abc\";\n}\n", "") expectPrinted(t, "a { value: 'a\\62c' }", "a {\n value: \"a\u062C\";\n}\n", "") expectPrinted(t, "a { value: '\\61 bc' }", "a {\n value: \"abc\";\n}\n", "") expectPrinted(t, "a { value: '\\61bc' }", "a {\n value: \"\u61BC\";\n}\n", "") expectPrinted(t, "a { value: '\\2c' }", "a {\n value: \",\";\n}\n", "") expectPrinted(t, "a { value: '\\,' }", "a {\n value: \",\";\n}\n", "") expectPrinted(t, "a { value: '\\0' }", "a {\n value: \"\uFFFD\";\n}\n", "") expectPrinted(t, "a { value: '\\1' }", "a {\n value: \"\x01\";\n}\n", "") expectPrinted(t, "a { value: '\x00' }", "a {\n value: \"\uFFFD\";\n}\n", "") expectPrinted(t, "a { value: '\x01' }", "a {\n value: \"\x01\";\n}\n", "") // TURL expectPrinted(t, "a { value: url(a\\62 c) }", "a {\n value: url(abc);\n}\n", "") expectPrinted(t, "a { value: url(a\\62c) }", "a {\n value: url(a\u062C);\n}\n", "") expectPrinted(t, "a { value: url(\\61 bc) }", "a {\n value: url(abc);\n}\n", "") expectPrinted(t, "a { value: url(\\61bc) }", "a {\n value: url(\u61BC);\n}\n", "") expectPrinted(t, "a { value: url(\\2c) }", "a {\n value: url(,);\n}\n", "") expectPrinted(t, "a { value: url(\\,) }", "a {\n value: url(,);\n}\n", "") // TAtKeyword expectPrinted(t, "a { value: @k\\65yword }", "a {\n value: @keyword;\n}\n", "") expectPrinted(t, "a { value: @\\6b eyword }", "a {\n value: @keyword;\n}\n", "") expectPrinted(t, "a { value: @\\6beyword }", "a {\n value: @\u06BEyword;\n}\n", "") expectPrinted(t, "a { value: @\\2cx }", "a {\n value: @\\,x;\n}\n", "") expectPrinted(t, "a { value: @\\,x }", "a {\n value: @\\,x;\n}\n", "") expectPrinted(t, "a { value: @x\\2c }", "a {\n value: @x\\,;\n}\n", "") expectPrinted(t, "a { value: @x\\, }", "a {\n value: @x\\,;\n}\n", "") // TDimension expectPrinted(t, "a { value: 10\\65m }", "a {\n value: 10em;\n}\n", "") expectPrinted(t, "a { value: 10p\\32x }", "a {\n value: 10p2x;\n}\n", "") expectPrinted(t, "a { value: 10e\\32x }", "a {\n value: 10\\65 2x;\n}\n", "") expectPrinted(t, "a { value: 10e-\\32x }", "a {\n value: 10\\65-2x;\n}\n", "") expectPrinted(t, "a { value: 10E\\32x }", "a {\n value: 10\\45 2x;\n}\n", "") expectPrinted(t, "a { value: 10E-\\32x }", "a {\n value: 10\\45-2x;\n}\n", "") expectPrinted(t, "a { value: 10e1e\\32x }", "a {\n value: 10e1e2x;\n}\n", "") expectPrinted(t, "a { value: 10e1e-\\32x }", "a {\n value: 10e1e-2x;\n}\n", "") expectPrinted(t, "a { value: 10e1E\\32x }", "a {\n value: 10e1E2x;\n}\n", "") expectPrinted(t, "a { value: 10e1E-\\32x }", "a {\n value: 10e1E-2x;\n}\n", "") expectPrinted(t, "a { value: 10E1e\\32x }", "a {\n value: 10E1e2x;\n}\n", "") expectPrinted(t, "a { value: 10E1e-\\32x }", "a {\n value: 10E1e-2x;\n}\n", "") expectPrinted(t, "a { value: 10E1E\\32x }", "a {\n value: 10E1E2x;\n}\n", "") expectPrinted(t, "a { value: 10E1E-\\32x }", "a {\n value: 10E1E-2x;\n}\n", "") expectPrinted(t, "a { value: 10\\32x }", "a {\n value: 10\\32x;\n}\n", "") expectPrinted(t, "a { value: 10\\2cx }", "a {\n value: 10\\,x;\n}\n", "") expectPrinted(t, "a { value: 10\\,x }", "a {\n value: 10\\,x;\n}\n", "") expectPrinted(t, "a { value: 10x\\2c }", "a {\n value: 10x\\,;\n}\n", "") expectPrinted(t, "a { value: 10x\\, }", "a {\n value: 10x\\,;\n}\n", "") // This must remain unescaped. See path_to_url expectPrinted(t, "@font-face { unicode-range: U+0e2e-0e2f }", "@font-face {\n unicode-range: U+0e2e-0e2f;\n}\n", "") // RDeclaration colorWarning := "<stdin>: WARNING: \",olor\" is not a known CSS property\nNOTE: Did you mean \"color\" instead?\n" expectPrintedMangle(t, "a { c\\6flor: #f00 }", "a {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { \\63olor: #f00 }", "a {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { \\2color: #f00 }", "a {\n \\,olor: #f00;\n}\n", colorWarning) expectPrintedMangle(t, "a { \\,olor: #f00 }", "a {\n \\,olor: #f00;\n}\n", colorWarning) // RUnknownAt expectPrinted(t, "@unknown;", "@unknown;\n", "") expectPrinted(t, "@u\\6eknown;", "@unknown;\n", "") expectPrinted(t, "@\\75nknown;", "@unknown;\n", "") expectPrinted(t, "@u\\2cnknown;", "@u\\,nknown;\n", "") expectPrinted(t, "@u\\,nknown;", "@u\\,nknown;\n", "") expectPrinted(t, "@\\2cunknown;", "@\\,unknown;\n", "") expectPrinted(t, "@\\,unknown;", "@\\,unknown;\n", "") // RAtKeyframes expectPrinted(t, "@k\\65yframes abc { from {} }", "@keyframes abc {\n from {\n }\n}\n", "") expectPrinted(t, "@keyframes \\61 bc { from {} }", "@keyframes abc {\n from {\n }\n}\n", "") expectPrinted(t, "@keyframes a\\62 c { from {} }", "@keyframes abc {\n from {\n }\n}\n", "") expectPrinted(t, "@keyframes abc { \\66rom {} }", "@keyframes abc {\n from {\n }\n}\n", "") expectPrinted(t, "@keyframes a\\2c c { \\66rom {} }", "@keyframes a\\,c {\n from {\n }\n}\n", "") expectPrinted(t, "@keyframes a\\,c { \\66rom {} }", "@keyframes a\\,c {\n from {\n }\n}\n", "") // RAtNamespace namespaceWarning := "<stdin>: WARNING: \"@namespace\" rules are not supported\n" expectPrinted(t, "@n\\61mespace ns 'path';", "@namespace ns \"path\";\n", namespaceWarning) expectPrinted(t, "@namespace \\6es 'path';", "@namespace ns \"path\";\n", namespaceWarning) expectPrinted(t, "@namespace ns 'p\\61th';", "@namespace ns \"path\";\n", namespaceWarning) expectPrinted(t, "@namespace \\2cs 'p\\61th';", "@namespace \\,s \"path\";\n", namespaceWarning) expectPrinted(t, "@namespace \\,s 'p\\61th';", "@namespace \\,s \"path\";\n", namespaceWarning) // CompoundSelector expectPrinted(t, "* {}", "* {\n}\n", "") expectPrinted(t, "*|div {}", "*|div {\n}\n", "") expectPrinted(t, "\\2a {}", "\\* {\n}\n", "") expectPrinted(t, "\\2a|div {}", "\\*|div {\n}\n", "") expectPrinted(t, "\\2d {}", "\\- {\n}\n", "") expectPrinted(t, "\\2d- {}", "-- {\n}\n", "") expectPrinted(t, "-\\2d {}", "-- {\n}\n", "") expectPrinted(t, "\\2d 123 {}", "\\-123 {\n}\n", "") // SSHash expectPrinted(t, "#h\\61sh {}", "#hash {\n}\n", "") expectPrinted(t, "#\\2chash {}", "#\\,hash {\n}\n", "") expectPrinted(t, "#\\,hash {}", "#\\,hash {\n}\n", "") expectPrinted(t, "#\\2d {}", "#\\- {\n}\n", "") expectPrinted(t, "#\\2d- {}", "#-- {\n}\n", "") expectPrinted(t, "#-\\2d {}", "#-- {\n}\n", "") expectPrinted(t, "#\\2d 123 {}", "#\\-123 {\n}\n", "") expectPrinted(t, "#\\61hash {}", "#ahash {\n}\n", "") expectPrinted(t, "#\\30hash {}", "#\\30hash {\n}\n", "") expectPrinted(t, "#0\\2chash {}", "#0\\,hash {\n}\n", "<stdin>: WARNING: Unexpected \"#0\\\\2chash\"\n") expectPrinted(t, "#0\\,hash {}", "#0\\,hash {\n}\n", "<stdin>: WARNING: Unexpected \"#0\\\\,hash\"\n") // SSClass expectPrinted(t, ".cl\\61ss {}", ".class {\n}\n", "") expectPrinted(t, ".\\2c class {}", ".\\,class {\n}\n", "") expectPrinted(t, ".\\,class {}", ".\\,class {\n}\n", "") // SSPseudoClass expectPrinted(t, ":pseudocl\\61ss {}", ":pseudoclass {\n}\n", "") expectPrinted(t, ":pseudo\\2c class {}", ":pseudo\\,class {\n}\n", "") expectPrinted(t, ":pseudo\\,class {}", ":pseudo\\,class {\n}\n", "") expectPrinted(t, ":pseudo(cl\\61ss) {}", ":pseudo(class) {\n}\n", "") expectPrinted(t, ":pseudo(cl\\2css) {}", ":pseudo(cl\\,ss) {\n}\n", "") expectPrinted(t, ":pseudo(cl\\,ss) {}", ":pseudo(cl\\,ss) {\n}\n", "") // SSAttribute expectPrinted(t, "[\\61ttr] {}", "[attr] {\n}\n", "") expectPrinted(t, "[\\2c attr] {}", "[\\,attr] {\n}\n", "") expectPrinted(t, "[\\,attr] {}", "[\\,attr] {\n}\n", "") expectPrinted(t, "[attr\\7e=x] {}", "[attr\\~=x] {\n}\n", "") expectPrinted(t, "[attr\\~=x] {}", "[attr\\~=x] {\n}\n", "") expectPrinted(t, "[attr=\\2c] {}", "[attr=\",\"] {\n}\n", "") expectPrinted(t, "[attr=\\,] {}", "[attr=\",\"] {\n}\n", "") expectPrinted(t, "[attr=\"-\"] {}", "[attr=\"-\"] {\n}\n", "") expectPrinted(t, "[attr=\"--\"] {}", "[attr=--] {\n}\n", "") expectPrinted(t, "[attr=\"-a\"] {}", "[attr=-a] {\n}\n", "") expectPrinted(t, "[\\6es|attr] {}", "[ns|attr] {\n}\n", "") expectPrinted(t, "[ns|\\61ttr] {}", "[ns|attr] {\n}\n", "") expectPrinted(t, "[\\2cns|attr] {}", "[\\,ns|attr] {\n}\n", "") expectPrinted(t, "[ns|\\2c attr] {}", "[ns|\\,attr] {\n}\n", "") expectPrinted(t, "[*|attr] {}", "[*|attr] {\n}\n", "") expectPrinted(t, "[\\2a|attr] {}", "[\\*|attr] {\n}\n", "") } func TestString(t *testing.T) { expectPrinted(t, "a:after { content: 'a\\\rb' }", "a:after {\n content: \"ab\";\n}\n", "") expectPrinted(t, "a:after { content: 'a\\\nb' }", "a:after {\n content: \"ab\";\n}\n", "") expectPrinted(t, "a:after { content: 'a\\\fb' }", "a:after {\n content: \"ab\";\n}\n", "") expectPrinted(t, "a:after { content: 'a\\\r\nb' }", "a:after {\n content: \"ab\";\n}\n", "") expectPrinted(t, "a:after { content: 'a\\62 c' }", "a:after {\n content: \"abc\";\n}\n", "") expectPrinted(t, "a:after { content: '\r' }", "a:after {\n content: '\n ' }\n ;\n}\n", `<stdin>: WARNING: Unterminated string token <stdin>: WARNING: Expected "}" to go with "{" <stdin>: NOTE: The unbalanced "{" is here: <stdin>: WARNING: Unterminated string token `) expectPrinted(t, "a:after { content: '\n' }", "a:after {\n content: '\n ' }\n ;\n}\n", `<stdin>: WARNING: Unterminated string token <stdin>: WARNING: Expected "}" to go with "{" <stdin>: NOTE: The unbalanced "{" is here: <stdin>: WARNING: Unterminated string token `) expectPrinted(t, "a:after { content: '\f' }", "a:after {\n content: '\n ' }\n ;\n}\n", `<stdin>: WARNING: Unterminated string token <stdin>: WARNING: Expected "}" to go with "{" <stdin>: NOTE: The unbalanced "{" is here: <stdin>: WARNING: Unterminated string token `) expectPrinted(t, "a:after { content: '\r\n' }", "a:after {\n content: '\n ' }\n ;\n}\n", `<stdin>: WARNING: Unterminated string token <stdin>: WARNING: Expected "}" to go with "{" <stdin>: NOTE: The unbalanced "{" is here: <stdin>: WARNING: Unterminated string token `) expectPrinted(t, "a:after { content: '\\1010101' }", "a:after {\n content: \"\U001010101\";\n}\n", "") expectPrinted(t, "a:after { content: '\\invalid' }", "a:after {\n content: \"invalid\";\n}\n", "") } func TestNumber(t *testing.T) { for _, ext := range []string{"", "%", "px+"} { expectPrinted(t, "a { width: .0"+ext+"; }", "a {\n width: .0"+ext+";\n}\n", "") expectPrinted(t, "a { width: .00"+ext+"; }", "a {\n width: .00"+ext+";\n}\n", "") expectPrinted(t, "a { width: .10"+ext+"; }", "a {\n width: .10"+ext+";\n}\n", "") expectPrinted(t, "a { width: 0."+ext+"; }", "a {\n width: 0."+ext+";\n}\n", "") expectPrinted(t, "a { width: 0.0"+ext+"; }", "a {\n width: 0.0"+ext+";\n}\n", "") expectPrinted(t, "a { width: 0.1"+ext+"; }", "a {\n width: 0.1"+ext+";\n}\n", "") expectPrinted(t, "a { width: +.0"+ext+"; }", "a {\n width: +.0"+ext+";\n}\n", "") expectPrinted(t, "a { width: +.00"+ext+"; }", "a {\n width: +.00"+ext+";\n}\n", "") expectPrinted(t, "a { width: +.10"+ext+"; }", "a {\n width: +.10"+ext+";\n}\n", "") expectPrinted(t, "a { width: +0."+ext+"; }", "a {\n width: +0."+ext+";\n}\n", "") expectPrinted(t, "a { width: +0.0"+ext+"; }", "a {\n width: +0.0"+ext+";\n}\n", "") expectPrinted(t, "a { width: +0.1"+ext+"; }", "a {\n width: +0.1"+ext+";\n}\n", "") expectPrinted(t, "a { width: -.0"+ext+"; }", "a {\n width: -.0"+ext+";\n}\n", "") expectPrinted(t, "a { width: -.00"+ext+"; }", "a {\n width: -.00"+ext+";\n}\n", "") expectPrinted(t, "a { width: -.10"+ext+"; }", "a {\n width: -.10"+ext+";\n}\n", "") expectPrinted(t, "a { width: -0."+ext+"; }", "a {\n width: -0."+ext+";\n}\n", "") expectPrinted(t, "a { width: -0.0"+ext+"; }", "a {\n width: -0.0"+ext+";\n}\n", "") expectPrinted(t, "a { width: -0.1"+ext+"; }", "a {\n width: -0.1"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: .0"+ext+"; }", "a {\n width: 0"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: .00"+ext+"; }", "a {\n width: 0"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: .10"+ext+"; }", "a {\n width: .1"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: 0."+ext+"; }", "a {\n width: 0"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: 0.0"+ext+"; }", "a {\n width: 0"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: 0.1"+ext+"; }", "a {\n width: .1"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: +.0"+ext+"; }", "a {\n width: +0"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: +.00"+ext+"; }", "a {\n width: +0"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: +.10"+ext+"; }", "a {\n width: +.1"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: +0."+ext+"; }", "a {\n width: +0"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: +0.0"+ext+"; }", "a {\n width: +0"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: +0.1"+ext+"; }", "a {\n width: +.1"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: -.0"+ext+"; }", "a {\n width: -0"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: -.00"+ext+"; }", "a {\n width: -0"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: -.10"+ext+"; }", "a {\n width: -.1"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: -0."+ext+"; }", "a {\n width: -0"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: -0.0"+ext+"; }", "a {\n width: -0"+ext+";\n}\n", "") expectPrintedMangle(t, "a { width: -0.1"+ext+"; }", "a {\n width: -.1"+ext+";\n}\n", "") } } func TestURL(t *testing.T) { expectPrinted(t, "a { background: url(foo.png) }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url('foo.png') }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url(\"foo.png\") }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url(\"foo.png\" ) }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url(\"foo.png\"\t) }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url(\"foo.png\"\r) }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url(\"foo.png\"\n) }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url(\"foo.png\"\f) }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url(\"foo.png\"\r\n) }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url( \"foo.png\") }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url(\t\"foo.png\") }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url(\r\"foo.png\") }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url(\n\"foo.png\") }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url(\f\"foo.png\") }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url(\r\n\"foo.png\") }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url( \"foo.png\" ) }", "a {\n background: url(foo.png);\n}\n", "") expectPrinted(t, "a { background: url(\"foo.png\" extra-stuff) }", "a {\n background: url(\"foo.png\" extra-stuff);\n}\n", "") expectPrinted(t, "a { background: url( \"foo.png\" extra-stuff ) }", "a {\n background: url(\"foo.png\" extra-stuff);\n}\n", "") } func TestHexColor(t *testing.T) { // "#RGBA" expectPrinted(t, "a { color: #1234 }", "a {\n color: #1234;\n}\n", "") expectPrinted(t, "a { color: #123f }", "a {\n color: #123f;\n}\n", "") expectPrinted(t, "a { color: #abcd }", "a {\n color: #abcd;\n}\n", "") expectPrinted(t, "a { color: #abcf }", "a {\n color: #abcf;\n}\n", "") expectPrinted(t, "a { color: #ABCD }", "a {\n color: #ABCD;\n}\n", "") expectPrinted(t, "a { color: #ABCF }", "a {\n color: #ABCF;\n}\n", "") expectPrintedMangle(t, "a { color: #1234 }", "a {\n color: #1234;\n}\n", "") expectPrintedMangle(t, "a { color: #123f }", "a {\n color: #123;\n}\n", "") expectPrintedMangle(t, "a { color: #abcd }", "a {\n color: #abcd;\n}\n", "") expectPrintedMangle(t, "a { color: #abcf }", "a {\n color: #abc;\n}\n", "") expectPrintedMangle(t, "a { color: #ABCD }", "a {\n color: #abcd;\n}\n", "") expectPrintedMangle(t, "a { color: #ABCF }", "a {\n color: #abc;\n}\n", "") // "#RRGGBB" expectPrinted(t, "a { color: #112233 }", "a {\n color: #112233;\n}\n", "") expectPrinted(t, "a { color: #122233 }", "a {\n color: #122233;\n}\n", "") expectPrinted(t, "a { color: #112333 }", "a {\n color: #112333;\n}\n", "") expectPrinted(t, "a { color: #112234 }", "a {\n color: #112234;\n}\n", "") expectPrintedMangle(t, "a { color: #112233 }", "a {\n color: #123;\n}\n", "") expectPrintedMangle(t, "a { color: #122233 }", "a {\n color: #122233;\n}\n", "") expectPrintedMangle(t, "a { color: #112333 }", "a {\n color: #112333;\n}\n", "") expectPrintedMangle(t, "a { color: #112234 }", "a {\n color: #112234;\n}\n", "") expectPrinted(t, "a { color: #aabbcc }", "a {\n color: #aabbcc;\n}\n", "") expectPrinted(t, "a { color: #abbbcc }", "a {\n color: #abbbcc;\n}\n", "") expectPrinted(t, "a { color: #aabccc }", "a {\n color: #aabccc;\n}\n", "") expectPrinted(t, "a { color: #aabbcd }", "a {\n color: #aabbcd;\n}\n", "") expectPrintedMangle(t, "a { color: #aabbcc }", "a {\n color: #abc;\n}\n", "") expectPrintedMangle(t, "a { color: #abbbcc }", "a {\n color: #abbbcc;\n}\n", "") expectPrintedMangle(t, "a { color: #aabccc }", "a {\n color: #aabccc;\n}\n", "") expectPrintedMangle(t, "a { color: #aabbcd }", "a {\n color: #aabbcd;\n}\n", "") expectPrinted(t, "a { color: #AABBCC }", "a {\n color: #AABBCC;\n}\n", "") expectPrinted(t, "a { color: #ABBBCC }", "a {\n color: #ABBBCC;\n}\n", "") expectPrinted(t, "a { color: #AABCCC }", "a {\n color: #AABCCC;\n}\n", "") expectPrinted(t, "a { color: #AABBCD }", "a {\n color: #AABBCD;\n}\n", "") expectPrintedMangle(t, "a { color: #AABBCC }", "a {\n color: #abc;\n}\n", "") expectPrintedMangle(t, "a { color: #ABBBCC }", "a {\n color: #abbbcc;\n}\n", "") expectPrintedMangle(t, "a { color: #AABCCC }", "a {\n color: #aabccc;\n}\n", "") expectPrintedMangle(t, "a { color: #AABBCD }", "a {\n color: #aabbcd;\n}\n", "") // "#RRGGBBAA" expectPrinted(t, "a { color: #11223344 }", "a {\n color: #11223344;\n}\n", "") expectPrinted(t, "a { color: #12223344 }", "a {\n color: #12223344;\n}\n", "") expectPrinted(t, "a { color: #11233344 }", "a {\n color: #11233344;\n}\n", "") expectPrinted(t, "a { color: #11223444 }", "a {\n color: #11223444;\n}\n", "") expectPrinted(t, "a { color: #11223345 }", "a {\n color: #11223345;\n}\n", "") expectPrintedMangle(t, "a { color: #11223344 }", "a {\n color: #1234;\n}\n", "") expectPrintedMangle(t, "a { color: #12223344 }", "a {\n color: #12223344;\n}\n", "") expectPrintedMangle(t, "a { color: #11233344 }", "a {\n color: #11233344;\n}\n", "") expectPrintedMangle(t, "a { color: #11223444 }", "a {\n color: #11223444;\n}\n", "") expectPrintedMangle(t, "a { color: #11223345 }", "a {\n color: #11223345;\n}\n", "") expectPrinted(t, "a { color: #aabbccdd }", "a {\n color: #aabbccdd;\n}\n", "") expectPrinted(t, "a { color: #abbbccdd }", "a {\n color: #abbbccdd;\n}\n", "") expectPrinted(t, "a { color: #aabcccdd }", "a {\n color: #aabcccdd;\n}\n", "") expectPrinted(t, "a { color: #aabbcddd }", "a {\n color: #aabbcddd;\n}\n", "") expectPrinted(t, "a { color: #aabbccde }", "a {\n color: #aabbccde;\n}\n", "") expectPrintedMangle(t, "a { color: #aabbccdd }", "a {\n color: #abcd;\n}\n", "") expectPrintedMangle(t, "a { color: #abbbccdd }", "a {\n color: #abbbccdd;\n}\n", "") expectPrintedMangle(t, "a { color: #aabcccdd }", "a {\n color: #aabcccdd;\n}\n", "") expectPrintedMangle(t, "a { color: #aabbcddd }", "a {\n color: #aabbcddd;\n}\n", "") expectPrintedMangle(t, "a { color: #aabbccde }", "a {\n color: #aabbccde;\n}\n", "") expectPrinted(t, "a { color: #AABBCCDD }", "a {\n color: #AABBCCDD;\n}\n", "") expectPrinted(t, "a { color: #ABBBCCDD }", "a {\n color: #ABBBCCDD;\n}\n", "") expectPrinted(t, "a { color: #AABCCCDD }", "a {\n color: #AABCCCDD;\n}\n", "") expectPrinted(t, "a { color: #AABBCDDD }", "a {\n color: #AABBCDDD;\n}\n", "") expectPrinted(t, "a { color: #AABBCCDE }", "a {\n color: #AABBCCDE;\n}\n", "") expectPrintedMangle(t, "a { color: #AABBCCDD }", "a {\n color: #abcd;\n}\n", "") expectPrintedMangle(t, "a { color: #ABBBCCDD }", "a {\n color: #abbbccdd;\n}\n", "") expectPrintedMangle(t, "a { color: #AABCCCDD }", "a {\n color: #aabcccdd;\n}\n", "") expectPrintedMangle(t, "a { color: #AABBCDDD }", "a {\n color: #aabbcddd;\n}\n", "") expectPrintedMangle(t, "a { color: #AABBCCDE }", "a {\n color: #aabbccde;\n}\n", "") // "#RRGGBBFF" expectPrinted(t, "a { color: #112233ff }", "a {\n color: #112233ff;\n}\n", "") expectPrinted(t, "a { color: #122233ff }", "a {\n color: #122233ff;\n}\n", "") expectPrinted(t, "a { color: #112333ff }", "a {\n color: #112333ff;\n}\n", "") expectPrinted(t, "a { color: #112234ff }", "a {\n color: #112234ff;\n}\n", "") expectPrinted(t, "a { color: #112233ef }", "a {\n color: #112233ef;\n}\n", "") expectPrintedMangle(t, "a { color: #112233ff }", "a {\n color: #123;\n}\n", "") expectPrintedMangle(t, "a { color: #122233ff }", "a {\n color: #122233;\n}\n", "") expectPrintedMangle(t, "a { color: #112333ff }", "a {\n color: #112333;\n}\n", "") expectPrintedMangle(t, "a { color: #112234ff }", "a {\n color: #112234;\n}\n", "") expectPrintedMangle(t, "a { color: #112233ef }", "a {\n color: #112233ef;\n}\n", "") expectPrinted(t, "a { color: #aabbccff }", "a {\n color: #aabbccff;\n}\n", "") expectPrinted(t, "a { color: #abbbccff }", "a {\n color: #abbbccff;\n}\n", "") expectPrinted(t, "a { color: #aabcccff }", "a {\n color: #aabcccff;\n}\n", "") expectPrinted(t, "a { color: #aabbcdff }", "a {\n color: #aabbcdff;\n}\n", "") expectPrinted(t, "a { color: #aabbccef }", "a {\n color: #aabbccef;\n}\n", "") expectPrintedMangle(t, "a { color: #aabbccff }", "a {\n color: #abc;\n}\n", "") expectPrintedMangle(t, "a { color: #abbbccff }", "a {\n color: #abbbcc;\n}\n", "") expectPrintedMangle(t, "a { color: #aabcccff }", "a {\n color: #aabccc;\n}\n", "") expectPrintedMangle(t, "a { color: #aabbcdff }", "a {\n color: #aabbcd;\n}\n", "") expectPrintedMangle(t, "a { color: #aabbccef }", "a {\n color: #aabbccef;\n}\n", "") expectPrinted(t, "a { color: #AABBCCFF }", "a {\n color: #AABBCCFF;\n}\n", "") expectPrinted(t, "a { color: #ABBBCCFF }", "a {\n color: #ABBBCCFF;\n}\n", "") expectPrinted(t, "a { color: #AABCCCFF }", "a {\n color: #AABCCCFF;\n}\n", "") expectPrinted(t, "a { color: #AABBCDFF }", "a {\n color: #AABBCDFF;\n}\n", "") expectPrinted(t, "a { color: #AABBCCEF }", "a {\n color: #AABBCCEF;\n}\n", "") expectPrintedMangle(t, "a { color: #AABBCCFF }", "a {\n color: #abc;\n}\n", "") expectPrintedMangle(t, "a { color: #ABBBCCFF }", "a {\n color: #abbbcc;\n}\n", "") expectPrintedMangle(t, "a { color: #AABCCCFF }", "a {\n color: #aabccc;\n}\n", "") expectPrintedMangle(t, "a { color: #AABBCDFF }", "a {\n color: #aabbcd;\n}\n", "") expectPrintedMangle(t, "a { color: #AABBCCEF }", "a {\n color: #aabbccef;\n}\n", "") } func TestColorFunctions(t *testing.T) { expectPrinted(t, "a { color: color(display-p3 0.5 0.0 0.0%) }", "a {\n color: color(display-p3 0.5 0.0 0.0%);\n}\n", "") expectPrinted(t, "a { color: color(display-p3 0.5 0.0 0.0% / 0.5) }", "a {\n color: color(display-p3 0.5 0.0 0.0% / 0.5);\n}\n", "") // Check minification of tokens expectPrintedMangle(t, "a { color: color(display-p3 0.5 0.0 0.0%) }", "a {\n color: color(display-p3 .5 0 0%);\n}\n", "") expectPrintedMangle(t, "a { color: color(display-p3 0.5 0.0 0.0% / 0.5) }", "a {\n color: color(display-p3 .5 0 0% / .5);\n}\n", "") // Check out-of-range colors expectPrintedLower(t, "a { before: 0; color: color(display-p3 1 0 0); after: 1 }", "a {\n before: 0;\n color: #ff0f0e;\n color: color(display-p3 1 0 0);\n after: 1;\n}\n", "") expectPrintedLowerMangle(t, "a { before: 0; color: color(display-p3 1 0 0); after: 1 }", "a {\n before: 0;\n color: #ff0f0e;\n color: color(display-p3 1 0 0);\n after: 1;\n}\n", "") expectPrintedLower(t, "a { before: 0; color: color(display-p3 1 0 0 / 0.5); after: 1 }", "a {\n before: 0;\n color: rgba(255, 15, 14, .5);\n color: color(display-p3 1 0 0 / 0.5);\n after: 1;\n}\n", "") expectPrintedLowerMangle(t, "a { before: 0; color: color(display-p3 1 0 0 / 0.5); after: 1 }", "a {\n before: 0;\n color: rgba(255, 15, 14, .5);\n color: color(display-p3 1 0 0 / .5);\n after: 1;\n}\n", "") expectPrintedLower(t, "a { before: 0; background: color(display-p3 1 0 0); after: 1 }", "a {\n before: 0;\n background: #ff0f0e;\n background: color(display-p3 1 0 0);\n after: 1;\n}\n", "") expectPrintedLowerMangle(t, "a { before: 0; background: color(display-p3 1 0 0); after: 1 }", "a {\n before: 0;\n background: #ff0f0e;\n background: color(display-p3 1 0 0);\n after: 1;\n}\n", "") expectPrintedLower(t, "a { before: 0; background: color(display-p3 1 0 0 / 0.5); after: 1 }", "a {\n before: 0;\n background: rgba(255, 15, 14, .5);\n background: color(display-p3 1 0 0 / 0.5);\n after: 1;\n}\n", "") expectPrintedLowerMangle(t, "a { before: 0; background: color(display-p3 1 0 0 / 0.5); after: 1 }", "a {\n before: 0;\n background: rgba(255, 15, 14, .5);\n background: color(display-p3 1 0 0 / .5);\n after: 1;\n}\n", "") expectPrintedLower(t, "a { before: 0; box-shadow: 1px color(display-p3 1 0 0); after: 1 }", "a {\n before: 0;\n box-shadow: 1px #ff0f0e;\n box-shadow: 1px color(display-p3 1 0 0);\n after: 1;\n}\n", "") expectPrintedLowerMangle(t, "a { before: 0; box-shadow: 1px color(display-p3 1 0 0); after: 1 }", "a {\n before: 0;\n box-shadow: 1px #ff0f0e;\n box-shadow: 1px color(display-p3 1 0 0);\n after: 1;\n}\n", "") expectPrintedLower(t, "a { before: 0; box-shadow: 1px color(display-p3 1 0 0 / 0.5); after: 1 }", "a {\n before: 0;\n box-shadow: 1px rgba(255, 15, 14, .5);\n box-shadow: 1px color(display-p3 1 0 0 / 0.5);\n after: 1;\n}\n", "") expectPrintedLowerMangle(t, "a { before: 0; box-shadow: 1px color(display-p3 1 0 0 / 0.5); after: 1 }", "a {\n before: 0;\n box-shadow: 1px rgba(255, 15, 14, .5);\n box-shadow: 1px color(display-p3 1 0 0 / .5);\n after: 1;\n}\n", "") // Don't insert a fallback after a previous instance of the same property expectPrintedLower(t, "a { color: red; color: color(display-p3 1 0 0) }", "a {\n color: red;\n color: color(display-p3 1 0 0);\n}\n", "") expectPrintedLower(t, "a { color: color(display-p3 1 0 0); color: color(display-p3 0 1 0) }", "a {\n color: #ff0f0e;\n color: color(display-p3 1 0 0);\n color: color(display-p3 0 1 0);\n}\n", "") // Check case sensitivity expectPrintedLower(t, "a { color: color(srgb 0.87 0.98 0.807) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "A { Color: Color(Srgb 0.87 0.98 0.807) }", "A {\n Color: #deface;\n}\n", "") expectPrintedLower(t, "A { COLOR: COLOR(SRGB 0.87 0.98 0.807) }", "A {\n COLOR: #deface;\n}\n", "") // Check in-range colors in various color spaces expectPrintedLower(t, "a { color: color(a98-rgb 0.9 0.98 0.81) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(a98-rgb 90% 98% 81%) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(display-p3 0.89 0.977 0.823) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(display-p3 89% 97.7% 82.3%) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(prophoto-rgb 0.877 0.959 0.793) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(prophoto-rgb 87.7% 95.9% 79.3%) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(rec2020 0.895 0.968 0.805) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(rec2020 89.5% 96.8% 80.5%) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(srgb 0.87 0.98 0.807) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(srgb 87% 98% 80.7%) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(srgb-linear 0.73 0.96 0.62) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(srgb-linear 73% 96% 62%) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(xyz 0.754 0.883 0.715) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(xyz 75.4% 88.3% 71.5%) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(xyz-d50 0.773 0.883 0.545) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(xyz-d50 77.3% 88.3% 54.5%) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(xyz-d65 0.754 0.883 0.715) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: color(xyz-d65 75.4% 88.3% 71.5%) }", "a {\n color: #deface;\n}\n", "") // Check color functions with unusual percent reference ranges expectPrintedLower(t, "a { color: lab(95.38 -15 18) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: lab(95.38% -15 18) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: lab(95.38 -12% 18) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: lab(95.38% -15 14.4%) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: lch(95.38 23.57 130.22) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: lch(95.38% 23.57 130.22) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: lch(95.38 19% 130.22) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: lch(95.38 23.57 0.362turn) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: oklab(0.953 -0.045 0.046) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: oklab(95.3% -0.045 0.046) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: oklab(0.953 -11.2% 0.046) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: oklab(0.953 -0.045 11.5%) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: oklch(0.953 0.064 134) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: oklch(95.3% 0.064 134) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: oklch(0.953 16% 134) }", "a {\n color: #deface;\n}\n", "") expectPrintedLower(t, "a { color: oklch(0.953 0.064 0.372turn) }", "a {\n color: #deface;\n}\n", "") // Test alpha expectPrintedLower(t, "a { color: color(srgb 0.87 0.98 0.807 / 0.5) }", "a {\n color: rgba(222, 250, 206, .5);\n}\n", "") expectPrintedLower(t, "a { color: lab(95.38 -15 18 / 0.5) }", "a {\n color: rgba(222, 250, 206, .5);\n}\n", "") expectPrintedLower(t, "a { color: lch(95.38 23.57 130.22 / 0.5) }", "a {\n color: rgba(222, 250, 206, .5);\n}\n", "") expectPrintedLower(t, "a { color: oklab(0.953 -0.045 0.046 / 0.5) }", "a {\n color: rgba(222, 250, 206, .5);\n}\n", "") expectPrintedLower(t, "a { color: oklch(0.953 0.064 134 / 0.5) }", "a {\n color: rgba(222, 250, 206, .5);\n}\n", "") } func TestColorNames(t *testing.T) { expectPrinted(t, "a { color: #f00 }", "a {\n color: #f00;\n}\n", "") expectPrinted(t, "a { color: #f00f }", "a {\n color: #f00f;\n}\n", "") expectPrinted(t, "a { color: #ff0000 }", "a {\n color: #ff0000;\n}\n", "") expectPrinted(t, "a { color: #ff0000ff }", "a {\n color: #ff0000ff;\n}\n", "") expectPrintedMangle(t, "a { color: #f00 }", "a {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: #f00e }", "a {\n color: #f00e;\n}\n", "") expectPrintedMangle(t, "a { color: #f00f }", "a {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: #ff0000 }", "a {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: #ff0000ef }", "a {\n color: #ff0000ef;\n}\n", "") expectPrintedMangle(t, "a { color: #ff0000ff }", "a {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: #ffc0cb }", "a {\n color: pink;\n}\n", "") expectPrintedMangle(t, "a { color: #ffc0cbef }", "a {\n color: #ffc0cbef;\n}\n", "") expectPrintedMangle(t, "a { color: #ffc0cbff }", "a {\n color: pink;\n}\n", "") expectPrinted(t, "a { color: white }", "a {\n color: white;\n}\n", "") expectPrinted(t, "a { color: tUrQuOiSe }", "a {\n color: tUrQuOiSe;\n}\n", "") expectPrintedMangle(t, "a { color: white }", "a {\n color: #fff;\n}\n", "") expectPrintedMangle(t, "a { color: tUrQuOiSe }", "a {\n color: #40e0d0;\n}\n", "") } func TestColorRGBA(t *testing.T) { expectPrintedMangle(t, "a { color: rgba(1 2 3 / 0.5) }", "a {\n color: #01020380;\n}\n", "") expectPrintedMangle(t, "a { color: rgba(1 2 3 / 50%) }", "a {\n color: #0102037f;\n}\n", "") expectPrintedMangle(t, "a { color: rgba(1, 2, 3, 0.5) }", "a {\n color: #01020380;\n}\n", "") expectPrintedMangle(t, "a { color: rgba(1, 2, 3, 50%) }", "a {\n color: #0102037f;\n}\n", "") expectPrintedMangle(t, "a { color: rgba(1% 2% 3% / 0.5) }", "a {\n color: #03050880;\n}\n", "") expectPrintedMangle(t, "a { color: rgba(1% 2% 3% / 50%) }", "a {\n color: #0305087f;\n}\n", "") expectPrintedMangle(t, "a { color: rgba(1%, 2%, 3%, 0.5) }", "a {\n color: #03050880;\n}\n", "") expectPrintedMangle(t, "a { color: rgba(1%, 2%, 3%, 50%) }", "a {\n color: #0305087f;\n}\n", "") expectPrintedLowerMangle(t, "a { color: rgb(1, 2, 3, 0.4) }", "a {\n color: rgba(1, 2, 3, .4);\n}\n", "") expectPrintedLowerMangle(t, "a { color: rgba(1, 2, 3, 40%) }", "a {\n color: rgba(1, 2, 3, .4);\n}\n", "") expectPrintedLowerMangle(t, "a { color: rgb(var(--x) var(--y) var(--z)) }", "a {\n color: rgb(var(--x) var(--y) var(--z));\n}\n", "") } func TestColorHSLA(t *testing.T) { expectPrintedMangle(t, ".red { color: hsl(0, 100%, 50%) }", ".red {\n color: red;\n}\n", "") expectPrintedMangle(t, ".orange { color: hsl(30deg, 100%, 50%) }", ".orange {\n color: #ff8000;\n}\n", "") expectPrintedMangle(t, ".yellow { color: hsl(60 100% 50%) }", ".yellow {\n color: #ff0;\n}\n", "") expectPrintedMangle(t, ".green { color: hsl(120, 100%, 50%) }", ".green {\n color: #0f0;\n}\n", "") expectPrintedMangle(t, ".cyan { color: hsl(200grad, 100%, 50%) }", ".cyan {\n color: #0ff;\n}\n", "") expectPrintedMangle(t, ".blue { color: hsl(240, 100%, 50%) }", ".blue {\n color: #00f;\n}\n", "") expectPrintedMangle(t, ".purple { color: hsl(0.75turn 100% 50%) }", ".purple {\n color: #7f00ff;\n}\n", "") expectPrintedMangle(t, ".magenta { color: hsl(300, 100%, 50%) }", ".magenta {\n color: #f0f;\n}\n", "") expectPrintedMangle(t, "a { color: hsl(30 25% 50% / 50%) }", "a {\n color: #9f80607f;\n}\n", "") expectPrintedMangle(t, "a { color: hsla(30 25% 50% / 50%) }", "a {\n color: #9f80607f;\n}\n", "") expectPrintedLowerMangle(t, "a { color: hsl(1, 2%, 3%, 0.4) }", "a {\n color: rgba(8, 8, 7, .4);\n}\n", "") expectPrintedLowerMangle(t, "a { color: hsla(1, 2%, 3%, 40%) }", "a {\n color: rgba(8, 8, 7, .4);\n}\n", "") expectPrintedLowerMangle(t, "a { color: hsl(var(--x) var(--y) var(--z)) }", "a {\n color: hsl(var(--x) var(--y) var(--z));\n}\n", "") } func TestLowerColor(t *testing.T) { expectPrintedLower(t, "a { color: rebeccapurple }", "a {\n color: #663399;\n}\n", "") expectPrintedLower(t, "a { color: ReBeCcApUrPlE }", "a {\n color: #663399;\n}\n", "") expectPrintedLower(t, "a { color: #0123 }", "a {\n color: rgba(0, 17, 34, .2);\n}\n", "") expectPrintedLower(t, "a { color: #1230 }", "a {\n color: rgba(17, 34, 51, 0);\n}\n", "") expectPrintedLower(t, "a { color: #1234 }", "a {\n color: rgba(17, 34, 51, .267);\n}\n", "") expectPrintedLower(t, "a { color: #123f }", "a {\n color: #112233;\n}\n", "") expectPrintedLower(t, "a { color: #12345678 }", "a {\n color: rgba(18, 52, 86, .47);\n}\n", "") expectPrintedLower(t, "a { color: #ff00007f }", "a {\n color: rgba(255, 0, 0, .498);\n}\n", "") expectPrintedLower(t, "a { color: rgb(1 2 3) }", "a {\n color: rgb(1, 2, 3);\n}\n", "") expectPrintedLower(t, "a { color: hsl(1 2% 3%) }", "a {\n color: hsl(1, 2%, 3%);\n}\n", "") expectPrintedLower(t, "a { color: rgba(1% 2% 3%) }", "a {\n color: rgb(1%, 2%, 3%);\n}\n", "") expectPrintedLower(t, "a { color: hsla(1deg 2% 3%) }", "a {\n color: hsl(1, 2%, 3%);\n}\n", "") expectPrintedLower(t, "a { color: hsla(200grad 2% 3%) }", "a {\n color: hsl(180, 2%, 3%);\n}\n", "") expectPrintedLower(t, "a { color: hsla(6.28319rad 2% 3%) }", "a {\n color: hsl(360, 2%, 3%);\n}\n", "") expectPrintedLower(t, "a { color: hsla(0.5turn 2% 3%) }", "a {\n color: hsl(180, 2%, 3%);\n}\n", "") expectPrintedLower(t, "a { color: hsla(+200grad 2% 3%) }", "a {\n color: hsl(180, 2%, 3%);\n}\n", "") expectPrintedLower(t, "a { color: hsla(-200grad 2% 3%) }", "a {\n color: hsl(-180, 2%, 3%);\n}\n", "") expectPrintedLower(t, "a { color: rgb(1 2 3 / 4) }", "a {\n color: rgba(1, 2, 3, 4);\n}\n", "") expectPrintedLower(t, "a { color: RGB(1 2 3 / 4) }", "a {\n color: rgba(1, 2, 3, 4);\n}\n", "") expectPrintedLower(t, "a { color: rgba(1% 2% 3% / 4%) }", "a {\n color: rgba(1%, 2%, 3%, 0.04);\n}\n", "") expectPrintedLower(t, "a { color: RGBA(1% 2% 3% / 4%) }", "a {\n color: RGBA(1%, 2%, 3%, 0.04);\n}\n", "") expectPrintedLower(t, "a { color: hsl(1 2% 3% / 4) }", "a {\n color: hsla(1, 2%, 3%, 4);\n}\n", "") expectPrintedLower(t, "a { color: HSL(1 2% 3% / 4) }", "a {\n color: hsla(1, 2%, 3%, 4);\n}\n", "") expectPrintedLower(t, "a { color: hsla(1 2% 3% / 4%) }", "a {\n color: hsla(1, 2%, 3%, 0.04);\n}\n", "") expectPrintedLower(t, "a { color: HSLA(1 2% 3% / 4%) }", "a {\n color: HSLA(1, 2%, 3%, 0.04);\n}\n", "") expectPrintedLower(t, "a { color: rgb(1, 2, 3, 4) }", "a {\n color: rgba(1, 2, 3, 4);\n}\n", "") expectPrintedLower(t, "a { color: rgba(1%, 2%, 3%, 4%) }", "a {\n color: rgba(1%, 2%, 3%, 0.04);\n}\n", "") expectPrintedLower(t, "a { color: rgb(1%, 2%, 3%, 0.4%) }", "a {\n color: rgba(1%, 2%, 3%, 0.004);\n}\n", "") expectPrintedLower(t, "a { color: hsl(1, 2%, 3%, 4) }", "a {\n color: hsla(1, 2%, 3%, 4);\n}\n", "") expectPrintedLower(t, "a { color: hsla(1deg, 2%, 3%, 4%) }", "a {\n color: hsla(1, 2%, 3%, 0.04);\n}\n", "") expectPrintedLower(t, "a { color: hsl(1deg, 2%, 3%, 0.4%) }", "a {\n color: hsla(1, 2%, 3%, 0.004);\n}\n", "") expectPrintedLower(t, "a { color: hwb(90deg 20% 40%) }", "a {\n color: #669933;\n}\n", "") expectPrintedLower(t, "a { color: HWB(90deg 20% 40%) }", "a {\n color: #669933;\n}\n", "") expectPrintedLower(t, "a { color: hwb(90deg 20% 40% / 0.2) }", "a {\n color: rgba(102, 153, 51, .2);\n}\n", "") expectPrintedLower(t, "a { color: hwb(1deg 40% 80%) }", "a {\n color: #555555;\n}\n", "") expectPrintedLower(t, "a { color: hwb(1deg 9000% 50%) }", "a {\n color: #aaaaaa;\n}\n", "") expectPrintedLower(t, "a { color: hwb(1deg 9000% 50% / 0.6) }", "a {\n color: rgba(170, 170, 170, .6);\n}\n", "") expectPrintedLower(t, "a { color: hwb(90deg, 20%, 40%) }", "a {\n color: hwb(90deg, 20%, 40%);\n}\n", "") // This is invalid expectPrintedLower(t, "a { color: hwb(none 20% 40%) }", "a {\n color: hwb(none 20% 40%);\n}\n", "") // Interpolation expectPrintedLower(t, "a { color: hwb(90deg none 40%) }", "a {\n color: hwb(90deg none 40%);\n}\n", "") // Interpolation expectPrintedLower(t, "a { color: hwb(90deg 20% none) }", "a {\n color: hwb(90deg 20% none);\n}\n", "") // Interpolation expectPrintedMangle(t, "a { color: hwb(90deg 20% 40%) }", "a {\n color: #693;\n}\n", "") expectPrintedMangle(t, "a { color: hwb(0.75turn 20% 40% / 0.75) }", "a {\n color: #663399bf;\n}\n", "") expectPrintedLowerMangle(t, "a { color: hwb(90deg 20% 40%) }", "a {\n color: #693;\n}\n", "") expectPrintedLowerMangle(t, "a { color: hwb(0.75turn 20% 40% / 0.75) }", "a {\n color: rgba(102, 51, 153, .75);\n}\n", "") } func TestBackground(t *testing.T) { expectPrinted(t, "a { background: #11223344 }", "a {\n background: #11223344;\n}\n", "") expectPrintedMangle(t, "a { background: #11223344 }", "a {\n background: #1234;\n}\n", "") expectPrintedLower(t, "a { background: #11223344 }", "a {\n background: rgba(17, 34, 51, .267);\n}\n", "") expectPrinted(t, "a { background: border-box #11223344 }", "a {\n background: border-box #11223344;\n}\n", "") expectPrintedMangle(t, "a { background: border-box #11223344 }", "a {\n background: border-box #1234;\n}\n", "") expectPrintedLower(t, "a { background: border-box #11223344 }", "a {\n background: border-box rgba(17, 34, 51, .267);\n}\n", "") } func TestGradient(t *testing.T) { gradientKinds := []string{ "linear-gradient", "radial-gradient", "conic-gradient", "repeating-linear-gradient", "repeating-radial-gradient", "repeating-conic-gradient", } for _, gradient := range gradientKinds { var code string // Different properties expectPrinted(t, "a { background: "+gradient+"(red, blue) }", "a {\n background: "+gradient+"(red, blue);\n}\n", "") expectPrinted(t, "a { background-image: "+gradient+"(red, blue) }", "a {\n background-image: "+gradient+"(red, blue);\n}\n", "") expectPrinted(t, "a { border-image: "+gradient+"(red, blue) }", "a {\n border-image: "+gradient+"(red, blue);\n}\n", "") expectPrinted(t, "a { mask-image: "+gradient+"(red, blue) }", "a {\n mask-image: "+gradient+"(red, blue);\n}\n", "") // Basic code = "a { background: " + gradient + "(yellow, #11223344) }" expectPrinted(t, code, "a {\n background: "+gradient+"(yellow, #11223344);\n}\n", "") expectPrintedMangle(t, code, "a {\n background: "+gradient+"(#ff0, #1234);\n}\n", "") expectPrintedMinify(t, code, "a{background:"+gradient+"(yellow,#11223344)}", "") expectPrintedLowerUnsupported(t, compat.HexRGBA, code, "a {\n background: "+gradient+"(yellow, rgba(17, 34, 51, .267));\n}\n", "") // Basic with positions code = "a { background: " + gradient + "(yellow 10%, #11223344 90%) }" expectPrinted(t, code, "a {\n background: "+gradient+"(yellow 10%, #11223344 90%);\n}\n", "") expectPrintedMangle(t, code, "a {\n background: "+gradient+"(#ff0 10%, #1234 90%);\n}\n", "") expectPrintedMinify(t, code, "a{background:"+gradient+"(yellow 10%,#11223344 90%)}", "") expectPrintedLowerUnsupported(t, compat.HexRGBA, code, "a {\n background: "+gradient+"(yellow 10%, rgba(17, 34, 51, .267) 90%);\n}\n", "") // Basic with hints code = "a { background: " + gradient + "(yellow, 25%, #11223344) }" expectPrinted(t, code, "a {\n background:\n "+gradient+"(\n yellow,\n 25%,\n #11223344);\n}\n", "") expectPrintedMangle(t, code, "a {\n background:\n "+gradient+"(\n #ff0,\n 25%,\n #1234);\n}\n", "") expectPrintedMinify(t, code, "a{background:"+gradient+"(yellow,25%,#11223344)}", "") expectPrintedLowerUnsupported(t, compat.HexRGBA, code, "a {\n background:\n "+gradient+"(\n yellow,\n 25%,\n rgba(17, 34, 51, .267));\n}\n", "") expectPrintedLowerUnsupported(t, compat.GradientMidpoints, code, "a {\n background:\n "+gradient+"(\n #ffff00,\n #f2f303de,\n #eced04d0 6.25%,\n "+ "#e1e306bd 12.5%,\n #cdd00ba2 25%,\n #a2a8147b,\n #6873205d,\n #11223344);\n}\n", "") // Double positions code = "a { background: " + gradient + "(green, red 10%, red 20%, yellow 70% 80%, black) }" expectPrinted(t, code, "a {\n background:\n "+gradient+"(\n green,\n red 10%,\n "+ "red 20%,\n yellow 70% 80%,\n black);\n}\n", "") expectPrintedMangle(t, code, "a {\n background:\n "+gradient+"(\n green,\n "+ "red 10% 20%,\n #ff0 70% 80%,\n #000);\n}\n", "") expectPrintedMinify(t, code, "a{background:"+gradient+"(green,red 10%,red 20%,yellow 70% 80%,black)}", "") expectPrintedLowerUnsupported(t, compat.GradientDoublePosition, code, "a {\n background:\n "+gradient+"(\n green,\n red 10%,\n red 20%,\n "+ "yellow 70%,\n yellow 80%,\n black);\n}\n", "") // Double positions with hints code = "a { background: " + gradient + "(green, red 10%, red 20%, 30%, yellow 70% 80%, 85%, black) }" expectPrinted(t, code, "a {\n background:\n "+gradient+"(\n green,\n red 10%,\n red 20%,\n "+ "30%,\n yellow 70% 80%,\n 85%,\n black);\n}\n", "") expectPrintedMangle(t, code, "a {\n background:\n "+gradient+"(\n green,\n red 10% 20%,\n "+ "30%,\n #ff0 70% 80%,\n 85%,\n #000);\n}\n", "") expectPrintedMinify(t, code, "a{background:"+gradient+"(green,red 10%,red 20%,30%,yellow 70% 80%,85%,black)}", "") expectPrintedLowerUnsupported(t, compat.GradientDoublePosition, code, "a {\n background:\n "+gradient+"(\n green,\n red 10%,\n red 20%,\n 30%,\n "+ "yellow 70%,\n yellow 80%,\n 85%,\n black);\n}\n", "") // Non-double positions with hints code = "a { background: " + gradient + "(green, red 10%, 1%, red 20%, black) }" expectPrinted(t, code, "a {\n background:\n "+gradient+"(\n green,\n red 10%,\n 1%,\n "+ "red 20%,\n black);\n}\n", "") expectPrintedMangle(t, code, "a {\n background:\n "+gradient+"(\n green,\n red 10%,\n "+ "1%,\n red 20%,\n #000);\n}\n", "") expectPrintedMinify(t, code, "a{background:"+gradient+"(green,red 10%,1%,red 20%,black)}", "") expectPrintedLowerUnsupported(t, compat.GradientDoublePosition, code, "a {\n background:\n "+gradient+"(\n green,\n red 10%,\n 1%,\n red 20%,\n black);\n}\n", "") // Out-of-gamut colors code = "a { background: " + gradient + "(yellow, color(display-p3 1 0 0)) }" expectPrinted(t, code, "a {\n background: "+gradient+"(yellow, color(display-p3 1 0 0));\n}\n", "") expectPrintedMangle(t, code, "a {\n background: "+gradient+"(#ff0, color(display-p3 1 0 0));\n}\n", "") expectPrintedMinify(t, code, "a{background:"+gradient+"(yellow,color(display-p3 1 0 0))}", "") expectPrintedLowerUnsupported(t, compat.ColorFunctions, code, "a {\n background:\n "+gradient+"(\n #ffff00,\n #ffe971,\n #ffd472 25%,\n "+ "#ffab5f,\n #ff7b45 75%,\n #ff5e38 87.5%,\n #ff5534,\n #ff4c30,\n "+ "#ff412c,\n #ff0e0e);\n "+ "background:\n "+gradient+"(\n #ffff00,\n color(xyz 0.734 0.805 0.111),\n "+ "color(xyz 0.699 0.693 0.087) 25%,\n color(xyz 0.627 0.501 0.048),\n "+ "color(xyz 0.556 0.348 0.019) 75%,\n color(xyz 0.521 0.284 0.009) 87.5%,\n "+ "color(xyz 0.512 0.27 0.006),\n color(xyz 0.504 0.256 0.004),\n "+ "color(xyz 0.495 0.242 0.002),\n color(xyz 0.487 0.229 0));\n}\n", "") // Whitespace code = "a { background: " + gradient + "(color-mix(in lab,red,green)calc(1px)calc(2px),color-mix(in lab,blue,red)calc(98%)calc(99%)) }" expectPrinted(t, code, "a {\n background: "+gradient+ "(color-mix(in lab, red, green)calc(1px)calc(2px), color-mix(in lab, blue, red)calc(98%)calc(99%));\n}\n", "") expectPrintedMangle(t, code, "a {\n background: "+gradient+ "(color-mix(in lab, red, green) 1px 2px, color-mix(in lab, blue, red) 98% 99%);\n}\n", "") expectPrintedMinify(t, code, "a{background:"+gradient+ "(color-mix(in lab,red,green)calc(1px)calc(2px),color-mix(in lab,blue,red)calc(98%)calc(99%))}", "") expectPrintedLowerUnsupported(t, compat.GradientDoublePosition, code, "a {\n background:\n "+gradient+ "(\n color-mix(in lab, red, green) calc(1px),\n color-mix(in lab, red, green) calc(2px),"+ "\n color-mix(in lab, blue, red) calc(98%),\n color-mix(in lab, blue, red) calc(99%));\n}\n", "") expectPrintedLowerMangle(t, code, "a {\n background:\n "+gradient+ "(\n color-mix(in lab, red, green) 1px,\n color-mix(in lab, red, green) 2px,"+ "\n color-mix(in lab, blue, red) 98%,\n color-mix(in lab, blue, red) 99%);\n}\n", "") // Color space interpolation expectPrintedLowerUnsupported(t, compat.GradientInterpolation, "a { background: "+gradient+"(in srgb, red, green) }", "a {\n background: "+gradient+"(#ff0000, #008000);\n}\n", "") expectPrintedLowerUnsupported(t, compat.GradientInterpolation, "a { background: "+gradient+"(in srgb-linear, red, green) }", "a {\n background:\n "+gradient+"(\n #ff0000,\n #fb1300,\n #f81f00 6.25%,\n "+ "#f02e00 12.5%,\n #e14200 25%,\n #bc5c00,\n #897000 75%,\n #637800 87.5%,\n "+ "#477c00 93.75%,\n #317e00,\n #008000);\n}\n", "") expectPrintedLowerUnsupported(t, compat.GradientInterpolation, "a { background: "+gradient+"(in lab, red, green) }", "a {\n background:\n "+gradient+"(\n #ff0000,\n color(xyz 0.396 0.211 0.019),\n "+ "color(xyz 0.38 0.209 0.02) 6.25%,\n color(xyz 0.35 0.205 0.02) 12.5%,\n "+ "color(xyz 0.294 0.198 0.02) 25%,\n color(xyz 0.2 0.183 0.022),\n "+ "color(xyz 0.129 0.168 0.024) 75%,\n color(xyz 0.101 0.161 0.025) 87.5%,\n "+ "color(xyz 0.089 0.158 0.025) 93.75%,\n color(xyz 0.083 0.156 0.025),\n #008000);\n}\n", "") // Hue interpolation expectPrintedLowerUnsupported(t, compat.GradientInterpolation, "a { background: "+gradient+"(in hsl shorter hue, red, green) }", "a {\n background:\n "+gradient+"(\n #ff0000,\n #df7000,\n "+ "#bfbf00,\n #50a000,\n #008000);\n}\n", "") expectPrintedLowerUnsupported(t, compat.GradientInterpolation, "a { background: "+gradient+"(in hsl longer hue, red, green) }", "a {\n background:\n "+gradient+"(\n #ff0000,\n #ef0078,\n "+ "#df00df,\n #6800cf,\n #0000c0,\n #0058b0,\n "+ "#00a0a0,\n #009048,\n #008000);\n}\n", "") } } func TestDeclaration(t *testing.T) { expectPrinted(t, ".decl {}", ".decl {\n}\n", "") expectPrinted(t, ".decl { a: b }", ".decl {\n a: b;\n}\n", "") expectPrinted(t, ".decl { a: b; }", ".decl {\n a: b;\n}\n", "") expectPrinted(t, ".decl { a: b; c: d }", ".decl {\n a: b;\n c: d;\n}\n", "") expectPrinted(t, ".decl { a: b; c: d; }", ".decl {\n a: b;\n c: d;\n}\n", "") expectPrinted(t, ".decl { a { b: c; } }", ".decl {\n a {\n b: c;\n }\n}\n", "") expectPrinted(t, ".decl { & a { b: c; } }", ".decl {\n & a {\n b: c;\n }\n}\n", "") // See path_to_url expectPrinted(t, ".selector { (;property: value;); }", ".selector {\n (;property: value;);\n}\n", "<stdin>: WARNING: Expected identifier but found \"(\"\n") expectPrinted(t, ".selector { [;property: value;]; }", ".selector {\n [;property: value;];\n}\n", "<stdin>: WARNING: Expected identifier but found \"[\"\n") expectPrinted(t, ".selector, {}", ".selector, {\n}\n", "<stdin>: WARNING: Unexpected \"{\"\n") expectPrinted(t, ".selector\\ {}", ".selector\\ {\n}\n", "") expectPrinted(t, ".selector { property: value\\9; }", ".selector {\n property: value\\\t;\n}\n", "") expectPrinted(t, "@media \\0screen\\,screen\\9 {}", "@media \uFFFDscreen\\,screen\\\t {\n}\n", "") } func TestSelector(t *testing.T) { expectPrinted(t, "a{}", "a {\n}\n", "") expectPrinted(t, "a {}", "a {\n}\n", "") expectPrinted(t, "a b {}", "a b {\n}\n", "") expectPrinted(t, "a/**/b {}", "ab {\n}\n", "<stdin>: WARNING: Unexpected \"b\"\n") expectPrinted(t, "a/**/.b {}", "a.b {\n}\n", "") expectPrinted(t, "a/**/:b {}", "a:b {\n}\n", "") expectPrinted(t, "a/**/[b] {}", "a[b] {\n}\n", "") expectPrinted(t, "a>/**/b {}", "a > b {\n}\n", "") expectPrinted(t, "a+/**/b {}", "a + b {\n}\n", "") expectPrinted(t, "a~/**/b {}", "a ~ b {\n}\n", "") expectPrinted(t, "[b]{}", "[b] {\n}\n", "") expectPrinted(t, "[b] {}", "[b] {\n}\n", "") expectPrinted(t, "a[b] {}", "a[b] {\n}\n", "") expectPrinted(t, "a [b] {}", "a [b] {\n}\n", "") expectPrinted(t, "[] {}", "[] {\n}\n", "<stdin>: WARNING: Expected identifier but found \"]\"\n") expectPrinted(t, "[b {}", "[b] {\n}\n", "<stdin>: WARNING: Expected \"]\" to go with \"[\"\n<stdin>: NOTE: The unbalanced \"[\" is here:\n") expectPrinted(t, "[b]] {}", "[b]] {\n}\n", "<stdin>: WARNING: Unexpected \"]\"\n") expectPrinted(t, "a[b {}", "a[b] {\n}\n", "<stdin>: WARNING: Expected \"]\" to go with \"[\"\n<stdin>: NOTE: The unbalanced \"[\" is here:\n") expectPrinted(t, "a[b]] {}", "a[b]] {\n}\n", "<stdin>: WARNING: Unexpected \"]\"\n") expectPrinted(t, "[b]a {}", "[b]a {\n}\n", "<stdin>: WARNING: Unexpected \"a\"\n") expectPrinted(t, "[|b]{}", "[b] {\n}\n", "") // "[|b]" is equivalent to "[b]" expectPrinted(t, "[*|b]{}", "[*|b] {\n}\n", "") expectPrinted(t, "[a|b]{}", "[a|b] {\n}\n", "") expectPrinted(t, "[a|b|=\"c\"]{}", "[a|b|=c] {\n}\n", "") expectPrinted(t, "[a|b |= \"c\"]{}", "[a|b|=c] {\n}\n", "") expectPrinted(t, "[a||b] {}", "[a||b] {\n}\n", "<stdin>: WARNING: Expected identifier but found \"|\"\n") expectPrinted(t, "[* | b] {}", "[* | b] {\n}\n", "<stdin>: WARNING: Expected \"|\" but found whitespace\n") expectPrinted(t, "[a | b] {}", "[a | b] {\n}\n", "<stdin>: WARNING: Expected \"=\" but found whitespace\n") expectPrinted(t, "[b=\"c\"] {}", "[b=c] {\n}\n", "") expectPrinted(t, "[b=\"c d\"] {}", "[b=\"c d\"] {\n}\n", "") expectPrinted(t, "[b=\"0c\"] {}", "[b=\"0c\"] {\n}\n", "") expectPrinted(t, "[b~=\"c\"] {}", "[b~=c] {\n}\n", "") expectPrinted(t, "[b^=\"c\"] {}", "[b^=c] {\n}\n", "") expectPrinted(t, "[b$=\"c\"] {}", "[b$=c] {\n}\n", "") expectPrinted(t, "[b*=\"c\"] {}", "[b*=c] {\n}\n", "") expectPrinted(t, "[b|=\"c\"] {}", "[b|=c] {\n}\n", "") expectPrinted(t, "[b?=\"c\"] {}", "[b?=\"c\"] {\n}\n", "<stdin>: WARNING: Expected \"]\" to go with \"[\"\n<stdin>: NOTE: The unbalanced \"[\" is here:\n") expectPrinted(t, "[b = \"c\"] {}", "[b=c] {\n}\n", "") expectPrinted(t, "[b ~= \"c\"] {}", "[b~=c] {\n}\n", "") expectPrinted(t, "[b ^= \"c\"] {}", "[b^=c] {\n}\n", "") expectPrinted(t, "[b $= \"c\"] {}", "[b$=c] {\n}\n", "") expectPrinted(t, "[b *= \"c\"] {}", "[b*=c] {\n}\n", "") expectPrinted(t, "[b |= \"c\"] {}", "[b|=c] {\n}\n", "") expectPrinted(t, "[b ?= \"c\"] {}", "[b ?= \"c\"] {\n}\n", "<stdin>: WARNING: Expected \"]\" to go with \"[\"\n<stdin>: NOTE: The unbalanced \"[\" is here:\n") expectPrinted(t, "[b = \"c\" i] {}", "[b=c i] {\n}\n", "") expectPrinted(t, "[b = \"c\" I] {}", "[b=c I] {\n}\n", "") expectPrinted(t, "[b = \"c\" s] {}", "[b=c s] {\n}\n", "") expectPrinted(t, "[b = \"c\" S] {}", "[b=c S] {\n}\n", "") expectPrinted(t, "[b i] {}", "[b i] {\n}\n", "<stdin>: WARNING: Expected \"]\" to go with \"[\"\n<stdin>: NOTE: The unbalanced \"[\" is here:\n") expectPrinted(t, "[b I] {}", "[b I] {\n}\n", "<stdin>: WARNING: Expected \"]\" to go with \"[\"\n<stdin>: NOTE: The unbalanced \"[\" is here:\n") expectPrinted(t, "[b s] {}", "[b s] {\n}\n", "<stdin>: WARNING: Expected \"]\" to go with \"[\"\n<stdin>: NOTE: The unbalanced \"[\" is here:\n") expectPrinted(t, "[b S] {}", "[b S] {\n}\n", "<stdin>: WARNING: Expected \"]\" to go with \"[\"\n<stdin>: NOTE: The unbalanced \"[\" is here:\n") expectPrinted(t, "|b {}", "|b {\n}\n", "") expectPrinted(t, "|* {}", "|* {\n}\n", "") expectPrinted(t, "a|b {}", "a|b {\n}\n", "") expectPrinted(t, "a|* {}", "a|* {\n}\n", "") expectPrinted(t, "*|b {}", "*|b {\n}\n", "") expectPrinted(t, "*|* {}", "*|* {\n}\n", "") expectPrinted(t, "a||b {}", "a||b {\n}\n", "<stdin>: WARNING: Expected identifier but found \"|\"\n") expectPrinted(t, "a+b {}", "a + b {\n}\n", "") expectPrinted(t, "a>b {}", "a > b {\n}\n", "") expectPrinted(t, "a+b {}", "a + b {\n}\n", "") expectPrinted(t, "a~b {}", "a ~ b {\n}\n", "") expectPrinted(t, "a + b {}", "a + b {\n}\n", "") expectPrinted(t, "a > b {}", "a > b {\n}\n", "") expectPrinted(t, "a + b {}", "a + b {\n}\n", "") expectPrinted(t, "a ~ b {}", "a ~ b {\n}\n", "") expectPrinted(t, "::b {}", "::b {\n}\n", "") expectPrinted(t, "*::b {}", "*::b {\n}\n", "") expectPrinted(t, "a::b {}", "a::b {\n}\n", "") expectPrinted(t, "::b(c) {}", "::b(c) {\n}\n", "") expectPrinted(t, "*::b(c) {}", "*::b(c) {\n}\n", "") expectPrinted(t, "a::b(c) {}", "a::b(c) {\n}\n", "") expectPrinted(t, "a:b:c {}", "a:b:c {\n}\n", "") expectPrinted(t, "a:b(:c) {}", "a:b(:c) {\n}\n", "") expectPrinted(t, "a: b {}", "a: b {\n}\n", "<stdin>: WARNING: Expected identifier but found whitespace\n") expectPrinted(t, ":is(a)b {}", ":is(a)b {\n}\n", "<stdin>: WARNING: Unexpected \"b\"\n") expectPrinted(t, "a:b( c ) {}", "a:b(c) {\n}\n", "") expectPrinted(t, "a:b( c , d ) {}", "a:b(c, d) {\n}\n", "") expectPrinted(t, "a:is( c ) {}", "a:is(c) {\n}\n", "") expectPrinted(t, "a:is( c , d ) {}", "a:is(c, d) {\n}\n", "") // These test cases previously caused a hang (see path_to_url expectPrinted(t, ":x(", ":x() {\n}\n", "<stdin>: WARNING: Unexpected end of file\n") expectPrinted(t, ":x( {}", ":x({}) {\n}\n", "<stdin>: WARNING: Expected \")\" to go with \"(\"\n<stdin>: NOTE: The unbalanced \"(\" is here:\n") expectPrinted(t, ":x(, :y() {}", ":x(, :y() {}) {\n}\n", "<stdin>: WARNING: Expected \")\" to go with \"(\"\n<stdin>: NOTE: The unbalanced \"(\" is here:\n") expectPrinted(t, "#id {}", "#id {\n}\n", "") expectPrinted(t, "#--0 {}", "#--0 {\n}\n", "") expectPrinted(t, "#\\-0 {}", "#\\-0 {\n}\n", "") expectPrinted(t, "#\\30 {}", "#\\30 {\n}\n", "") expectPrinted(t, "div#id {}", "div#id {\n}\n", "") expectPrinted(t, "div#--0 {}", "div#--0 {\n}\n", "") expectPrinted(t, "div#\\-0 {}", "div#\\-0 {\n}\n", "") expectPrinted(t, "div#\\30 {}", "div#\\30 {\n}\n", "") expectPrinted(t, "#0 {}", "#0 {\n}\n", "<stdin>: WARNING: Unexpected \"#0\"\n") expectPrinted(t, "#-0 {}", "#-0 {\n}\n", "<stdin>: WARNING: Unexpected \"#-0\"\n") expectPrinted(t, "div#0 {}", "div#0 {\n}\n", "<stdin>: WARNING: Unexpected \"#0\"\n") expectPrinted(t, "div#-0 {}", "div#-0 {\n}\n", "<stdin>: WARNING: Unexpected \"#-0\"\n") expectPrinted(t, "div::before::after::selection::first-line::first-letter {color:red}", "div::before::after::selection::first-line::first-letter {\n color: red;\n}\n", "") expectPrintedMangle(t, "div::before::after::selection::first-line::first-letter {color:red}", "div:before:after::selection:first-line:first-letter {\n color: red;\n}\n", "") // Make sure '-' and '\\' consume an ident-like token instead of a name expectPrinted(t, "_:-ms-lang(x) {}", "_:-ms-lang(x) {\n}\n", "") expectPrinted(t, "_:\\ms-lang(x) {}", "_:ms-lang(x) {\n}\n", "") expectPrinted(t, ":local(a, b) {}", ":local(a, b) {\n}\n", "<stdin>: WARNING: Unexpected \",\" inside \":local(...)\"\n"+ "NOTE: Different CSS tools behave differently in this case, so esbuild doesn't allow it. Either remove "+ "this comma or split this selector up into multiple comma-separated \":local(...)\" selectors instead.\n") expectPrinted(t, ":global(a, b) {}", ":global(a, b) {\n}\n", "<stdin>: WARNING: Unexpected \",\" inside \":global(...)\"\n"+ "NOTE: Different CSS tools behave differently in this case, so esbuild doesn't allow it. Either remove "+ "this comma or split this selector up into multiple comma-separated \":global(...)\" selectors instead.\n") } func TestNestedSelector(t *testing.T) { sassWarningWrap := "NOTE: CSS nesting syntax does not allow the \"&\" selector to come before " + "a type selector. You can wrap this selector in \":is(...)\" as a workaround. " + "This restriction exists to avoid problems with SASS nesting, where the same syntax " + "means something very different that has no equivalent in real CSS (appending a suffix to the parent selector).\n" sassWarningMove := "NOTE: CSS nesting syntax does not allow the \"&\" selector to come before " + "a type selector. You can move the \"&\" to the end of this selector as a workaround. " + "This restriction exists to avoid problems with SASS nesting, where the same syntax " + "means something very different that has no equivalent in real CSS (appending a suffix to the parent selector).\n" expectPrinted(t, "& {}", "& {\n}\n", "") expectPrinted(t, "& b {}", "& b {\n}\n", "") expectPrinted(t, "&:b {}", "&:b {\n}\n", "") expectPrinted(t, "&* {}", "&* {\n}\n", "<stdin>: WARNING: Cannot use type selector \"*\" directly after nesting selector \"&\"\n"+sassWarningWrap) expectPrinted(t, "&|b {}", "&|b {\n}\n", "<stdin>: WARNING: Cannot use type selector \"|b\" directly after nesting selector \"&\"\n"+sassWarningWrap) expectPrinted(t, "&*|b {}", "&*|b {\n}\n", "<stdin>: WARNING: Cannot use type selector \"*|b\" directly after nesting selector \"&\"\n"+sassWarningWrap) expectPrinted(t, "&a|b {}", "&a|b {\n}\n", "<stdin>: WARNING: Cannot use type selector \"a|b\" directly after nesting selector \"&\"\n"+sassWarningWrap) expectPrinted(t, "&[a] {}", "&[a] {\n}\n", "") expectPrinted(t, "a { & {} }", "a {\n & {\n }\n}\n", "") expectPrinted(t, "a { & b {} }", "a {\n & b {\n }\n}\n", "") expectPrinted(t, "a { &:b {} }", "a {\n &:b {\n }\n}\n", "") expectPrinted(t, "a { &* {} }", "a {\n &* {\n }\n}\n", "<stdin>: WARNING: Cannot use type selector \"*\" directly after nesting selector \"&\"\n"+sassWarningWrap) expectPrinted(t, "a { &|b {} }", "a {\n &|b {\n }\n}\n", "<stdin>: WARNING: Cannot use type selector \"|b\" directly after nesting selector \"&\"\n"+sassWarningWrap) expectPrinted(t, "a { &*|b {} }", "a {\n &*|b {\n }\n}\n", "<stdin>: WARNING: Cannot use type selector \"*|b\" directly after nesting selector \"&\"\n"+sassWarningWrap) expectPrinted(t, "a { &a|b {} }", "a {\n &a|b {\n }\n}\n", "<stdin>: WARNING: Cannot use type selector \"a|b\" directly after nesting selector \"&\"\n"+sassWarningWrap) expectPrinted(t, "a { &[b] {} }", "a {\n &[b] {\n }\n}\n", "") expectPrinted(t, "a { && {} }", "a {\n & {\n }\n}\n", "") expectPrinted(t, "a { & + & {} }", "a {\n & + & {\n }\n}\n", "") expectPrinted(t, "a { & > & {} }", "a {\n & > & {\n }\n}\n", "") expectPrinted(t, "a { & ~ & {} }", "a {\n & ~ & {\n }\n}\n", "") expectPrinted(t, "a { & + c& {} }", "a {\n & + c& {\n }\n}\n", "") expectPrinted(t, "a { .b& + & {} }", "a {\n &.b + & {\n }\n}\n", "") expectPrinted(t, "a { .b& + c& {} }", "a {\n &.b + c& {\n }\n}\n", "") expectPrinted(t, "a { & + & > & ~ & {} }", "a {\n & + & > & ~ & {\n }\n}\n", "") // CSS nesting works for all tokens except identifiers and functions expectPrinted(t, "a { .b {} }", "a {\n .b {\n }\n}\n", "") expectPrinted(t, "a { #b {} }", "a {\n #b {\n }\n}\n", "") expectPrinted(t, "a { :b {} }", "a {\n :b {\n }\n}\n", "") expectPrinted(t, "a { [b] {} }", "a {\n [b] {\n }\n}\n", "") expectPrinted(t, "a { * {} }", "a {\n * {\n }\n}\n", "") expectPrinted(t, "a { |b {} }", "a {\n |b {\n }\n}\n", "") expectPrinted(t, "a { >b {} }", "a {\n > b {\n }\n}\n", "") expectPrinted(t, "a { +b {} }", "a {\n + b {\n }\n}\n", "") expectPrinted(t, "a { ~b {} }", "a {\n ~ b {\n }\n}\n", "") expectPrinted(t, "a { b {} }", "a {\n b {\n }\n}\n", "") expectPrinted(t, "a { b() {} }", "a {\n b() {\n }\n}\n", "<stdin>: WARNING: Unexpected \"b(\"\n") // Note: CSS nesting no longer requires each complex selector to contain "&" expectPrinted(t, "a { & b, c {} }", "a {\n & b,\n c {\n }\n}\n", "") expectPrinted(t, "a { & b, & c {} }", "a {\n & b,\n & c {\n }\n}\n", "") // Note: CSS nesting no longer requires the rule to be nested inside a parent // (instead un-nested CSS nesting refers to ":scope" or to ":root") expectPrinted(t, "& b, c {}", "& b,\nc {\n}\n", "") expectPrinted(t, "& b, & c {}", "& b,\n& c {\n}\n", "") expectPrinted(t, "b & {}", "b & {\n}\n", "") expectPrinted(t, "b &, c {}", "b &,\nc {\n}\n", "") expectPrinted(t, "a { .b & { color: red } }", "a {\n .b & {\n color: red;\n }\n}\n", "") expectPrinted(t, "a { .b& { color: red } }", "a {\n &.b {\n color: red;\n }\n}\n", "") expectPrinted(t, "a { .b&[c] { color: red } }", "a {\n &.b[c] {\n color: red;\n }\n}\n", "") expectPrinted(t, "a { &[c] { color: red } }", "a {\n &[c] {\n color: red;\n }\n}\n", "") expectPrinted(t, "a { [c]& { color: red } }", "a {\n &[c] {\n color: red;\n }\n}\n", "") expectPrintedMinify(t, "a { .b & { color: red } }", "a{.b &{color:red}}", "") expectPrintedMinify(t, "a { .b& { color: red } }", "a{&.b{color:red}}", "") // Nested at-rules expectPrinted(t, "a { @media screen { color: red } }", "a {\n @media screen {\n color: red;\n }\n}\n", "") expectPrinted(t, "a { @media screen { .b { color: green } color: red } }", "a {\n @media screen {\n .b {\n color: green;\n }\n color: red;\n }\n}\n", "") expectPrinted(t, "a { @media screen { color: red; .b { color: green } } }", "a {\n @media screen {\n color: red;\n .b {\n color: green;\n }\n }\n}\n", "") expectPrinted(t, "html { @layer base { block-size: 100%; @layer support { & body { min-block-size: 100%; } } } }", "html {\n @layer base {\n block-size: 100%;\n @layer support {\n & body {\n min-block-size: 100%;\n }\n }\n }\n}\n", "") expectPrinted(t, ".card { aspect-ratio: 3/4; @scope (&) { :scope { border: 1px solid white } } }", ".card {\n aspect-ratio: 3/4;\n @scope (&) {\n :scope {\n border: 1px solid white;\n }\n }\n}\n", "") // Minify an implicit leading "&" expectPrintedMangle(t, "& { color: red }", "& {\n color: red;\n}\n", "") expectPrintedMangle(t, "& a { color: red }", "a {\n color: red;\n}\n", "") expectPrintedMangle(t, "& a, & b { color: red }", "a,\nb {\n color: red;\n}\n", "") expectPrintedMangle(t, "& a, b { color: red }", "a,\nb {\n color: red;\n}\n", "") expectPrintedMangle(t, "a, & b { color: red }", "a,\nb {\n color: red;\n}\n", "") expectPrintedMangle(t, "& &a { color: red }", "& &a {\n color: red;\n}\n", "<stdin>: WARNING: Cannot use type selector \"a\" directly after nesting selector \"&\"\n"+sassWarningMove) expectPrintedMangle(t, "& .x { color: red }", ".x {\n color: red;\n}\n", "") expectPrintedMangle(t, "& &.x { color: red }", "& &.x {\n color: red;\n}\n", "") expectPrintedMangle(t, "& + a { color: red }", "+ a {\n color: red;\n}\n", "") expectPrintedMangle(t, "& + a& { color: red }", "+ a& {\n color: red;\n}\n", "") expectPrintedMangle(t, "&.x { color: red }", "&.x {\n color: red;\n}\n", "") expectPrintedMangle(t, "a & { color: red }", "a & {\n color: red;\n}\n", "") expectPrintedMangle(t, ".x & { color: red }", ".x & {\n color: red;\n}\n", "") expectPrintedMangle(t, "div { & a { color: red } }", "div {\n & a {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div { & .x { color: red } }", "div {\n .x {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div { & .x, & a { color: red } }", "div {\n .x,\n a {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div { .x, & a { color: red } }", "div {\n .x,\n a {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div { & a& { color: red } }", "div {\n & a& {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div { & .x { color: red } }", "div {\n .x {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div { & &.x { color: red } }", "div {\n & &.x {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div { & + a { color: red } }", "div {\n + a {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div { & + a& { color: red } }", "div {\n + a& {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div { .x & { color: red } }", "div {\n .x & {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "@media screen { & div { color: red } }", "@media screen {\n div {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "a { @media screen { & div { color: red } } }", "a {\n @media screen {\n & div {\n color: red;\n }\n }\n}\n", "") // Reorder selectors to enable removing "&" expectPrintedMangle(t, "reorder { & first, .second { color: red } }", "reorder {\n .second,\n first {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "reorder { & first, & .second { color: red } }", "reorder {\n .second,\n first {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "reorder { & first, #second { color: red } }", "reorder {\n #second,\n first {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "reorder { & first, [second] { color: red } }", "reorder {\n [second],\n first {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "reorder { & first, :second { color: red } }", "reorder {\n :second,\n first {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "reorder { & first, + second { color: red } }", "reorder {\n + second,\n first {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "reorder { & first, ~ second { color: red } }", "reorder {\n ~ second,\n first {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "reorder { & first, > second { color: red } }", "reorder {\n > second,\n first {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "reorder { & first, second, .third { color: red } }", "reorder {\n .third,\n second,\n first {\n color: red;\n }\n}\n", "") // Inline no-op nesting expectPrintedMangle(t, "div { & { color: red } }", "div {\n color: red;\n}\n", "") expectPrintedMangle(t, "div { && { color: red } }", "div {\n color: red;\n}\n", "") expectPrintedMangle(t, "div { zoom: 2; & { color: red } }", "div {\n zoom: 2;\n color: red;\n}\n", "") expectPrintedMangle(t, "div { zoom: 2; && { color: red } }", "div {\n zoom: 2;\n color: red;\n}\n", "") expectPrintedMangle(t, "div { &, && { color: red } zoom: 2 }", "div {\n zoom: 2;\n color: red;\n}\n", "") expectPrintedMangle(t, "div { &&, & { color: red } zoom: 2 }", "div {\n zoom: 2;\n color: red;\n}\n", "") expectPrintedMangle(t, "div { a: 1; & { b: 4 } b: 2; && { c: 5 } c: 3 }", "div {\n a: 1;\n b: 2;\n c: 3;\n b: 4;\n c: 5;\n}\n", "") expectPrintedMangle(t, "div { .b { x: 1 } & { x: 2 } }", "div {\n .b {\n x: 1;\n }\n x: 2;\n}\n", "") expectPrintedMangle(t, "div { & { & { & { color: red } } & { & { zoom: 2 } } } }", "div {\n color: red;\n zoom: 2;\n}\n", "") // Cannot inline no-op nesting with pseudo-elements (path_to_url expectPrintedMangle(t, "div, span:hover { & { color: red } }", "div,\nspan:hover {\n color: red;\n}\n", "") expectPrintedMangle(t, "div, span::before { & { color: red } }", "div,\nspan:before {\n & {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div, span:before { & { color: red } }", "div,\nspan:before {\n & {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div, span::after { & { color: red } }", "div,\nspan:after {\n & {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div, span:after { & { color: red } }", "div,\nspan:after {\n & {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div, span::first-line { & { color: red } }", "div,\nspan:first-line {\n & {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div, span:first-line { & { color: red } }", "div,\nspan:first-line {\n & {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div, span::first-letter { & { color: red } }", "div,\nspan:first-letter {\n & {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div, span:first-letter { & { color: red } }", "div,\nspan:first-letter {\n & {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div, span::pseudo { & { color: red } }", "div,\nspan::pseudo {\n & {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div, span:hover { @layer foo { & { color: red } } }", "div,\nspan:hover {\n @layer foo {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div, span:hover { @media screen { & { color: red } } }", "div,\nspan:hover {\n @media screen {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "div, span::pseudo { @layer foo { & { color: red } } }", "div,\nspan::pseudo {\n @layer foo {\n & {\n color: red;\n }\n }\n}\n", "") expectPrintedMangle(t, "div, span::pseudo { @media screen { & { color: red } } }", "div,\nspan::pseudo {\n @media screen {\n & {\n color: red;\n }\n }\n}\n", "") // Lowering tests for nesting nestingWarningIs := "<stdin>: WARNING: Transforming this CSS nesting syntax is not supported in the configured target environment\n" + "NOTE: The nesting transform for this case must generate an \":is(...)\" but the configured target environment does not support the \":is\" pseudo-class.\n" nesting := compat.Nesting everything := ^compat.CSSFeature(0) expectPrintedLowerUnsupported(t, nesting, ".foo { .bar { color: red } }", ".foo .bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo { &.bar { color: red } }", ".foo.bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo { & .bar { color: red } }", ".foo .bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo .bar { .baz { color: red } }", ".foo .bar .baz {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo .bar { &.baz { color: red } }", ".foo .bar.baz {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo .bar { & .baz { color: red } }", ".foo .bar .baz {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo .bar { & > .baz { color: red } }", ".foo .bar > .baz {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo .bar { .baz & { color: red } }", ".baz :is(.foo .bar) {\n color: red;\n}\n", "") // NOT the same as ".baz .foo .bar expectPrintedLowerUnsupported(t, nesting, ".foo .bar { & .baz & { color: red } }", ".foo .bar .baz :is(.foo .bar) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo, .bar { .baz & { color: red } }", ".baz :is(.foo, .bar) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".foo, .bar { .baz & { color: red } }", ".baz .foo,\n.baz .bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo, [bar~='abc'] { .baz { color: red } }", ":is(.foo, [bar~=abc]) .baz {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".foo, [bar~='abc'] { .baz { color: red } }", ".foo .baz,\n[bar~=abc] .baz {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo, [bar~='a b c'] { .baz { color: red } }", ":is(.foo, [bar~=\"a b c\"]) .baz {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".foo, [bar~='a b c'] { .baz { color: red } }", ".foo .baz,\n[bar~=\"a b c\"] .baz {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".baz { .foo, .bar { color: red } }", ".baz :is(.foo, .bar) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".baz { .foo, .bar { color: red } }", ".baz .foo,\n.baz .bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".baz { .foo, & .bar { color: red } }", ".baz :is(.foo, .bar) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".baz { .foo, & .bar { color: red } }", ".baz .foo,\n.baz .bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".baz { & .foo, .bar { color: red } }", ".baz :is(.foo, .bar) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".baz { & .foo, .bar { color: red } }", ".baz .foo,\n.baz .bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".baz { & .foo, & .bar { color: red } }", ".baz :is(.foo, .bar) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".baz { & .foo, & .bar { color: red } }", ".baz .foo,\n.baz .bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".baz { .foo, &.bar { color: red } }", ".baz .foo,\n.baz.bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".baz { &.foo, .bar { color: red } }", ".baz.foo,\n.baz .bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".baz { &.foo, &.bar { color: red } }", ".baz:is(.foo, .bar) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".baz { &.foo, &.bar { color: red } }", ".baz.foo,\n.baz.bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo { color: blue; & .bar { color: red } }", ".foo {\n color: blue;\n}\n.foo .bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo { & .bar { color: red } color: blue }", ".foo {\n color: blue;\n}\n.foo .bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo { color: blue; & .bar { color: red } zoom: 2 }", ".foo {\n color: blue;\n zoom: 2;\n}\n.foo .bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".a, .b { .c, .d { color: red } }", ":is(.a, .b) :is(.c, .d) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".a, .b { .c, .d { color: red } }", ".a .c,\n.a .d,\n.b .c,\n.b .d {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".a, .b { & > & { color: red } }", ":is(.a, .b) > :is(.a, .b) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".a, .b { & > & { color: red } }", ".a > .a,\n.a > .b,\n.b > .a,\n.b > .b {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".a { color: red; > .b { color: green; > .c { color: blue } } }", ".a {\n color: red;\n}\n.a > .b {\n color: green;\n}\n.a > .b > .c {\n color: blue;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "> .a { color: red; > .b { color: green; > .c { color: blue } } }", "> .a {\n color: red;\n}\n> .a > .b {\n color: green;\n}\n> .a > .b > .c {\n color: blue;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo, .bar, .foo:before, .bar:after { &:hover { color: red } }", ":is(.foo, .bar):hover {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".foo, .bar, .foo:before, .bar:after { &:hover { color: red } }", ".foo:hover,\n.bar:hover {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo, .bar:before { &:hover { color: red } }", ".foo:hover {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo, .bar:before { :hover & { color: red } }", ":hover .foo {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".bar:before { &:hover { color: red } }", ":is():hover {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".bar:before { :hover & { color: red } }", ":hover :is() {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo { &:after, & .bar { color: red } }", ".foo:after,\n.foo .bar {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo { & .bar, &:after { color: red } }", ".foo .bar,\n.foo:after {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".xy { :where(&.foo) { color: red } }", ":where(.xy.foo) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "div { :where(&.foo) { color: red } }", ":where(div.foo) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".xy { :where(.foo&) { color: red } }", ":where(.xy.foo) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "div { :where(.foo&) { color: red } }", ":where(div.foo) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".xy { :where([href]&) { color: red } }", ":where(.xy[href]) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "div { :where([href]&) { color: red } }", ":where(div[href]) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".xy { :where(:hover&) { color: red } }", ":where(.xy:hover) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "div { :where(:hover&) { color: red } }", ":where(div:hover) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".xy { :where(:is(.foo)&) { color: red } }", ":where(.xy:is(.foo)) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "div { :where(:is(.foo)&) { color: red } }", ":where(div:is(.foo)) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".xy { :where(.foo + &) { color: red } }", ":where(.foo + .xy) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "div { :where(.foo + &) { color: red } }", ":where(.foo + div) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".xy { :where(&, span:is(.foo &)) { color: red } }", ":where(.xy, span:is(.foo .xy)) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "div { :where(&, span:is(.foo &)) { color: red } }", ":where(div, span:is(.foo div)) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "&, a { color: red }", ":scope,\na {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "&, a { .b { color: red } }", ":is(:scope, a) .b {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, "&, a { .b { color: red } }", ":scope .b,\na .b {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "&, a { .b { .c { color: red } } }", ":is(:scope, a) .b .c {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, "&, a { .b { .c { color: red } } }", ":scope .b .c,\na .b .c {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "a { > b, > c { color: red } }", "a > :is(b, c) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, "a { > b, > c { color: red } }", "a > b,\na > c {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "a { > b, + c { color: red } }", "a > b,\na + c {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "a { & > b, & > c { color: red } }", "a > :is(b, c) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, "a { & > b, & > c { color: red } }", "a > b,\na > c {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "a { & > b, & + c { color: red } }", "a > b,\na + c {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "a { > b&, > c& { color: red } }", "a > :is(a:is(b), a:is(c)) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, "a { > b&, > c& { color: red } }", "a > a:is(b),\na > a:is(c) {\n color: red;\n}\n", nestingWarningIs+nestingWarningIs) expectPrintedLowerUnsupported(t, nesting, "a { > b&, + c& { color: red } }", "a > a:is(b),\na + a:is(c) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "a { > &.b, > &.c { color: red } }", "a > :is(a.b, a.c) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, "a { > &.b, > &.c { color: red } }", "a > a.b,\na > a.c {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "a { > &.b, + &.c { color: red } }", "a > a.b,\na + a.c {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".a { > b&, > c& { color: red } }", ".a > :is(b.a, c.a) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".a { > b&, > c& { color: red } }", ".a > b.a,\n.a > c.a {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".a { > b&, + c& { color: red } }", ".a > b.a,\n.a + c.a {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".a { > &.b, > &.c { color: red } }", ".a > :is(.a.b, .a.c) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".a { > &.b, > &.c { color: red } }", ".a > .a.b,\n.a > .a.c {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".a { > &.b, + &.c { color: red } }", ".a > .a.b,\n.a + .a.c {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "~ .a { > &.b, > &.c { color: red } }", "~ .a > :is(.a.b, .a.c) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, "~ .a { > &.b, > &.c { color: red } }", "~ .a > .a.b,\n~ .a > .a.c {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, "~ .a { > &.b, + &.c { color: red } }", "~ .a > .a.b,\n~ .a + .a.c {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".foo .bar { > &.a, > &.b { color: red } }", ".foo .bar > :is(.foo .bar.a, .foo .bar.b) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, everything, ".foo .bar { > &.a, > &.b { color: red } }", ".foo .bar > :is(.foo .bar).a,\n.foo .bar > :is(.foo .bar).b {\n color: red;\n}\n", nestingWarningIs+nestingWarningIs) expectPrintedLowerUnsupported(t, nesting, ".foo .bar { > &.a, + &.b { color: red } }", ".foo .bar > :is(.foo .bar).a,\n.foo .bar + :is(.foo .bar).b {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".demo { .lg { &.triangle, &.circle { color: red } } }", ".demo .lg:is(.triangle, .circle) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".demo { .lg { .triangle, .circle { color: red } } }", ".demo .lg :is(.triangle, .circle) {\n color: red;\n}\n", "") expectPrintedLowerUnsupported(t, nesting, ".card { .featured & & & { color: red } }", ".featured .card .card .card {\n color: red;\n}\n", "") // These are invalid SASS-style nested suffixes expectPrintedLower(t, ".card { &--header { color: red } }", ".card {\n &--header {\n color: red;\n }\n}\n", "<stdin>: WARNING: Cannot use type selector \"--header\" directly after nesting selector \"&\"\n"+sassWarningWrap) expectPrintedLower(t, ".card { &__header { color: red } }", ".card {\n &__header {\n color: red;\n }\n}\n", "<stdin>: WARNING: Cannot use type selector \"__header\" directly after nesting selector \"&\"\n"+sassWarningWrap) expectPrintedLower(t, ".card { .nav &--header { color: red } }", ".card {\n .nav &--header {\n color: red;\n }\n}\n", "<stdin>: WARNING: Cannot use type selector \"--header\" directly after nesting selector \"&\"\n"+sassWarningMove) expectPrintedLower(t, ".card { .nav &__header { color: red } }", ".card {\n .nav &__header {\n color: red;\n }\n}\n", "<stdin>: WARNING: Cannot use type selector \"__header\" directly after nesting selector \"&\"\n"+sassWarningMove) expectPrinted(t, ".card { &__header { color: red } }", ".card {\n &__header {\n color: red;\n }\n}\n", "<stdin>: WARNING: Cannot use type selector \"__header\" directly after nesting selector \"&\"\n"+sassWarningWrap) expectPrinted(t, ".card { .nav &__header { color: red } }", ".card {\n .nav &__header {\n color: red;\n }\n}\n", "<stdin>: WARNING: Cannot use type selector \"__header\" directly after nesting selector \"&\"\n"+sassWarningMove) expectPrinted(t, ".card { .nav, &__header { color: red } }", ".card {\n .nav, &__header {\n color: red;\n }\n}\n", "<stdin>: WARNING: Cannot use type selector \"__header\" directly after nesting selector \"&\"\n"+sassWarningMove) // Check pseudo-elements (those coming through "&" must be dropped) expectPrintedLower(t, "a, b::before { &.foo { color: red } }", "a.foo {\n color: red;\n}\n", "") expectPrintedLower(t, "a, b::before { & .foo { color: red } }", "a .foo {\n color: red;\n}\n", "") expectPrintedLower(t, "a { &.foo, &::before { color: red } }", "a.foo,\na::before {\n color: red;\n}\n", "") expectPrintedLower(t, "a { & .foo, & ::before { color: red } }", "a .foo,\na ::before {\n color: red;\n}\n", "") expectPrintedLower(t, "a, b::before { color: blue; &.foo, &::after { color: red } }", "a,\nb::before {\n color: blue;\n}\na.foo,\na::after {\n color: red;\n}\n", "") // Test at-rules expectPrintedLower(t, ".foo { @media screen {} }", "", "") expectPrintedLower(t, ".foo { @media screen { color: red } }", "@media screen {\n .foo {\n color: red;\n }\n}\n", "") expectPrintedLower(t, ".foo { @media screen { &:hover { color: red } } }", "@media screen {\n .foo:hover {\n color: red;\n }\n}\n", "") expectPrintedLower(t, ".foo { @media screen { :hover { color: red } } }", "@media screen {\n .foo :hover {\n color: red;\n }\n}\n", "") expectPrintedLower(t, ".foo, .bar { @media screen { color: red } }", "@media screen {\n .foo,\n .bar {\n color: red;\n }\n}\n", "") expectPrintedLower(t, ".foo, .bar { @media screen { &:hover { color: red } } }", "@media screen {\n .foo:hover,\n .bar:hover {\n color: red;\n }\n}\n", "") expectPrintedLower(t, ".foo, .bar { @media screen { :hover { color: red } } }", "@media screen {\n .foo :hover,\n .bar :hover {\n color: red;\n }\n}\n", "") expectPrintedLower(t, ".foo { @layer xyz {} }", "@layer xyz;\n", "") expectPrintedLower(t, ".foo { @layer xyz { color: red } }", "@layer xyz {\n .foo {\n color: red;\n }\n}\n", "") expectPrintedLower(t, ".foo { @layer xyz { &:hover { color: red } } }", "@layer xyz {\n .foo:hover {\n color: red;\n }\n}\n", "") expectPrintedLower(t, ".foo { @layer xyz { :hover { color: red } } }", "@layer xyz {\n .foo :hover {\n color: red;\n }\n}\n", "") expectPrintedLower(t, ".foo, .bar { @layer xyz { color: red } }", "@layer xyz {\n .foo,\n .bar {\n color: red;\n }\n}\n", "") expectPrintedLower(t, ".foo, .bar { @layer xyz { &:hover { color: red } } }", "@layer xyz {\n .foo:hover,\n .bar:hover {\n color: red;\n }\n}\n", "") expectPrintedLower(t, ".foo, .bar { @layer xyz { :hover { color: red } } }", "@layer xyz {\n .foo :hover,\n .bar :hover {\n color: red;\n }\n}\n", "") expectPrintedLower(t, "@media screen { @media (min-width: 900px) { a, b { &:hover { color: red } } } }", "@media screen {\n @media (min-width: 900px) {\n a:hover,\n b:hover {\n color: red;\n }\n }\n}\n", "") expectPrintedLower(t, "@supports (display: flex) { @supports selector(h2 > p) { a, b { &:hover { color: red } } } }", "@supports (display: flex) {\n @supports selector(h2 > p) {\n a:hover,\n b:hover {\n color: red;\n }\n }\n}\n", "") expectPrintedLower(t, "@layer foo { @layer bar { a, b { &:hover { color: red } } } }", "@layer foo {\n @layer bar {\n a:hover,\n b:hover {\n color: red;\n }\n }\n}\n", "") expectPrintedLower(t, ".card { @supports (selector(&)) { &:hover { color: red } } }", "@supports (selector(&)) {\n .card:hover {\n color: red;\n }\n}\n", "") expectPrintedLower(t, "html { @layer base { color: blue; @layer support { & body { color: red } } } }", "@layer base {\n html {\n color: blue;\n }\n @layer support {\n html body {\n color: red;\n }\n }\n}\n", "") // path_to_url#issuecomment-1549874958 expectPrinted(t, "@media screen { a { x: y } x: y; b { x: y } }", "@media screen {\n a {\n x: y;\n }\n x: y;\n b {\n x: y;\n }\n}\n", "") expectPrinted(t, ":root { @media screen { a { x: y } x: y; b { x: y } } }", ":root {\n @media screen {\n a {\n x: y;\n }\n x: y;\n b {\n x: y;\n }\n }\n}\n", "") } func TestBadQualifiedRules(t *testing.T) { expectPrinted(t, "$bad: rule;", "$bad: rule; {\n}\n", "<stdin>: WARNING: Unexpected \"$\"\n") expectPrinted(t, "$bad: rule; div { color: red }", "$bad: rule; div {\n color: red;\n}\n", "<stdin>: WARNING: Unexpected \"$\"\n") expectPrinted(t, "$bad { color: red }", "$bad {\n color: red;\n}\n", "<stdin>: WARNING: Unexpected \"$\"\n") expectPrinted(t, "a { div.major { color: blue } color: red }", "a {\n div.major {\n color: blue;\n }\n color: red;\n}\n", "") expectPrinted(t, "a { div:hover { color: blue } color: red }", "a {\n div:hover {\n color: blue;\n }\n color: red;\n}\n", "") expectPrinted(t, "a { div:hover { color: blue }; color: red }", "a {\n div:hover {\n color: blue;\n }\n color: red;\n}\n", "") expectPrinted(t, "a { div:hover { color: blue } ; color: red }", "a {\n div:hover {\n color: blue;\n }\n color: red;\n}\n", "") expectPrinted(t, "! { x: y; }", "! {\n x: y;\n}\n", "<stdin>: WARNING: Unexpected \"!\"\n") expectPrinted(t, "! { x: {} }", "! {\n x: {\n }\n}\n", "<stdin>: WARNING: Unexpected \"!\"\n<stdin>: WARNING: Expected identifier but found whitespace\n") expectPrinted(t, "a { *width: 100%; height: 1px }", "a {\n *width: 100%;\n height: 1px;\n}\n", "<stdin>: WARNING: Expected identifier but found \"*\"\n") expectPrinted(t, "a { garbage; height: 1px }", "a {\n garbage;\n height: 1px;\n}\n", "<stdin>: WARNING: Expected \":\"\n") expectPrinted(t, "a { !; height: 1px }", "a {\n !;\n height: 1px;\n}\n", "<stdin>: WARNING: Expected identifier but found \"!\"\n") } func TestAtRule(t *testing.T) { expectPrinted(t, "@unknown", "@unknown;\n", "<stdin>: WARNING: Expected \"{\" but found end of file\n") expectPrinted(t, "@unknown;", "@unknown;\n", "") expectPrinted(t, "@unknown{}", "@unknown {}\n", "") expectPrinted(t, "@unknown x;", "@unknown x;\n", "") expectPrinted(t, "@unknown{\na: b;\nc: d;\n}", "@unknown { a: b; c: d; }\n", "") expectPrinted(t, "@unknown", "@unknown;\n", "<stdin>: WARNING: Expected \"{\" but found end of file\n") expectPrinted(t, "@", "@ {\n}\n", "<stdin>: WARNING: Unexpected \"@\"\n") expectPrinted(t, "@;", "@; {\n}\n", "<stdin>: WARNING: Unexpected \"@\"\n") expectPrinted(t, "@{}", "@ {\n}\n", "<stdin>: WARNING: Unexpected \"@\"\n") expectPrinted(t, "@viewport { width: 100vw }", "@viewport {\n width: 100vw;\n}\n", "") expectPrinted(t, "@-ms-viewport { width: 100vw }", "@-ms-viewport {\n width: 100vw;\n}\n", "") expectPrinted(t, "@document url(\"path_to_url") { h1 { color: green } }", "@document url(path_to_url {\n h1 {\n color: green;\n }\n}\n", "") expectPrinted(t, "@-moz-document url-prefix() { h1 { color: green } }", "@-moz-document url-prefix() {\n h1 {\n color: green;\n }\n}\n", "") expectPrinted(t, "@media foo { bar }", "@media foo {\n bar {\n }\n}\n", "<stdin>: WARNING: Unexpected \"}\"\n") expectPrinted(t, "@media foo { bar {}", "@media foo {\n bar {\n }\n}\n", "<stdin>: WARNING: Expected \"}\" to go with \"{\"\n<stdin>: NOTE: The unbalanced \"{\" is here:\n") expectPrinted(t, "@media foo {", "@media foo {\n}\n", "<stdin>: WARNING: Expected \"}\" to go with \"{\"\n<stdin>: NOTE: The unbalanced \"{\" is here:\n") expectPrinted(t, "@media foo", "@media foo {\n}\n", "<stdin>: WARNING: Expected \"{\" but found end of file\n") expectPrinted(t, "@media", "@media {\n}\n", "<stdin>: WARNING: Expected \"{\" but found end of file\n") // path_to_url#syntax-page-selector expectPrinted(t, ` @page :first { margin: 0 } @page { @top-left-corner { content: 'tlc' } @top-left { content: 'tl' } @top-center { content: 'tc' } @top-right { content: 'tr' } @top-right-corner { content: 'trc' } @bottom-left-corner { content: 'blc' } @bottom-left { content: 'bl' } @bottom-center { content: 'bc' } @bottom-right { content: 'br' } @bottom-right-corner { content: 'brc' } @left-top { content: 'lt' } @left-middle { content: 'lm' } @left-bottom { content: 'lb' } @right-top { content: 'rt' } @right-middle { content: 'rm' } @right-bottom { content: 'rb' } } `, `@page :first { margin: 0; } @page { @top-left-corner { content: "tlc"; } @top-left { content: "tl"; } @top-center { content: "tc"; } @top-right { content: "tr"; } @top-right-corner { content: "trc"; } @bottom-left-corner { content: "blc"; } @bottom-left { content: "bl"; } @bottom-center { content: "bc"; } @bottom-right { content: "br"; } @bottom-right-corner { content: "brc"; } @left-top { content: "lt"; } @left-middle { content: "lm"; } @left-bottom { content: "lb"; } @right-top { content: "rt"; } @right-middle { content: "rm"; } @right-bottom { content: "rb"; } } `, "") // path_to_url#font-palette-values expectPrinted(t, ` @font-palette-values --Augusta { font-family: Handover Sans; base-palette: 3; override-colors: 1 rgb(43, 12, 9), 2 #000, 3 var(--highlight) } `, `@font-palette-values --Augusta { font-family: Handover Sans; base-palette: 3; override-colors: 1 rgb(43, 12, 9), 2 #000, 3 var(--highlight); } `, "") // path_to_url#container-rule expectPrinted(t, ` @container my-layout (inline-size > 45em) { .foo { color: skyblue; } } `, `@container my-layout (inline-size > 45em) { .foo { color: skyblue; } } `, "") expectPrintedMinify(t, `@container card ( inline-size > 30em ) and style( --responsive = true ) { .foo { color: skyblue; } }`, "@container card (inline-size > 30em) and style(--responsive = true){.foo{color:skyblue}}", "") expectPrintedMangleMinify(t, `@supports ( container-type: size ) { @container ( width <= 150px ) { #inner { background-color: skyblue; } } }`, "@supports (container-type: size){@container (width <= 150px){#inner{background-color:#87ceeb}}}", "") // path_to_url#defining-before-change-style-the-starting-style-rule expectPrinted(t, ` @starting-style { h1 { background-color: transparent; } @layer foo { div { height: 100px; } } } `, `@starting-style { h1 { background-color: transparent; } @layer foo { div { height: 100px; } } } `, "") expectPrintedMinify(t, `@starting-style { h1 { background-color: transparent; } }`, "@starting-style{h1{background-color:transparent}}", "") // path_to_url#the-counter-style-rule expectPrinted(t, ` @counter-style box-corner { system: fixed; symbols: ; suffix: ': ' } `, `@counter-style box-corner { system: fixed; symbols: ; suffix: ": "; } `, "") // path_to_url#font-feature-values expectPrinted(t, ` @font-feature-values Roboto { font-display: swap; } `, `@font-feature-values Roboto { font-display: swap; } `, "") expectPrinted(t, ` @font-feature-values Bongo { @swash { ornate: 1 } } `, `@font-feature-values Bongo { @swash { ornate: 1; } } `, "") // path_to_url#at-ruledef-position-try expectPrinted(t, `@position-try --foo { top: 0 }`, `@position-try --foo { top: 0; } `, "") expectPrintedMinify(t, `@position-try --foo { top: 0; }`, `@position-try --foo{top:0}`, "") } func TestAtCharset(t *testing.T) { expectPrinted(t, "@charset \"UTF-8\";", "@charset \"UTF-8\";\n", "") expectPrinted(t, "@charset 'UTF-8';", "@charset \"UTF-8\";\n", "") expectPrinted(t, "@charset \"utf-8\";", "@charset \"utf-8\";\n", "") expectPrinted(t, "@charset \"Utf-8\";", "@charset \"Utf-8\";\n", "") expectPrinted(t, "@charset \"US-ASCII\";", "@charset \"US-ASCII\";\n", "<stdin>: WARNING: \"UTF-8\" will be used instead of unsupported charset \"US-ASCII\"\n") expectPrinted(t, "@charset;", "@charset;\n", "<stdin>: WARNING: Expected whitespace but found \";\"\n") expectPrinted(t, "@charset ;", "@charset;\n", "<stdin>: WARNING: Expected string token but found \";\"\n") expectPrinted(t, "@charset\"UTF-8\";", "@charset \"UTF-8\";\n", "<stdin>: WARNING: Expected whitespace but found \"\\\"UTF-8\\\"\"\n") expectPrinted(t, "@charset \"UTF-8\"", "@charset \"UTF-8\";\n", "<stdin>: WARNING: Expected \";\" but found end of file\n") expectPrinted(t, "@charset url(UTF-8);", "@charset url(UTF-8);\n", "<stdin>: WARNING: Expected string token but found \"url(UTF-8)\"\n") expectPrinted(t, "@charset url(\"UTF-8\");", "@charset url(UTF-8);\n", "<stdin>: WARNING: Expected string token but found \"url(\"\n") expectPrinted(t, "@charset \"UTF-8\" ", "@charset \"UTF-8\";\n", "<stdin>: WARNING: Expected \";\" but found whitespace\n") expectPrinted(t, "@charset \"UTF-8\"{}", "@charset \"UTF-8\";\n {\n}\n", "<stdin>: WARNING: Expected \";\" but found \"{\"\n") } func TestAtImport(t *testing.T) { expectPrinted(t, "@import\"foo.css\";", "@import \"foo.css\";\n", "") expectPrinted(t, "@import \"foo.css\";", "@import \"foo.css\";\n", "") expectPrinted(t, "@import \"foo.css\" ;", "@import \"foo.css\";\n", "") expectPrinted(t, "@import url();", "@import \"\";\n", "") expectPrinted(t, "@import url(foo.css);", "@import \"foo.css\";\n", "") expectPrinted(t, "@import url(foo.css) ;", "@import \"foo.css\";\n", "") expectPrinted(t, "@import url( foo.css );", "@import \"foo.css\";\n", "") expectPrinted(t, "@import url(\"foo.css\");", "@import \"foo.css\";\n", "") expectPrinted(t, "@import url(\"foo.css\") ;", "@import \"foo.css\";\n", "") expectPrinted(t, "@import url( \"foo.css\" );", "@import \"foo.css\";\n", "") expectPrinted(t, "@import url(\"foo.css\") print;", "@import \"foo.css\" print;\n", "") expectPrinted(t, "@import url(\"foo.css\") screen and (orientation:landscape);", "@import \"foo.css\" screen and (orientation:landscape);\n", "") expectPrinted(t, "@import;", "@import;\n", "<stdin>: WARNING: Expected URL token but found \";\"\n") expectPrinted(t, "@import ;", "@import;\n", "<stdin>: WARNING: Expected URL token but found \";\"\n") expectPrinted(t, "@import \"foo.css\"", "@import \"foo.css\";\n", "<stdin>: WARNING: Expected \";\" but found end of file\n") expectPrinted(t, "@import url(\"foo.css\" extra-stuff);", "@import url(\"foo.css\" extra-stuff);\n", "<stdin>: WARNING: Expected URL token but found \"url(\"\n") expectPrinted(t, "@import url(\"foo.css\";", "@import url(\"foo.css\";);\n", "<stdin>: WARNING: Expected URL token but found \"url(\"\n<stdin>: WARNING: Expected \")\" to go with \"(\"\n<stdin>: NOTE: The unbalanced \"(\" is here:\n") expectPrinted(t, "@import noturl(\"foo.css\");", "@import noturl(\"foo.css\");\n", "<stdin>: WARNING: Expected URL token but found \"noturl(\"\n") expectPrinted(t, "@import url(foo.css", "@import \"foo.css\";\n", `<stdin>: WARNING: Expected ")" to end URL token <stdin>: NOTE: The unbalanced "(" is here: <stdin>: WARNING: Expected ";" but found end of file `) expectPrinted(t, "@import \"foo.css\" {}", "@import \"foo.css\" {}\n", "<stdin>: WARNING: Expected \";\"\n") expectPrinted(t, "@import \"foo\"\na { color: red }\nb { color: blue }", "@import \"foo\" a { color: red }\nb {\n color: blue;\n}\n", "<stdin>: WARNING: Expected \";\"\n") expectPrinted(t, "a { @import \"foo.css\" }", "a {\n @import \"foo.css\";\n}\n", "<stdin>: WARNING: \"@import\" is only valid at the top level\n<stdin>: WARNING: Expected \";\"\n") } func TestLegalComment(t *testing.T) { expectPrinted(t, "/*!*/@import \"x\";", "/*!*/\n@import \"x\";\n", "") expectPrinted(t, "/*!*/@charset \"UTF-8\";", "/*!*/\n@charset \"UTF-8\";\n", "") expectPrinted(t, "/*!*/ @import \"x\";", "/*!*/\n@import \"x\";\n", "") expectPrinted(t, "/*!*/ @charset \"UTF-8\";", "/*!*/\n@charset \"UTF-8\";\n", "") expectPrinted(t, "/*!*/ @charset \"UTF-8\"; @import \"x\";", "/*!*/\n@charset \"UTF-8\";\n@import \"x\";\n", "") expectPrinted(t, "/*!*/ @import \"x\"; @charset \"UTF-8\";", "/*!*/\n@import \"x\";\n@charset \"UTF-8\";\n", "<stdin>: WARNING: \"@charset\" must be the first rule in the file\n"+ "<stdin>: NOTE: This rule cannot come before a \"@charset\" rule\n") expectPrinted(t, "@import \"x\";/*!*/", "@import \"x\";\n/*!*/\n", "") expectPrinted(t, "@charset \"UTF-8\";/*!*/", "@charset \"UTF-8\";\n/*!*/\n", "") expectPrinted(t, "@import \"x\"; /*!*/", "@import \"x\";\n/*!*/\n", "") expectPrinted(t, "@charset \"UTF-8\"; /*!*/", "@charset \"UTF-8\";\n/*!*/\n", "") expectPrinted(t, "/*! before */ a { --b: var(--c, /*!*/ /*!*/); } /*! after */\n", "/*! before */\na {\n --b: var(--c, );\n}\n/*! after */\n", "") } func TestAtKeyframes(t *testing.T) { expectPrinted(t, "@keyframes {}", "@keyframes {}\n", "<stdin>: WARNING: Expected identifier but found \"{\"\n") expectPrinted(t, "@keyframes name{}", "@keyframes name {\n}\n", "") expectPrinted(t, "@keyframes name {}", "@keyframes name {\n}\n", "") expectPrinted(t, "@keyframes name{0%,50%{color:red}25%,75%{color:blue}}", "@keyframes name {\n 0%, 50% {\n color: red;\n }\n 25%, 75% {\n color: blue;\n }\n}\n", "") expectPrinted(t, "@keyframes name { 0%, 50% { color: red } 25%, 75% { color: blue } }", "@keyframes name {\n 0%, 50% {\n color: red;\n }\n 25%, 75% {\n color: blue;\n }\n}\n", "") expectPrinted(t, "@keyframes name{from{color:red}to{color:blue}}", "@keyframes name {\n from {\n color: red;\n }\n to {\n color: blue;\n }\n}\n", "") expectPrinted(t, "@keyframes name { from { color: red } to { color: blue } }", "@keyframes name {\n from {\n color: red;\n }\n to {\n color: blue;\n }\n}\n", "") // Note: Strings as names is allowed in the CSS specification and works in // Firefox and Safari but Chrome has strangely decided to deliberately not // support this. We always turn all string names into identifiers to avoid // them silently breaking in Chrome. expectPrinted(t, "@keyframes 'name' {}", "@keyframes name {\n}\n", "") expectPrinted(t, "@keyframes 'name 2' {}", "@keyframes name\\ 2 {\n}\n", "") expectPrinted(t, "@keyframes 'none' {}", "@keyframes \"none\" {}\n", "") expectPrinted(t, "@keyframes 'None' {}", "@keyframes \"None\" {}\n", "") expectPrinted(t, "@keyframes 'unset' {}", "@keyframes \"unset\" {}\n", "") expectPrinted(t, "@keyframes 'revert' {}", "@keyframes \"revert\" {}\n", "") expectPrinted(t, "@keyframes None {}", "@keyframes None {}\n", "<stdin>: WARNING: Cannot use \"None\" as a name for \"@keyframes\" without quotes\n"+ "NOTE: You can put \"None\" in quotes to prevent it from becoming a CSS keyword.\n") expectPrinted(t, "@keyframes REVERT {}", "@keyframes REVERT {}\n", "<stdin>: WARNING: Cannot use \"REVERT\" as a name for \"@keyframes\" without quotes\n"+ "NOTE: You can put \"REVERT\" in quotes to prevent it from becoming a CSS keyword.\n") expectPrinted(t, "@keyframes name { from { color: red } }", "@keyframes name {\n from {\n color: red;\n }\n}\n", "") expectPrinted(t, "@keyframes name { 100% { color: red } }", "@keyframes name {\n 100% {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "@keyframes name { from { color: red } }", "@keyframes name {\n 0% {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "@keyframes name { 100% { color: red } }", "@keyframes name {\n to {\n color: red;\n }\n}\n", "") expectPrinted(t, "@-webkit-keyframes name {}", "@-webkit-keyframes name {\n}\n", "") expectPrinted(t, "@-moz-keyframes name {}", "@-moz-keyframes name {\n}\n", "") expectPrinted(t, "@-ms-keyframes name {}", "@-ms-keyframes name {\n}\n", "") expectPrinted(t, "@-o-keyframes name {}", "@-o-keyframes name {\n}\n", "") expectPrinted(t, "@keyframes {}", "@keyframes {}\n", "<stdin>: WARNING: Expected identifier but found \"{\"\n") expectPrinted(t, "@keyframes name { 0% 100% {} }", "@keyframes name { 0% 100% {} }\n", "<stdin>: WARNING: Expected \",\" but found \"100%\"\n") expectPrinted(t, "@keyframes name { {} 0% {} }", "@keyframes name { {} 0% {} }\n", "<stdin>: WARNING: Expected percentage but found \"{\"\n") expectPrinted(t, "@keyframes name { 100 {} }", "@keyframes name { 100 {} }\n", "<stdin>: WARNING: Expected percentage but found \"100\"\n") expectPrinted(t, "@keyframes name { into {} }", "@keyframes name {\n into {\n }\n}\n", "<stdin>: WARNING: Expected percentage but found \"into\"\n") expectPrinted(t, "@keyframes name { 1,2 {} }", "@keyframes name { 1, 2 {} }\n", "<stdin>: WARNING: Expected percentage but found \"1\"\n") expectPrinted(t, "@keyframes name { 1, 2 {} }", "@keyframes name { 1, 2 {} }\n", "<stdin>: WARNING: Expected percentage but found \"1\"\n") expectPrinted(t, "@keyframes name { 1 ,2 {} }", "@keyframes name { 1, 2 {} }\n", "<stdin>: WARNING: Expected percentage but found \"1\"\n") expectPrinted(t, "@keyframes name { 1%, {} }", "@keyframes name { 1%, {} }\n", "<stdin>: WARNING: Expected percentage but found \"{\"\n") expectPrinted(t, "@keyframes name { 1%, x {} }", "@keyframes name {\n 1%, x {\n }\n}\n", "<stdin>: WARNING: Expected percentage but found \"x\"\n") expectPrinted(t, "@keyframes name { 1%, ! {} }", "@keyframes name { 1%, ! {} }\n", "<stdin>: WARNING: Expected percentage but found \"!\"\n") expectPrinted(t, "@keyframes name { .x {} }", "@keyframes name { .x {} }\n", "<stdin>: WARNING: Expected percentage but found \".\"\n") expectPrinted(t, "@keyframes name { {} }", "@keyframes name { {} }\n", "<stdin>: WARNING: Expected percentage but found \"{\"\n") expectPrinted(t, "@keyframes name { 1% }", "@keyframes name { 1% }\n", "<stdin>: WARNING: Expected \"{\" but found \"}\"\n") expectPrinted(t, "@keyframes name { 1%", "@keyframes name { 1% }\n", "<stdin>: WARNING: Expected \"{\" but found end of file\n") expectPrinted(t, "@keyframes name { 1%,,2% {} }", "@keyframes name { 1%,, 2% {} }\n", "<stdin>: WARNING: Expected percentage but found \",\"\n") expectPrinted(t, "@keyframes name {", "@keyframes name {}\n", "<stdin>: WARNING: Expected \"}\" to go with \"{\"\n<stdin>: NOTE: The unbalanced \"{\" is here:\n") expectPrinted(t, "@keyframes x { 1%, {} } @keyframes z { 1% {} }", "@keyframes x { 1%, {} }\n@keyframes z {\n 1% {\n }\n}\n", "<stdin>: WARNING: Expected percentage but found \"{\"\n") expectPrinted(t, "@keyframes x { .y {} } @keyframes z { 1% {} }", "@keyframes x { .y {} }\n@keyframes z {\n 1% {\n }\n}\n", "<stdin>: WARNING: Expected percentage but found \".\"\n") expectPrinted(t, "@keyframes x { x {} } @keyframes z { 1% {} }", "@keyframes x {\n x {\n }\n}\n@keyframes z {\n 1% {\n }\n}\n", "<stdin>: WARNING: Expected percentage but found \"x\"\n") expectPrinted(t, "@keyframes x { {} } @keyframes z { 1% {} }", "@keyframes x { {} }\n@keyframes z {\n 1% {\n }\n}\n", "<stdin>: WARNING: Expected percentage but found \"{\"\n") expectPrinted(t, "@keyframes x { 1% {}", "@keyframes x { 1% {} }\n", "<stdin>: WARNING: Expected \"}\" to go with \"{\"\n<stdin>: NOTE: The unbalanced \"{\" is here:\n") expectPrinted(t, "@keyframes x { 1% {", "@keyframes x { 1% {} }\n", "<stdin>: WARNING: Expected \"}\" to go with \"{\"\n<stdin>: NOTE: The unbalanced \"{\" is here:\n") expectPrinted(t, "@keyframes x { 1%", "@keyframes x { 1% }\n", "<stdin>: WARNING: Expected \"{\" but found end of file\n") expectPrinted(t, "@keyframes x {", "@keyframes x {}\n", "<stdin>: WARNING: Expected \"}\" to go with \"{\"\n<stdin>: NOTE: The unbalanced \"{\" is here:\n") } func TestAnimationName(t *testing.T) { // Note: Strings as names is allowed in the CSS specification and works in // Firefox and Safari but Chrome has strangely decided to deliberately not // support this. We always turn all string names into identifiers to avoid // them silently breaking in Chrome. expectPrinted(t, "div { animation-name: 'name' }", "div {\n animation-name: name;\n}\n", "") expectPrinted(t, "div { animation-name: 'name 2' }", "div {\n animation-name: name\\ 2;\n}\n", "") expectPrinted(t, "div { animation-name: 'none' }", "div {\n animation-name: \"none\";\n}\n", "") expectPrinted(t, "div { animation-name: 'None' }", "div {\n animation-name: \"None\";\n}\n", "") expectPrinted(t, "div { animation-name: 'unset' }", "div {\n animation-name: \"unset\";\n}\n", "") expectPrinted(t, "div { animation-name: 'revert' }", "div {\n animation-name: \"revert\";\n}\n", "") expectPrinted(t, "div { animation-name: none }", "div {\n animation-name: none;\n}\n", "") expectPrinted(t, "div { animation-name: unset }", "div {\n animation-name: unset;\n}\n", "") expectPrinted(t, "div { animation: 2s linear 'name 2', 3s infinite 'name 3' }", "div {\n animation: 2s linear name\\ 2, 3s infinite name\\ 3;\n}\n", "") } func TestAtRuleValidation(t *testing.T) { expectPrinted(t, "a {} b {} c {} @charset \"UTF-8\";", "a {\n}\nb {\n}\nc {\n}\n@charset \"UTF-8\";\n", "<stdin>: WARNING: \"@charset\" must be the first rule in the file\n"+ "<stdin>: NOTE: This rule cannot come before a \"@charset\" rule\n") expectPrinted(t, "a {} b {} c {} @import \"foo\";", "a {\n}\nb {\n}\nc {\n}\n@import \"foo\";\n", "<stdin>: WARNING: All \"@import\" rules must come first\n"+ "<stdin>: NOTE: This rule cannot come before an \"@import\" rule\n") } func TestAtLayer(t *testing.T) { expectPrinted(t, "@layer a, b;", "@layer a, b;\n", "") expectPrinted(t, "@layer a {}", "@layer a {\n}\n", "") expectPrinted(t, "@layer {}", "@layer {\n}\n", "") expectPrinted(t, "@layer a, b {}", "@layer a, b {\n}\n", "<stdin>: WARNING: Expected \";\"\n") expectPrinted(t, "@layer;", "@layer;\n", "<stdin>: WARNING: Unexpected \";\"\n") expectPrinted(t, "@layer , b {}", "@layer , b {\n}\n", "<stdin>: WARNING: Unexpected \",\"\n") expectPrinted(t, "@layer a", "@layer a;\n", "<stdin>: WARNING: Expected \";\" but found end of file\n") expectPrinted(t, "@layer a { @layer b }", "@layer a {\n @layer b;\n}\n", "<stdin>: WARNING: Expected \";\"\n") expectPrinted(t, "@layer a b", "@layer a b;\n", "<stdin>: WARNING: Unexpected \"b\"\n<stdin>: WARNING: Expected \";\" but found end of file\n") expectPrinted(t, "@layer a b ;", "@layer a b;\n", "<stdin>: WARNING: Unexpected \"b\"\n") expectPrinted(t, "@layer a b {}", "@layer a b {\n}\n", "<stdin>: WARNING: Unexpected \"b\"\n") expectPrinted(t, "@layer a, b;", "@layer a, b;\n", "") expectPrinted(t, "@layer a {}", "@layer a {\n}\n", "") expectPrinted(t, "@layer {}", "@layer {\n}\n", "") expectPrinted(t, "@layer foo { div { color: red } }", "@layer foo {\n div {\n color: red;\n }\n}\n", "") // Check semicolon error recovery expectPrinted(t, "@layer", "@layer;\n", "<stdin>: WARNING: Expected \";\" but found end of file\n") expectPrinted(t, "@layer a", "@layer a;\n", "<stdin>: WARNING: Expected \";\" but found end of file\n") expectPrinted(t, "@layer a { @layer }", "@layer a {\n @layer;\n}\n", "<stdin>: WARNING: Expected \";\"\n") expectPrinted(t, "@layer a { @layer b }", "@layer a {\n @layer b;\n}\n", "<stdin>: WARNING: Expected \";\"\n") expectPrintedMangle(t, "@layer", "@layer;\n", "<stdin>: WARNING: Expected \";\" but found end of file\n") expectPrintedMangle(t, "@layer a", "@layer a;\n", "<stdin>: WARNING: Expected \";\" but found end of file\n") expectPrintedMangle(t, "@layer a { @layer }", "@layer a {\n @layer;\n}\n", "<stdin>: WARNING: Expected \";\"\n") expectPrintedMangle(t, "@layer a { @layer b }", "@layer a.b;\n", "<stdin>: WARNING: Expected \";\"\n") // Check mangling expectPrintedMangle(t, "@layer foo { div {} }", "@layer foo;\n", "") expectPrintedMangle(t, "@layer foo { div { color: yellow } }", "@layer foo {\n div {\n color: #ff0;\n }\n}\n", "") expectPrintedMangle(t, "@layer a { @layer b {} }", "@layer a.b;\n", "") expectPrintedMangle(t, "@layer a { @layer {} }", "@layer a {\n @layer {\n }\n}\n", "") expectPrintedMangle(t, "@layer { @layer a {} }", "@layer {\n @layer a;\n}\n", "") expectPrintedMangle(t, "@layer a.b { @layer c.d {} }", "@layer a.b.c.d;\n", "") expectPrintedMangle(t, "@layer a.b { @layer c.d {} @layer e.f {} }", "@layer a.b {\n @layer c.d;\n @layer e.f;\n}\n", "") expectPrintedMangle(t, "@layer a.b { @layer c.d { e { f: g } } }", "@layer a.b.c.d {\n e {\n f: g;\n }\n}\n", "") // Invalid layer names should not be merged, since that causes the rule to // become invalid. It would be a change in semantics if we merged an invalid // rule with a valid rule since then the other valid rule would be invalid. initial := "<stdin>: WARNING: \"initial\" cannot be used as a layer name\n" inherit := "<stdin>: WARNING: \"inherit\" cannot be used as a layer name\n" unset := "<stdin>: WARNING: \"unset\" cannot be used as a layer name\n" expectPrinted(t, "@layer foo { @layer initial; }", "@layer foo {\n @layer initial;\n}\n", initial) expectPrinted(t, "@layer foo { @layer inherit; }", "@layer foo {\n @layer inherit;\n}\n", inherit) expectPrinted(t, "@layer foo { @layer unset; }", "@layer foo {\n @layer unset;\n}\n", unset) expectPrinted(t, "@layer initial { @layer foo; }", "@layer initial {\n @layer foo;\n}\n", initial) expectPrinted(t, "@layer inherit { @layer foo; }", "@layer inherit {\n @layer foo;\n}\n", inherit) expectPrinted(t, "@layer unset { @layer foo; }", "@layer unset {\n @layer foo;\n}\n", unset) expectPrintedMangle(t, "@layer foo { @layer initial { a { b: c } } }", "@layer foo {\n @layer initial {\n a {\n b: c;\n }\n }\n}\n", initial) expectPrintedMangle(t, "@layer initial { @layer foo { a { b: c } } }", "@layer initial {\n @layer foo {\n a {\n b: c;\n }\n }\n}\n", initial) // Order matters here. Do not drop the first "@layer a;" or the order will be changed. expectPrintedMangle(t, "@layer a; @layer b; @layer a;", "@layer a;\n@layer b;\n@layer a;\n", "") // Validate ordering with "@layer" and "@import" expectPrinted(t, "@layer a; @import url(b);", "@layer a;\n@import \"b\";\n", "") expectPrinted(t, "@layer a; @layer b; @import url(c);", "@layer a;\n@layer b;\n@import \"c\";\n", "") expectPrinted(t, "@layer a {} @import url(b);", "@layer a {\n}\n@import url(b);\n", "<stdin>: WARNING: All \"@import\" rules must come first\n<stdin>: NOTE: This rule cannot come before an \"@import\" rule\n") expectPrinted(t, "@import url(a); @layer b; @import url(c);", "@import \"a\";\n@layer b;\n@import url(c);\n", "<stdin>: WARNING: All \"@import\" rules must come first\n<stdin>: NOTE: This rule cannot come before an \"@import\" rule\n") expectPrinted(t, "@layer a; @charset \"UTF-8\";", "@layer a;\n@charset \"UTF-8\";\n", "<stdin>: WARNING: \"@charset\" must be the first rule in the file\n<stdin>: NOTE: This rule cannot come before a \"@charset\" rule\n") } func TestEmptyRule(t *testing.T) { expectPrinted(t, "div {}", "div {\n}\n", "") expectPrinted(t, "@media screen {}", "@media screen {\n}\n", "") expectPrinted(t, "@page { @top-left {} }", "@page {\n @top-left {\n }\n}\n", "") expectPrinted(t, "@keyframes test { from {} to {} }", "@keyframes test {\n from {\n }\n to {\n }\n}\n", "") expectPrintedMangle(t, "div {}", "", "") expectPrintedMangle(t, "@media screen {}", "", "") expectPrintedMangle(t, "@page { @top-left {} }", "", "") expectPrintedMangle(t, "@keyframes test { from {} to {} }", "@keyframes test {\n}\n", "") expectPrinted(t, "$invalid {}", "$invalid {\n}\n", "<stdin>: WARNING: Unexpected \"$\"\n") expectPrinted(t, "@page { color: red; @top-left {} }", "@page {\n color: red;\n @top-left {\n }\n}\n", "") expectPrinted(t, "@keyframes test { from {} to { color: red } }", "@keyframes test {\n from {\n }\n to {\n color: red;\n }\n}\n", "") expectPrinted(t, "@keyframes test { from { color: red } to {} }", "@keyframes test {\n from {\n color: red;\n }\n to {\n }\n}\n", "") expectPrintedMangle(t, "$invalid {}", "$invalid {\n}\n", "<stdin>: WARNING: Unexpected \"$\"\n") expectPrintedMangle(t, "@page { color: red; @top-left {} }", "@page {\n color: red;\n}\n", "") expectPrintedMangle(t, "@keyframes test { from {} to { color: red } }", "@keyframes test {\n to {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "@keyframes test { from { color: red } to {} }", "@keyframes test {\n 0% {\n color: red;\n }\n}\n", "") expectPrintedMangleMinify(t, "$invalid {}", "$invalid{}", "<stdin>: WARNING: Unexpected \"$\"\n") expectPrintedMangleMinify(t, "@page { color: red; @top-left {} }", "@page{color:red}", "") expectPrintedMangleMinify(t, "@keyframes test { from {} to { color: red } }", "@keyframes test{to{color:red}}", "") expectPrintedMangleMinify(t, "@keyframes test { from { color: red } to {} }", "@keyframes test{0%{color:red}}", "") expectPrinted(t, "invalid", "invalid {\n}\n", "<stdin>: WARNING: Expected \"{\" but found end of file\n") expectPrinted(t, "invalid }", "invalid } {\n}\n", "<stdin>: WARNING: Unexpected \"}\"\n") } func TestMarginAndPaddingAndInset(t *testing.T) { for _, x := range []string{"margin", "padding", "inset"} { xTop := x + "-top" xRight := x + "-right" xBottom := x + "-bottom" xLeft := x + "-left" if x == "inset" { xTop = "top" xRight = "right" xBottom = "bottom" xLeft = "left" } expectPrinted(t, "a { "+x+": 0 1px 0 1px }", "a {\n "+x+": 0 1px 0 1px;\n}\n", "") expectPrinted(t, "a { "+x+": 0 1px 0px 1px }", "a {\n "+x+": 0 1px 0px 1px;\n}\n", "") expectPrintedMangle(t, "a { "+xTop+": 0px }", "a {\n "+xTop+": 0;\n}\n", "") expectPrintedMangle(t, "a { "+xRight+": 0px }", "a {\n "+xRight+": 0;\n}\n", "") expectPrintedMangle(t, "a { "+xBottom+": 0px }", "a {\n "+xBottom+": 0;\n}\n", "") expectPrintedMangle(t, "a { "+xLeft+": 0px }", "a {\n "+xLeft+": 0;\n}\n", "") expectPrintedMangle(t, "a { "+xTop+": 1px }", "a {\n "+xTop+": 1px;\n}\n", "") expectPrintedMangle(t, "a { "+xRight+": 1px }", "a {\n "+xRight+": 1px;\n}\n", "") expectPrintedMangle(t, "a { "+xBottom+": 1px }", "a {\n "+xBottom+": 1px;\n}\n", "") expectPrintedMangle(t, "a { "+xLeft+": 1px }", "a {\n "+xLeft+": 1px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 0 1px 0 0 }", "a {\n "+x+": 0 1px 0 0;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 0 1px 2px 1px }", "a {\n "+x+": 0 1px 2px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 0 1px 0 1px }", "a {\n "+x+": 0 1px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 0 0 0 0 }", "a {\n "+x+": 0;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 0 0 0 0 !important }", "a {\n "+x+": 0 !important;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 0 1px 0px 1px }", "a {\n "+x+": 0 1px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 0 1 0px 1px }", "a {\n "+x+": 0 1 0px 1px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 1px 2px 3px 4px; "+xTop+": 5px }", "a {\n "+x+": 5px 2px 3px 4px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 1px 2px 3px 4px; "+xRight+": 5px }", "a {\n "+x+": 1px 5px 3px 4px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 1px 2px 3px 4px; "+xBottom+": 5px }", "a {\n "+x+": 1px 2px 5px 4px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 1px 2px 3px 4px; "+xLeft+": 5px }", "a {\n "+x+": 1px 2px 3px 5px;\n}\n", "") expectPrintedMangle(t, "a { "+xTop+": 5px; "+x+": 1px 2px 3px 4px }", "a {\n "+x+": 1px 2px 3px 4px;\n}\n", "") expectPrintedMangle(t, "a { "+xRight+": 5px; "+x+": 1px 2px 3px 4px }", "a {\n "+x+": 1px 2px 3px 4px;\n}\n", "") expectPrintedMangle(t, "a { "+xBottom+": 5px; "+x+": 1px 2px 3px 4px }", "a {\n "+x+": 1px 2px 3px 4px;\n}\n", "") expectPrintedMangle(t, "a { "+xLeft+": 5px; "+x+": 1px 2px 3px 4px }", "a {\n "+x+": 1px 2px 3px 4px;\n}\n", "") expectPrintedMangle(t, "a { "+xTop+": 1px; "+xTop+": 2px }", "a {\n "+xTop+": 2px;\n}\n", "") expectPrintedMangle(t, "a { "+xRight+": 1px; "+xRight+": 2px }", "a {\n "+xRight+": 2px;\n}\n", "") expectPrintedMangle(t, "a { "+xBottom+": 1px; "+xBottom+": 2px }", "a {\n "+xBottom+": 2px;\n}\n", "") expectPrintedMangle(t, "a { "+xLeft+": 1px; "+xLeft+": 2px }", "a {\n "+xLeft+": 2px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 1px; "+x+": 2px !important }", "a {\n "+x+": 1px;\n "+x+": 2px !important;\n}\n", "") expectPrintedMangle(t, "a { "+xTop+": 1px; "+xTop+": 2px !important }", "a {\n "+xTop+": 1px;\n "+xTop+": 2px !important;\n}\n", "") expectPrintedMangle(t, "a { "+xRight+": 1px; "+xRight+": 2px !important }", "a {\n "+xRight+": 1px;\n "+xRight+": 2px !important;\n}\n", "") expectPrintedMangle(t, "a { "+xBottom+": 1px; "+xBottom+": 2px !important }", "a {\n "+xBottom+": 1px;\n "+xBottom+": 2px !important;\n}\n", "") expectPrintedMangle(t, "a { "+xLeft+": 1px; "+xLeft+": 2px !important }", "a {\n "+xLeft+": 1px;\n "+xLeft+": 2px !important;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 1px !important; "+x+": 2px }", "a {\n "+x+": 1px !important;\n "+x+": 2px;\n}\n", "") expectPrintedMangle(t, "a { "+xTop+": 1px !important; "+xTop+": 2px }", "a {\n "+xTop+": 1px !important;\n "+xTop+": 2px;\n}\n", "") expectPrintedMangle(t, "a { "+xRight+": 1px !important; "+xRight+": 2px }", "a {\n "+xRight+": 1px !important;\n "+xRight+": 2px;\n}\n", "") expectPrintedMangle(t, "a { "+xBottom+": 1px !important; "+xBottom+": 2px }", "a {\n "+xBottom+": 1px !important;\n "+xBottom+": 2px;\n}\n", "") expectPrintedMangle(t, "a { "+xLeft+": 1px !important; "+xLeft+": 2px }", "a {\n "+xLeft+": 1px !important;\n "+xLeft+": 2px;\n}\n", "") expectPrintedMangle(t, "a { "+xTop+": 1px; "+xTop+": }", "a {\n "+xTop+": 1px;\n "+xTop+":;\n}\n", "") expectPrintedMangle(t, "a { "+xTop+": 1px; "+xTop+": 2px 3px }", "a {\n "+xTop+": 1px;\n "+xTop+": 2px 3px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 1px 2px 3px 4px; "+xLeft+": -4px; "+xRight+": -2px }", "a {\n "+x+": 1px -2px 3px -4px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 1px 2px; "+xTop+": 5px }", "a {\n "+x+": 5px 2px 1px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 1px; "+xTop+": 5px }", "a {\n "+x+": 5px 1px 1px;\n}\n", "") // This doesn't collapse because if the "calc" has an error it // will be ignored and the original rule will show through expectPrintedMangle(t, "a { "+x+": 1px 2px 3px 4px; "+xRight+": calc(1px + var(--x)) }", "a {\n "+x+": 1px 2px 3px 4px;\n "+xRight+": calc(1px + var(--x));\n}\n", "") expectPrintedMangle(t, "a { "+xLeft+": 1px; "+xRight+": 2px; "+xTop+": 3px; "+xBottom+": 4px }", "a {\n "+x+": 3px 2px 4px 1px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 1px 2px 3px 4px; "+xRight+": 5px !important }", "a {\n "+x+": 1px 2px 3px 4px;\n "+xRight+": 5px !important;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 1px 2px 3px 4px !important; "+xRight+": 5px }", "a {\n "+x+": 1px 2px 3px 4px !important;\n "+xRight+": 5px;\n}\n", "") expectPrintedMangle(t, "a { "+xLeft+": 1px !important; "+xRight+": 2px; "+xTop+": 3px !important; "+xBottom+": 4px }", "a {\n "+xLeft+": 1px !important;\n "+xRight+": 2px;\n "+xTop+": 3px !important;\n "+xBottom+": 4px;\n}\n", "") // This should not be changed because "--x" and "--z" could be empty expectPrintedMangle(t, "a { "+x+": var(--x) var(--y) var(--z) var(--y) }", "a {\n "+x+": var(--x) var(--y) var(--z) var(--y);\n}\n", "") // Don't merge different units expectPrintedMangle(t, "a { "+x+": 1px; "+x+": 2px; }", "a {\n "+x+": 2px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 1px; "+x+": 2vw; }", "a {\n "+x+": 1px;\n "+x+": 2vw;\n}\n", "") expectPrintedMangle(t, "a { "+xLeft+": 1px; "+xLeft+": 2px; }", "a {\n "+xLeft+": 2px;\n}\n", "") expectPrintedMangle(t, "a { "+xLeft+": 1px; "+xLeft+": 2vw; }", "a {\n "+xLeft+": 1px;\n "+xLeft+": 2vw;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 0 1px 2cm 3%; "+x+": 4px; }", "a {\n "+x+": 4px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 0 1px 2cm 3%; "+x+": 4vw; }", "a {\n "+x+": 0 1px 2cm 3%;\n "+x+": 4vw;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 0 1px 2cm 3%; "+xLeft+": 4px; }", "a {\n "+x+": 0 1px 2cm 4px;\n}\n", "") expectPrintedMangle(t, "a { "+x+": 0 1px 2cm 3%; "+xLeft+": 4vw; }", "a {\n "+x+": 0 1px 2cm 3%;\n "+xLeft+": 4vw;\n}\n", "") expectPrintedMangle(t, "a { "+xLeft+": 1Q; "+xRight+": 2Q; "+xTop+": 3Q; "+xBottom+": 4Q; }", "a {\n "+x+": 3Q 2Q 4Q 1Q;\n}\n", "") expectPrintedMangle(t, "a { "+xLeft+": 1Q; "+xRight+": 2Q; "+xTop+": 3Q; "+xBottom+": 0; }", "a {\n "+xLeft+": 1Q;\n "+xRight+": 2Q;\n "+xTop+": 3Q;\n "+xBottom+": 0;\n}\n", "") } // "auto" is the only keyword allowed in a quad, and only for "margin" and "inset" not for "padding" expectPrintedMangle(t, "a { margin: 1px auto 3px 4px; margin-left: auto }", "a {\n margin: 1px auto 3px;\n}\n", "") expectPrintedMangle(t, "a { inset: 1px auto 3px 4px; left: auto }", "a {\n inset: 1px auto 3px;\n}\n", "") expectPrintedMangle(t, "a { padding: 1px auto 3px 4px; padding-left: auto }", "a {\n padding: 1px auto 3px 4px;\n padding-left: auto;\n}\n", "") expectPrintedMangle(t, "a { margin: auto; margin-left: 1px }", "a {\n margin: auto auto auto 1px;\n}\n", "") expectPrintedMangle(t, "a { inset: auto; left: 1px }", "a {\n inset: auto auto auto 1px;\n}\n", "") expectPrintedMangle(t, "a { padding: auto; padding-left: 1px }", "a {\n padding: auto;\n padding-left: 1px;\n}\n", "") expectPrintedMangle(t, "a { margin: inherit; margin-left: 1px }", "a {\n margin: inherit;\n margin-left: 1px;\n}\n", "") expectPrintedMangle(t, "a { inset: inherit; left: 1px }", "a {\n inset: inherit;\n left: 1px;\n}\n", "") expectPrintedMangle(t, "a { padding: inherit; padding-left: 1px }", "a {\n padding: inherit;\n padding-left: 1px;\n}\n", "") expectPrintedLowerMangle(t, "a { top: 0; right: 0; bottom: 0; left: 0; }", "a {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n", "") // "inset" should be expanded when not supported expectPrintedLower(t, "a { inset: 0; }", "a {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n", "") expectPrintedLower(t, "a { inset: 0px; }", "a {\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n}\n", "") expectPrintedLower(t, "a { inset: 1px 2px; }", "a {\n top: 1px;\n right: 2px;\n bottom: 1px;\n left: 2px;\n}\n", "") expectPrintedLower(t, "a { inset: 1px 2px 3px; }", "a {\n top: 1px;\n right: 2px;\n bottom: 3px;\n left: 2px;\n}\n", "") expectPrintedLower(t, "a { inset: 1px 2px 3px 4px; }", "a {\n top: 1px;\n right: 2px;\n bottom: 3px;\n left: 4px;\n}\n", "") // When "inset" isn't supported, other mangling should still work expectPrintedLowerMangle(t, "a { top: 0px; }", "a {\n top: 0;\n}\n", "") expectPrintedLowerMangle(t, "a { right: 0px; }", "a {\n right: 0;\n}\n", "") expectPrintedLowerMangle(t, "a { bottom: 0px; }", "a {\n bottom: 0;\n}\n", "") expectPrintedLowerMangle(t, "a { left: 0px; }", "a {\n left: 0;\n}\n", "") expectPrintedLowerMangle(t, "a { inset: 0px; }", "a {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n", "") // When "inset" isn't supported, whitespace minifying should still work expectPrintedLowerMinify(t, "a { top: 0px; }", "a{top:0px}", "") expectPrintedLowerMinify(t, "a { right: 0px; }", "a{right:0px}", "") expectPrintedLowerMinify(t, "a { bottom: 0px; }", "a{bottom:0px}", "") expectPrintedLowerMinify(t, "a { left: 0px; }", "a{left:0px}", "") expectPrintedLowerMinify(t, "a { inset: 0px; }", "a{top:0px;right:0px;bottom:0px;left:0px}", "") expectPrintedLowerMinify(t, "a { inset: 1px 2px; }", "a{top:1px;right:2px;bottom:1px;left:2px}", "") expectPrintedLowerMinify(t, "a { inset: 1px 2px 3px; }", "a{top:1px;right:2px;bottom:3px;left:2px}", "") expectPrintedLowerMinify(t, "a { inset: 1px 2px 3px 4px; }", "a{top:1px;right:2px;bottom:3px;left:4px}", "") } func TestBorderRadius(t *testing.T) { expectPrinted(t, "a { border-top-left-radius: 0 0 }", "a {\n border-top-left-radius: 0 0;\n}\n", "") expectPrintedMangle(t, "a { border-top-left-radius: 0 0 }", "a {\n border-top-left-radius: 0;\n}\n", "") expectPrintedMangle(t, "a { border-top-left-radius: 0 0px }", "a {\n border-top-left-radius: 0;\n}\n", "") expectPrintedMangle(t, "a { border-top-left-radius: 0 1px }", "a {\n border-top-left-radius: 0 1px;\n}\n", "") expectPrintedMangle(t, "a { border-top-left-radius: 0; border-radius: 1px }", "a {\n border-radius: 1px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 1px 2px 3px 4px }", "a {\n border-radius: 1px 2px 3px 4px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 1px 2px 1px 3px }", "a {\n border-radius: 1px 2px 1px 3px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 1px 2px 3px 2px }", "a {\n border-radius: 1px 2px 3px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 1px 2px 1px 2px }", "a {\n border-radius: 1px 2px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 1px 1px 1px 1px }", "a {\n border-radius: 1px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 0/1px 2px 3px 4px }", "a {\n border-radius: 0 / 1px 2px 3px 4px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 0/1px 2px 1px 3px }", "a {\n border-radius: 0 / 1px 2px 1px 3px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 0/1px 2px 3px 2px }", "a {\n border-radius: 0 / 1px 2px 3px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 0/1px 2px 1px 2px }", "a {\n border-radius: 0 / 1px 2px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 0/1px 1px 1px 1px }", "a {\n border-radius: 0 / 1px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 1px 2px; border-top-left-radius: 3px; }", "a {\n border-radius: 3px 2px 1px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 1px; border-top-left-radius: 3px; }", "a {\n border-radius: 3px 1px 1px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 0/1px; border-top-left-radius: 3px; }", "a {\n border-radius: 3px 0 0 / 3px 1px 1px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 0/1px 2px; border-top-left-radius: 3px; }", "a {\n border-radius: 3px 0 0 / 3px 2px 1px;\n}\n", "") for _, x := range []string{"", "-top-left", "-top-right", "-bottom-left", "-bottom-right"} { y := "border" + x + "-radius" expectPrintedMangle(t, "a { "+y+": 1px; "+y+": 2px }", "a {\n "+y+": 2px;\n}\n", "") expectPrintedMangle(t, "a { "+y+": 1px !important; "+y+": 2px }", "a {\n "+y+": 1px !important;\n "+y+": 2px;\n}\n", "") expectPrintedMangle(t, "a { "+y+": 1px; "+y+": 2px !important }", "a {\n "+y+": 1px;\n "+y+": 2px !important;\n}\n", "") expectPrintedMangle(t, "a { "+y+": 1px !important; "+y+": 2px !important }", "a {\n "+y+": 2px !important;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 1px; "+y+": 2px !important; }", "a {\n border-radius: 1px;\n "+y+": 2px !important;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 1px !important; "+y+": 2px; }", "a {\n border-radius: 1px !important;\n "+y+": 2px;\n}\n", "") } expectPrintedMangle(t, "a { border-top-left-radius: ; border-radius: 1px }", "a {\n border-top-left-radius:;\n border-radius: 1px;\n}\n", "") expectPrintedMangle(t, "a { border-top-left-radius: 1px; border-radius: / }", "a {\n border-top-left-radius: 1px;\n border-radius: /;\n}\n", "") expectPrintedMangleMinify(t, "a { border-radius: 1px 2px 3px 4px; border-top-right-radius: 5px; }", "a{border-radius:1px 5px 3px 4px}", "") expectPrintedMangleMinify(t, "a { border-radius: 1px 2px 3px 4px; border-top-right-radius: 5px 6px; }", "a{border-radius:1px 5px 3px 4px/1px 6px 3px 4px}", "") // These should not be changed because "--x" and "--z" could be empty expectPrintedMangle(t, "a { border-radius: var(--x) var(--y) var(--z) var(--y) }", "a {\n border-radius: var(--x) var(--y) var(--z) var(--y);\n}\n", "") expectPrintedMangle(t, "a { border-radius: 0 / var(--x) var(--y) var(--z) var(--y) }", "a {\n border-radius: 0 / var(--x) var(--y) var(--z) var(--y);\n}\n", "") // "inherit" should not be merged expectPrintedMangle(t, "a { border-radius: 1px; border-top-left-radius: 0 }", "a {\n border-radius: 0 1px 1px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: inherit; border-top-left-radius: 0 }", "a {\n border-radius: inherit;\n border-top-left-radius: 0;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 0; border-top-left-radius: inherit }", "a {\n border-radius: 0;\n border-top-left-radius: inherit;\n}\n", "") expectPrintedMangle(t, "a { border-top-left-radius: 0; border-radius: inherit }", "a {\n border-top-left-radius: 0;\n border-radius: inherit;\n}\n", "") expectPrintedMangle(t, "a { border-top-left-radius: inherit; border-radius: 0 }", "a {\n border-top-left-radius: inherit;\n border-radius: 0;\n}\n", "") // Don't merge different units expectPrintedMangle(t, "a { border-radius: 1px; border-radius: 2px; }", "a {\n border-radius: 2px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 1px; border-top-left-radius: 2px; }", "a {\n border-radius: 2px 1px 1px;\n}\n", "") expectPrintedMangle(t, "a { border-top-left-radius: 1px; border-radius: 2px; }", "a {\n border-radius: 2px;\n}\n", "") expectPrintedMangle(t, "a { border-top-left-radius: 1px; border-top-left-radius: 2px; }", "a {\n border-top-left-radius: 2px;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 1rem; border-radius: 1vw; }", "a {\n border-radius: 1rem;\n border-radius: 1vw;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 1rem; border-top-left-radius: 1vw; }", "a {\n border-radius: 1rem;\n border-top-left-radius: 1vw;\n}\n", "") expectPrintedMangle(t, "a { border-top-left-radius: 1rem; border-radius: 1vw; }", "a {\n border-top-left-radius: 1rem;\n border-radius: 1vw;\n}\n", "") expectPrintedMangle(t, "a { border-top-left-radius: 1rem; border-top-left-radius: 1vw; }", "a {\n border-top-left-radius: 1rem;\n border-top-left-radius: 1vw;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 0; border-top-left-radius: 2px; }", "a {\n border-radius: 2px 0 0;\n}\n", "") expectPrintedMangle(t, "a { border-radius: 0; border-top-left-radius: 2rem; }", "a {\n border-radius: 0;\n border-top-left-radius: 2rem;\n}\n", "") } func TestBoxShadow(t *testing.T) { expectPrinted(t, "a { box-shadow: inset 0px 0px 0px 0px black }", "a {\n box-shadow: inset 0px 0px 0px 0px black;\n}\n", "") expectPrintedMangle(t, "a { box-shadow: 0px 0px 0px 0px inset black }", "a {\n box-shadow: 0 0 inset #000;\n}\n", "") expectPrintedMangle(t, "a { box-shadow: 0px 0px 0px 0px black inset }", "a {\n box-shadow: 0 0 #000 inset;\n}\n", "") expectPrintedMangle(t, "a { box-shadow: black 0px 0px 0px 0px inset }", "a {\n box-shadow: #000 0 0 inset;\n}\n", "") expectPrintedMangle(t, "a { box-shadow: inset 0px 0px 0px 0px black }", "a {\n box-shadow: inset 0 0 #000;\n}\n", "") expectPrintedMangle(t, "a { box-shadow: inset black 0px 0px 0px 0px }", "a {\n box-shadow: inset #000 0 0;\n}\n", "") expectPrintedMangle(t, "a { box-shadow: black inset 0px 0px 0px 0px }", "a {\n box-shadow: #000 inset 0 0;\n}\n", "") expectPrintedMangle(t, "a { box-shadow: yellow 1px 0px 0px 1px inset }", "a {\n box-shadow: #ff0 1px 0 0 1px inset;\n}\n", "") expectPrintedMangle(t, "a { box-shadow: yellow 1px 0px 1px 0px inset }", "a {\n box-shadow: #ff0 1px 0 1px inset;\n}\n", "") expectPrintedMangle(t, "a { box-shadow: rebeccapurple, yellow, black }", "a {\n box-shadow:\n #639,\n #ff0,\n #000;\n}\n", "") expectPrintedMangle(t, "a { box-shadow: 0px 0px 0px var(--foo) black }", "a {\n box-shadow: 0 0 0 var(--foo) #000;\n}\n", "") expectPrintedMangle(t, "a { box-shadow: 0px 0px 0px 0px var(--foo) black }", "a {\n box-shadow: 0 0 0 0 var(--foo) #000;\n}\n", "") expectPrintedMangle(t, "a { box-shadow: calc(1px + var(--foo)) 0px 0px 0px black }", "a {\n box-shadow: calc(1px + var(--foo)) 0 0 0 #000;\n}\n", "") expectPrintedMangle(t, "a { box-shadow: inset 0px 0px 0px 0px 0px magenta; }", "a {\n box-shadow: inset 0 0 0 0 0 #f0f;\n}\n", "") expectPrintedMangleMinify(t, "a { box-shadow: rebeccapurple , yellow , black }", "a{box-shadow:#639,#ff0,#000}", "") expectPrintedMangleMinify(t, "a { box-shadow: rgb(255, 0, 17) 0 0 1 inset }", "a{box-shadow:#f01 0 0 1 inset}", "") } func TestMangleTime(t *testing.T) { expectPrintedMangle(t, "a { animation: b 1s }", "a {\n animation: b 1s;\n}\n", "") expectPrintedMangle(t, "a { animation: b 1.s }", "a {\n animation: b 1s;\n}\n", "") expectPrintedMangle(t, "a { animation: b 1.0s }", "a {\n animation: b 1s;\n}\n", "") expectPrintedMangle(t, "a { animation: b 1.02s }", "a {\n animation: b 1.02s;\n}\n", "") expectPrintedMangle(t, "a { animation: b .1s }", "a {\n animation: b .1s;\n}\n", "") expectPrintedMangle(t, "a { animation: b .01s }", "a {\n animation: b .01s;\n}\n", "") expectPrintedMangle(t, "a { animation: b .001s }", "a {\n animation: b 1ms;\n}\n", "") expectPrintedMangle(t, "a { animation: b .0012s }", "a {\n animation: b 1.2ms;\n}\n", "") expectPrintedMangle(t, "a { animation: b -.001s }", "a {\n animation: b -1ms;\n}\n", "") expectPrintedMangle(t, "a { animation: b -.0012s }", "a {\n animation: b -1.2ms;\n}\n", "") expectPrintedMangle(t, "a { animation: b .0001s }", "a {\n animation: b .1ms;\n}\n", "") expectPrintedMangle(t, "a { animation: b .00012s }", "a {\n animation: b .12ms;\n}\n", "") expectPrintedMangle(t, "a { animation: b .000123s }", "a {\n animation: b .123ms;\n}\n", "") expectPrintedMangle(t, "a { animation: b .01S }", "a {\n animation: b .01S;\n}\n", "") expectPrintedMangle(t, "a { animation: b .001S }", "a {\n animation: b 1ms;\n}\n", "") expectPrintedMangle(t, "a { animation: b 1ms }", "a {\n animation: b 1ms;\n}\n", "") expectPrintedMangle(t, "a { animation: b 10ms }", "a {\n animation: b 10ms;\n}\n", "") expectPrintedMangle(t, "a { animation: b 100ms }", "a {\n animation: b .1s;\n}\n", "") expectPrintedMangle(t, "a { animation: b 120ms }", "a {\n animation: b .12s;\n}\n", "") expectPrintedMangle(t, "a { animation: b 123ms }", "a {\n animation: b 123ms;\n}\n", "") expectPrintedMangle(t, "a { animation: b 1000ms }", "a {\n animation: b 1s;\n}\n", "") expectPrintedMangle(t, "a { animation: b 1200ms }", "a {\n animation: b 1.2s;\n}\n", "") expectPrintedMangle(t, "a { animation: b 1230ms }", "a {\n animation: b 1.23s;\n}\n", "") expectPrintedMangle(t, "a { animation: b 1234ms }", "a {\n animation: b 1234ms;\n}\n", "") expectPrintedMangle(t, "a { animation: b -100ms }", "a {\n animation: b -.1s;\n}\n", "") expectPrintedMangle(t, "a { animation: b -120ms }", "a {\n animation: b -.12s;\n}\n", "") expectPrintedMangle(t, "a { animation: b 120mS }", "a {\n animation: b .12s;\n}\n", "") expectPrintedMangle(t, "a { animation: b 120Ms }", "a {\n animation: b .12s;\n}\n", "") expectPrintedMangle(t, "a { animation: b 123mS }", "a {\n animation: b 123mS;\n}\n", "") expectPrintedMangle(t, "a { animation: b 123Ms }", "a {\n animation: b 123Ms;\n}\n", "") // Mangling times with exponents is not currently supported expectPrintedMangle(t, "a { animation: b 1e3ms }", "a {\n animation: b 1e3ms;\n}\n", "") expectPrintedMangle(t, "a { animation: b 1E3ms }", "a {\n animation: b 1E3ms;\n}\n", "") } func TestCalc(t *testing.T) { expectPrinted(t, "a { b: calc(+(2)) }", "a {\n b: calc(+(2));\n}\n", "<stdin>: WARNING: \"+\" can only be used as an infix operator, not a prefix operator\n") expectPrinted(t, "a { b: calc(-(2)) }", "a {\n b: calc(-(2));\n}\n", "<stdin>: WARNING: \"-\" can only be used as an infix operator, not a prefix operator\n") expectPrinted(t, "a { b: calc(*(2)) }", "a {\n b: calc(*(2));\n}\n", "") expectPrinted(t, "a { b: calc(/(2)) }", "a {\n b: calc(/(2));\n}\n", "") expectPrinted(t, "a { b: calc(1 + 2) }", "a {\n b: calc(1 + 2);\n}\n", "") expectPrinted(t, "a { b: calc(1 - 2) }", "a {\n b: calc(1 - 2);\n}\n", "") expectPrinted(t, "a { b: calc(1 * 2) }", "a {\n b: calc(1 * 2);\n}\n", "") expectPrinted(t, "a { b: calc(1 / 2) }", "a {\n b: calc(1 / 2);\n}\n", "") expectPrinted(t, "a { b: calc(1+ 2) }", "a {\n b: calc(1+ 2);\n}\n", "<stdin>: WARNING: The \"+\" operator only works if there is whitespace on both sides\n") expectPrinted(t, "a { b: calc(1- 2) }", "a {\n b: calc(1- 2);\n}\n", "<stdin>: WARNING: The \"-\" operator only works if there is whitespace on both sides\n") expectPrinted(t, "a { b: calc(1* 2) }", "a {\n b: calc(1* 2);\n}\n", "") expectPrinted(t, "a { b: calc(1/ 2) }", "a {\n b: calc(1/ 2);\n}\n", "") expectPrinted(t, "a { b: calc(1 +2) }", "a {\n b: calc(1 +2);\n}\n", "<stdin>: WARNING: The \"+\" operator only works if there is whitespace on both sides\n") expectPrinted(t, "a { b: calc(1 -2) }", "a {\n b: calc(1 -2);\n}\n", "<stdin>: WARNING: The \"-\" operator only works if there is whitespace on both sides\n") expectPrinted(t, "a { b: calc(1 *2) }", "a {\n b: calc(1 *2);\n}\n", "") expectPrinted(t, "a { b: calc(1 /2) }", "a {\n b: calc(1 /2);\n}\n", "") expectPrinted(t, "a { b: calc(1 +(2)) }", "a {\n b: calc(1 +(2));\n}\n", "<stdin>: WARNING: The \"+\" operator only works if there is whitespace on both sides\n") expectPrinted(t, "a { b: calc(1 -(2)) }", "a {\n b: calc(1 -(2));\n}\n", "<stdin>: WARNING: The \"-\" operator only works if there is whitespace on both sides\n") expectPrinted(t, "a { b: calc(1 *(2)) }", "a {\n b: calc(1 *(2));\n}\n", "") expectPrinted(t, "a { b: calc(1 /(2)) }", "a {\n b: calc(1 /(2));\n}\n", "") } func TestMinifyCalc(t *testing.T) { expectPrintedMangleMinify(t, "a { b: calc(x + y) }", "a{b:calc(x + y)}", "") expectPrintedMangleMinify(t, "a { b: calc(x - y) }", "a{b:calc(x - y)}", "") expectPrintedMangleMinify(t, "a { b: calc(x * y) }", "a{b:calc(x*y)}", "") expectPrintedMangleMinify(t, "a { b: calc(x / y) }", "a{b:calc(x/y)}", "") } func TestMangleCalc(t *testing.T) { expectPrintedMangle(t, "a { b: calc(1) }", "a {\n b: 1;\n}\n", "") expectPrintedMangle(t, "a { b: calc((1)) }", "a {\n b: 1;\n}\n", "") expectPrintedMangle(t, "a { b: calc(calc(1)) }", "a {\n b: 1;\n}\n", "") expectPrintedMangle(t, "a { b: calc(x + y * z) }", "a {\n b: calc(x + y * z);\n}\n", "") expectPrintedMangle(t, "a { b: calc(x * y + z) }", "a {\n b: calc(x * y + z);\n}\n", "") // Test sum expectPrintedMangle(t, "a { b: calc(2 + 3) }", "a {\n b: 5;\n}\n", "") expectPrintedMangle(t, "a { b: calc(6 - 2) }", "a {\n b: 4;\n}\n", "") // Test product expectPrintedMangle(t, "a { b: calc(2 * 3) }", "a {\n b: 6;\n}\n", "") expectPrintedMangle(t, "a { b: calc(6 / 2) }", "a {\n b: 3;\n}\n", "") expectPrintedMangle(t, "a { b: calc(2px * 3 + 4px * 5) }", "a {\n b: 26px;\n}\n", "") expectPrintedMangle(t, "a { b: calc(2 * 3px + 4 * 5px) }", "a {\n b: 26px;\n}\n", "") expectPrintedMangle(t, "a { b: calc(2px * 3 - 4px * 5) }", "a {\n b: -14px;\n}\n", "") expectPrintedMangle(t, "a { b: calc(2 * 3px - 4 * 5px) }", "a {\n b: -14px;\n}\n", "") // Test negation expectPrintedMangle(t, "a { b: calc(x + 1) }", "a {\n b: calc(x + 1);\n}\n", "") expectPrintedMangle(t, "a { b: calc(x - 1) }", "a {\n b: calc(x - 1);\n}\n", "") expectPrintedMangle(t, "a { b: calc(x + -1) }", "a {\n b: calc(x - 1);\n}\n", "") expectPrintedMangle(t, "a { b: calc(x - -1) }", "a {\n b: calc(x + 1);\n}\n", "") expectPrintedMangle(t, "a { b: calc(1 + x) }", "a {\n b: calc(1 + x);\n}\n", "") expectPrintedMangle(t, "a { b: calc(1 - x) }", "a {\n b: calc(1 - x);\n}\n", "") expectPrintedMangle(t, "a { b: calc(-1 + x) }", "a {\n b: calc(-1 + x);\n}\n", "") expectPrintedMangle(t, "a { b: calc(-1 - x) }", "a {\n b: calc(-1 - x);\n}\n", "") // Test inversion expectPrintedMangle(t, "a { b: calc(x * 4) }", "a {\n b: calc(x * 4);\n}\n", "") expectPrintedMangle(t, "a { b: calc(x / 4) }", "a {\n b: calc(x / 4);\n}\n", "") expectPrintedMangle(t, "a { b: calc(x * 0.25) }", "a {\n b: calc(x / 4);\n}\n", "") expectPrintedMangle(t, "a { b: calc(x / 0.25) }", "a {\n b: calc(x * 4);\n}\n", "") // Test operator precedence expectPrintedMangle(t, "a { b: calc((a + b) + c) }", "a {\n b: calc(a + b + c);\n}\n", "") expectPrintedMangle(t, "a { b: calc(a + (b + c)) }", "a {\n b: calc(a + b + c);\n}\n", "") expectPrintedMangle(t, "a { b: calc((a - b) - c) }", "a {\n b: calc(a - b - c);\n}\n", "") expectPrintedMangle(t, "a { b: calc(a - (b - c)) }", "a {\n b: calc(a - (b - c));\n}\n", "") expectPrintedMangle(t, "a { b: calc((a * b) * c) }", "a {\n b: calc(a * b * c);\n}\n", "") expectPrintedMangle(t, "a { b: calc(a * (b * c)) }", "a {\n b: calc(a * b * c);\n}\n", "") expectPrintedMangle(t, "a { b: calc((a / b) / c) }", "a {\n b: calc(a / b / c);\n}\n", "") expectPrintedMangle(t, "a { b: calc(a / (b / c)) }", "a {\n b: calc(a / (b / c));\n}\n", "") expectPrintedMangle(t, "a { b: calc(a + b * c / d - e) }", "a {\n b: calc(a + b * c / d - e);\n}\n", "") expectPrintedMangle(t, "a { b: calc((a + ((b * c) / d)) - e) }", "a {\n b: calc(a + b * c / d - e);\n}\n", "") expectPrintedMangle(t, "a { b: calc((a + b) * c / (d - e)) }", "a {\n b: calc((a + b) * c / (d - e));\n}\n", "") // Using "var()" should bail because it can expand to any number of tokens expectPrintedMangle(t, "a { b: calc(1px - x + 2px) }", "a {\n b: calc(3px - x);\n}\n", "") expectPrintedMangle(t, "a { b: calc(1px - var(x) + 2px) }", "a {\n b: calc(1px - var(x) + 2px);\n}\n", "") // Test values that can't be accurately represented as decimals expectPrintedMangle(t, "a { b: calc(100% / 1) }", "a {\n b: 100%;\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 2) }", "a {\n b: 50%;\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 3) }", "a {\n b: calc(100% / 3);\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 4) }", "a {\n b: 25%;\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 5) }", "a {\n b: 20%;\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 6) }", "a {\n b: calc(100% / 6);\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 7) }", "a {\n b: calc(100% / 7);\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 8) }", "a {\n b: 12.5%;\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 9) }", "a {\n b: calc(100% / 9);\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 10) }", "a {\n b: 10%;\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 100) }", "a {\n b: 1%;\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 1000) }", "a {\n b: .1%;\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 10000) }", "a {\n b: .01%;\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 100000) }", "a {\n b: .001%;\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / 1000000) }", "a {\n b: calc(100% / 1000000);\n}\n", "") // This actually ends up as "100% * (1 / 1000000)" which is less precise expectPrintedMangle(t, "a { b: calc(100% / -1000000) }", "a {\n b: calc(100% / -1000000);\n}\n", "") expectPrintedMangle(t, "a { b: calc(100% / -100000) }", "a {\n b: -.001%;\n}\n", "") expectPrintedMangle(t, "a { b: calc(3 * (2px + 1em / 7)) }", "a {\n b: calc(3 * (2px + 1em / 7));\n}\n", "") expectPrintedMangle(t, "a { b: calc(3 * (2px + 1em / 8)) }", "a {\n b: calc(3 * (2px + .125em));\n}\n", "") // Non-finite numbers expectPrintedMangle(t, "a { b: calc(0px / 0) }", "a {\n b: calc(0px / 0);\n}\n", "") expectPrintedMangle(t, "a { b: calc(1px / 0) }", "a {\n b: calc(1px / 0);\n}\n", "") expectPrintedMangle(t, "a { b: calc(-1px / 0) }", "a {\n b: calc(-1px / 0);\n}\n", "") expectPrintedMangle(t, "a { b: calc(nan) }", "a {\n b: calc(nan);\n}\n", "") expectPrintedMangle(t, "a { b: calc(infinity) }", "a {\n b: calc(infinity);\n}\n", "") expectPrintedMangle(t, "a { b: calc(-infinity) }", "a {\n b: calc(-infinity);\n}\n", "") expectPrintedMangle(t, "a { b: calc(1px / nan) }", "a {\n b: calc(1px / nan);\n}\n", "") expectPrintedMangle(t, "a { b: calc(1px / infinity) }", "a {\n b: 0px;\n}\n", "") expectPrintedMangle(t, "a { b: calc(1px / -infinity) }", "a {\n b: -0px;\n}\n", "") } func TestTransform(t *testing.T) { expectPrintedMangle(t, "a { transform: matrix(1, 0, 0, 1, 0, 0) }", "a {\n transform: scale(1);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix(2, 0, 0, 1, 0, 0) }", "a {\n transform: scaleX(2);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix(1, 0, 0, 2, 0, 0) }", "a {\n transform: scaleY(2);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix(2, 0, 0, 3, 0, 0) }", "a {\n transform: scale(2, 3);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix(2, 0, 0, 2, 0, 0) }", "a {\n transform: scale(2);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix(1, 0, 0, 1, 1, 2) }", "a {\n transform:\n matrix(\n 1, 0,\n 0, 1,\n 1, 2);\n}\n", "") expectPrintedMangle(t, "a { transform: translate(0, 0) }", "a {\n transform: translate(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translate(0px, 0px) }", "a {\n transform: translate(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translate(0%, 0%) }", "a {\n transform: translate(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translate(1px, 0) }", "a {\n transform: translate(1px);\n}\n", "") expectPrintedMangle(t, "a { transform: translate(1px, 0px) }", "a {\n transform: translate(1px);\n}\n", "") expectPrintedMangle(t, "a { transform: translate(1px, 0%) }", "a {\n transform: translate(1px);\n}\n", "") expectPrintedMangle(t, "a { transform: translate(0, 1px) }", "a {\n transform: translateY(1px);\n}\n", "") expectPrintedMangle(t, "a { transform: translate(0px, 1px) }", "a {\n transform: translateY(1px);\n}\n", "") expectPrintedMangle(t, "a { transform: translate(0%, 1px) }", "a {\n transform: translateY(1px);\n}\n", "") expectPrintedMangle(t, "a { transform: translate(1px, 2px) }", "a {\n transform: translate(1px, 2px);\n}\n", "") expectPrintedMangle(t, "a { transform: translate(40%, 60%) }", "a {\n transform: translate(40%, 60%);\n}\n", "") expectPrintedMangle(t, "a { transform: translateX(0) }", "a {\n transform: translate(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translateX(0px) }", "a {\n transform: translate(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translateX(0%) }", "a {\n transform: translate(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translateX(1px) }", "a {\n transform: translate(1px);\n}\n", "") expectPrintedMangle(t, "a { transform: translateX(50%) }", "a {\n transform: translate(50%);\n}\n", "") expectPrintedMangle(t, "a { transform: translateY(0) }", "a {\n transform: translateY(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translateY(0px) }", "a {\n transform: translateY(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translateY(0%) }", "a {\n transform: translateY(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translateY(1px) }", "a {\n transform: translateY(1px);\n}\n", "") expectPrintedMangle(t, "a { transform: translateY(50%) }", "a {\n transform: translateY(50%);\n}\n", "") expectPrintedMangle(t, "a { transform: scale(1) }", "a {\n transform: scale(1);\n}\n", "") expectPrintedMangle(t, "a { transform: scale(100%) }", "a {\n transform: scale(1);\n}\n", "") expectPrintedMangle(t, "a { transform: scale(10%) }", "a {\n transform: scale(.1);\n}\n", "") expectPrintedMangle(t, "a { transform: scale(99%) }", "a {\n transform: scale(99%);\n}\n", "") expectPrintedMangle(t, "a { transform: scale(1, 1) }", "a {\n transform: scale(1);\n}\n", "") expectPrintedMangle(t, "a { transform: scale(100%, 1) }", "a {\n transform: scale(1);\n}\n", "") expectPrintedMangle(t, "a { transform: scale(10%, 0.1) }", "a {\n transform: scale(.1);\n}\n", "") expectPrintedMangle(t, "a { transform: scale(99%, 0.99) }", "a {\n transform: scale(99%, .99);\n}\n", "") expectPrintedMangle(t, "a { transform: scale(60%, 40%) }", "a {\n transform: scale(.6, .4);\n}\n", "") expectPrintedMangle(t, "a { transform: scale(3, 1) }", "a {\n transform: scaleX(3);\n}\n", "") expectPrintedMangle(t, "a { transform: scale(300%, 1) }", "a {\n transform: scaleX(3);\n}\n", "") expectPrintedMangle(t, "a { transform: scale(1, 3) }", "a {\n transform: scaleY(3);\n}\n", "") expectPrintedMangle(t, "a { transform: scale(1, 300%) }", "a {\n transform: scaleY(3);\n}\n", "") expectPrintedMangle(t, "a { transform: scaleX(1) }", "a {\n transform: scaleX(1);\n}\n", "") expectPrintedMangle(t, "a { transform: scaleX(2) }", "a {\n transform: scaleX(2);\n}\n", "") expectPrintedMangle(t, "a { transform: scaleX(300%) }", "a {\n transform: scaleX(3);\n}\n", "") expectPrintedMangle(t, "a { transform: scaleX(99%) }", "a {\n transform: scaleX(99%);\n}\n", "") expectPrintedMangle(t, "a { transform: scaleY(1) }", "a {\n transform: scaleY(1);\n}\n", "") expectPrintedMangle(t, "a { transform: scaleY(2) }", "a {\n transform: scaleY(2);\n}\n", "") expectPrintedMangle(t, "a { transform: scaleY(300%) }", "a {\n transform: scaleY(3);\n}\n", "") expectPrintedMangle(t, "a { transform: scaleY(99%) }", "a {\n transform: scaleY(99%);\n}\n", "") expectPrintedMangle(t, "a { transform: rotate(0) }", "a {\n transform: rotate(0);\n}\n", "") expectPrintedMangle(t, "a { transform: rotate(0deg) }", "a {\n transform: rotate(0);\n}\n", "") expectPrintedMangle(t, "a { transform: rotate(1deg) }", "a {\n transform: rotate(1deg);\n}\n", "") expectPrintedMangle(t, "a { transform: skew(0) }", "a {\n transform: skew(0);\n}\n", "") expectPrintedMangle(t, "a { transform: skew(0deg) }", "a {\n transform: skew(0);\n}\n", "") expectPrintedMangle(t, "a { transform: skew(1deg) }", "a {\n transform: skew(1deg);\n}\n", "") expectPrintedMangle(t, "a { transform: skew(1deg, 0) }", "a {\n transform: skew(1deg);\n}\n", "") expectPrintedMangle(t, "a { transform: skew(1deg, 0deg) }", "a {\n transform: skew(1deg);\n}\n", "") expectPrintedMangle(t, "a { transform: skew(0, 1deg) }", "a {\n transform: skew(0, 1deg);\n}\n", "") expectPrintedMangle(t, "a { transform: skew(0deg, 1deg) }", "a {\n transform: skew(0, 1deg);\n}\n", "") expectPrintedMangle(t, "a { transform: skew(1deg, 2deg) }", "a {\n transform: skew(1deg, 2deg);\n}\n", "") expectPrintedMangle(t, "a { transform: skewX(0) }", "a {\n transform: skew(0);\n}\n", "") expectPrintedMangle(t, "a { transform: skewX(0deg) }", "a {\n transform: skew(0);\n}\n", "") expectPrintedMangle(t, "a { transform: skewX(1deg) }", "a {\n transform: skew(1deg);\n}\n", "") expectPrintedMangle(t, "a { transform: skewY(0) }", "a {\n transform: skewY(0);\n}\n", "") expectPrintedMangle(t, "a { transform: skewY(0deg) }", "a {\n transform: skewY(0);\n}\n", "") expectPrintedMangle(t, "a { transform: skewY(1deg) }", "a {\n transform: skewY(1deg);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2) }", "a {\n transform:\n matrix3d(\n 1, 0, 0, 0,\n 0, 1, 0, 0,\n 0, 0, 1, 0,\n 0, 0, 0, 2);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2, 3, 4, 1) }", "a {\n transform:\n matrix3d(\n 1, 0, 0, 0,\n 0, 1, 0, 0,\n 0, 0, 1, 0,\n 2, 3, 4, 1);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix3d(1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1) }", "a {\n transform:\n matrix3d(\n 1, 0, 1, 0,\n 0, 1, 0, 0,\n 1, 0, 1, 0,\n 0, 0, 0, 1);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) }", "a {\n transform: scaleZ(1);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix3d(2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) }", "a {\n transform: scale3d(2, 1, 1);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix3d(1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) }", "a {\n transform: scale3d(1, 2, 1);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix3d(2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) }", "a {\n transform: scale3d(2, 2, 1);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix3d(2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) }", "a {\n transform: scale3d(2, 3, 1);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1) }", "a {\n transform: scaleZ(2);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix3d(1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1) }", "a {\n transform: scale3d(1, 2, 3);\n}\n", "") expectPrintedMangle(t, "a { transform: matrix3d(2, 3, 0, 0, 4, 5, 0, 0, 0, 0, 1, 0, 6, 7, 0, 1) }", "a {\n transform:\n matrix3d(\n 2, 3, 0, 0,\n 4, 5, 0, 0,\n 0, 0, 1, 0,\n 6, 7, 0, 1);\n}\n", "") expectPrintedMangle(t, "a { transform: translate3d(0, 0, 0) }", "a {\n transform: translateZ(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translate3d(0%, 0%, 0) }", "a {\n transform: translateZ(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translate3d(0px, 0px, 0px) }", "a {\n transform: translateZ(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translate3d(1px, 0px, 0px) }", "a {\n transform: translate3d(1px, 0, 0);\n}\n", "") expectPrintedMangle(t, "a { transform: translate3d(0px, 1px, 0px) }", "a {\n transform: translate3d(0, 1px, 0);\n}\n", "") expectPrintedMangle(t, "a { transform: translate3d(0px, 0px, 1px) }", "a {\n transform: translateZ(1px);\n}\n", "") expectPrintedMangle(t, "a { transform: translate3d(1px, 2px, 3px) }", "a {\n transform: translate3d(1px, 2px, 3px);\n}\n", "") expectPrintedMangle(t, "a { transform: translate3d(1px, 0, 3px) }", "a {\n transform: translate3d(1px, 0, 3px);\n}\n", "") expectPrintedMangle(t, "a { transform: translate3d(0, 2px, 3px) }", "a {\n transform: translate3d(0, 2px, 3px);\n}\n", "") expectPrintedMangle(t, "a { transform: translate3d(1px, 2px, 0px) }", "a {\n transform: translate3d(1px, 2px, 0);\n}\n", "") expectPrintedMangle(t, "a { transform: translate3d(40%, 60%, 0px) }", "a {\n transform: translate3d(40%, 60%, 0);\n}\n", "") expectPrintedMangle(t, "a { transform: translateZ(0) }", "a {\n transform: translateZ(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translateZ(0px) }", "a {\n transform: translateZ(0);\n}\n", "") expectPrintedMangle(t, "a { transform: translateZ(1px) }", "a {\n transform: translateZ(1px);\n}\n", "") expectPrintedMangle(t, "a { transform: scale3d(1, 1, 1) }", "a {\n transform: scaleZ(1);\n}\n", "") expectPrintedMangle(t, "a { transform: scale3d(2, 1, 1) }", "a {\n transform: scale3d(2, 1, 1);\n}\n", "") expectPrintedMangle(t, "a { transform: scale3d(1, 2, 1) }", "a {\n transform: scale3d(1, 2, 1);\n}\n", "") expectPrintedMangle(t, "a { transform: scale3d(1, 1, 2) }", "a {\n transform: scaleZ(2);\n}\n", "") expectPrintedMangle(t, "a { transform: scale3d(1, 2, 3) }", "a {\n transform: scale3d(1, 2, 3);\n}\n", "") expectPrintedMangle(t, "a { transform: scale3d(2, 3, 1) }", "a {\n transform: scale3d(2, 3, 1);\n}\n", "") expectPrintedMangle(t, "a { transform: scale3d(2, 2, 1) }", "a {\n transform: scale3d(2, 2, 1);\n}\n", "") expectPrintedMangle(t, "a { transform: scale3d(3, 300%, 100.00%) }", "a {\n transform: scale3d(3, 3, 1);\n}\n", "") expectPrintedMangle(t, "a { transform: scale3d(1%, 2%, 3%) }", "a {\n transform: scale3d(1%, 2%, 3%);\n}\n", "") expectPrintedMangle(t, "a { transform: scaleZ(1) }", "a {\n transform: scaleZ(1);\n}\n", "") expectPrintedMangle(t, "a { transform: scaleZ(100%) }", "a {\n transform: scaleZ(1);\n}\n", "") expectPrintedMangle(t, "a { transform: scaleZ(2) }", "a {\n transform: scaleZ(2);\n}\n", "") expectPrintedMangle(t, "a { transform: scaleZ(200%) }", "a {\n transform: scaleZ(2);\n}\n", "") expectPrintedMangle(t, "a { transform: scaleZ(99%) }", "a {\n transform: scaleZ(99%);\n}\n", "") expectPrintedMangle(t, "a { transform: rotate3d(0, 0, 0, 0) }", "a {\n transform: rotate3d(0, 0, 0, 0);\n}\n", "") expectPrintedMangle(t, "a { transform: rotate3d(0, 0, 0, 0deg) }", "a {\n transform: rotate3d(0, 0, 0, 0);\n}\n", "") expectPrintedMangle(t, "a { transform: rotate3d(0, 0, 0, 45deg) }", "a {\n transform: rotate3d(0, 0, 0, 45deg);\n}\n", "") expectPrintedMangle(t, "a { transform: rotate3d(1, 0, 0, 45deg) }", "a {\n transform: rotateX(45deg);\n}\n", "") expectPrintedMangle(t, "a { transform: rotate3d(0, 1, 0, 45deg) }", "a {\n transform: rotateY(45deg);\n}\n", "") expectPrintedMangle(t, "a { transform: rotate3d(0, 0, 1, 45deg) }", "a {\n transform: rotate3d(0, 0, 1, 45deg);\n}\n", "") expectPrintedMangle(t, "a { transform: rotateX(0) }", "a {\n transform: rotateX(0);\n}\n", "") expectPrintedMangle(t, "a { transform: rotateX(0deg) }", "a {\n transform: rotateX(0);\n}\n", "") expectPrintedMangle(t, "a { transform: rotateX(1deg) }", "a {\n transform: rotateX(1deg);\n}\n", "") expectPrintedMangle(t, "a { transform: rotateY(0) }", "a {\n transform: rotateY(0);\n}\n", "") expectPrintedMangle(t, "a { transform: rotateY(0deg) }", "a {\n transform: rotateY(0);\n}\n", "") expectPrintedMangle(t, "a { transform: rotateY(1deg) }", "a {\n transform: rotateY(1deg);\n}\n", "") expectPrintedMangle(t, "a { transform: rotateZ(0) }", "a {\n transform: rotate(0);\n}\n", "") expectPrintedMangle(t, "a { transform: rotateZ(0deg) }", "a {\n transform: rotate(0);\n}\n", "") expectPrintedMangle(t, "a { transform: rotateZ(1deg) }", "a {\n transform: rotate(1deg);\n}\n", "") expectPrintedMangle(t, "a { transform: perspective(0) }", "a {\n transform: perspective(0);\n}\n", "") expectPrintedMangle(t, "a { transform: perspective(0px) }", "a {\n transform: perspective(0);\n}\n", "") expectPrintedMangle(t, "a { transform: perspective(1px) }", "a {\n transform: perspective(1px);\n}\n", "") } func TestMangleAlpha(t *testing.T) { alphas := []string{ "0", ".004", ".008", ".01", ".016", ".02", ".024", ".027", ".03", ".035", ".04", ".043", ".047", ".05", ".055", ".06", ".063", ".067", ".07", ".075", ".08", ".082", ".086", ".09", ".094", ".098", ".1", ".106", ".11", ".114", ".118", ".12", ".125", ".13", ".133", ".137", ".14", ".145", ".15", ".153", ".157", ".16", ".165", ".17", ".173", ".176", ".18", ".184", ".19", ".192", ".196", ".2", ".204", ".208", ".21", ".216", ".22", ".224", ".227", ".23", ".235", ".24", ".243", ".247", ".25", ".255", ".26", ".263", ".267", ".27", ".275", ".28", ".282", ".286", ".29", ".294", ".298", ".3", ".306", ".31", ".314", ".318", ".32", ".325", ".33", ".333", ".337", ".34", ".345", ".35", ".353", ".357", ".36", ".365", ".37", ".373", ".376", ".38", ".384", ".39", ".392", ".396", ".4", ".404", ".408", ".41", ".416", ".42", ".424", ".427", ".43", ".435", ".44", ".443", ".447", ".45", ".455", ".46", ".463", ".467", ".47", ".475", ".48", ".482", ".486", ".49", ".494", ".498", ".5", ".506", ".51", ".514", ".518", ".52", ".525", ".53", ".533", ".537", ".54", ".545", ".55", ".553", ".557", ".56", ".565", ".57", ".573", ".576", ".58", ".584", ".59", ".592", ".596", ".6", ".604", ".608", ".61", ".616", ".62", ".624", ".627", ".63", ".635", ".64", ".643", ".647", ".65", ".655", ".66", ".663", ".667", ".67", ".675", ".68", ".682", ".686", ".69", ".694", ".698", ".7", ".706", ".71", ".714", ".718", ".72", ".725", ".73", ".733", ".737", ".74", ".745", ".75", ".753", ".757", ".76", ".765", ".77", ".773", ".776", ".78", ".784", ".79", ".792", ".796", ".8", ".804", ".808", ".81", ".816", ".82", ".824", ".827", ".83", ".835", ".84", ".843", ".847", ".85", ".855", ".86", ".863", ".867", ".87", ".875", ".88", ".882", ".886", ".89", ".894", ".898", ".9", ".906", ".91", ".914", ".918", ".92", ".925", ".93", ".933", ".937", ".94", ".945", ".95", ".953", ".957", ".96", ".965", ".97", ".973", ".976", ".98", ".984", ".99", ".992", ".996", } for i, alpha := range alphas { expectPrintedLowerMangle(t, fmt.Sprintf("a { color: #%08X }", i), "a {\n color: rgba(0, 0, 0, "+alpha+");\n}\n", "") } // An alpha value of 100% does not use "rgba(...)" expectPrintedLowerMangle(t, "a { color: #000000FF }", "a {\n color: #000;\n}\n", "") } func TestMangleDuplicateSelectors(t *testing.T) { expectPrinted(t, "a, a { color: red }", "a,\na {\n color: red;\n}\n", "") expectPrintedMangle(t, "a, a { color: red }", "a {\n color: red;\n}\n", "") expectPrintedMangle(t, "a, b { color: red }", "a,\nb {\n color: red;\n}\n", "") expectPrintedMangle(t, "a, a.foo, a.foo, a.bar, a { color: red }", "a,\na.foo,\na.bar {\n color: red;\n}\n", "") expectPrintedMangle(t, "@media screen { a, a { color: red } }", "@media screen {\n a {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "@media screen { a, b { color: red } }", "@media screen {\n a,\n b {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "@media screen { a, a.foo, a.foo, a.bar, a { color: red } }", "@media screen {\n a,\n a.foo,\n a.bar {\n color: red;\n }\n}\n", "") } func TestMangleDuplicateSelectorRules(t *testing.T) { expectPrinted(t, "a { color: red } b { color: red }", "a {\n color: red;\n}\nb {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } b { color: red }", "a,\nb {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } div {} b { color: red }", "a,\nb {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } div { color: red } b { color: red }", "a,\ndiv,\nb {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } div { color: red } a { color: red }", "a,\ndiv {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } div { color: blue } b { color: red }", "a {\n color: red;\n}\ndiv {\n color: #00f;\n}\nb {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } div { color: blue } a { color: red }", "a {\n color: red;\n}\ndiv {\n color: #00f;\n}\na {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red; color: red } b { color: red }", "a,\nb {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } b { color: red; color: red }", "a,\nb {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } b { color: blue }", "a {\n color: red;\n}\nb {\n color: #00f;\n}\n", "") // Do not merge duplicates if they are "unsafe" expectPrintedMangle(t, "a { color: red } unknown { color: red }", "a {\n color: red;\n}\nunknown {\n color: red;\n}\n", "") expectPrintedMangle(t, "unknown { color: red } a { color: red }", "unknown {\n color: red;\n}\na {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } video { color: red }", "a {\n color: red;\n}\nvideo {\n color: red;\n}\n", "") expectPrintedMangle(t, "video { color: red } a { color: red }", "video {\n color: red;\n}\na {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } a:last-child { color: red }", "a {\n color: red;\n}\na:last-child {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } a[b=c i] { color: red }", "a {\n color: red;\n}\na[b=c i] {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } & { color: red }", "a {\n color: red;\n}\n& {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } a + b { color: red }", "a {\n color: red;\n}\na + b {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } a|b { color: red }", "a {\n color: red;\n}\na|b {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } a::hover { color: red }", "a {\n color: red;\n}\na::hover {\n color: red;\n}\n", "") // Still merge duplicates if they are "safe" expectPrintedMangle(t, "a { color: red } a:hover { color: red }", "a,\na:hover {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } a[b=c] { color: red }", "a,\na[b=c] {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } a#id { color: red }", "a,\na#id {\n color: red;\n}\n", "") expectPrintedMangle(t, "a { color: red } a.cls { color: red }", "a,\na.cls {\n color: red;\n}\n", "") // Skip over comments expectPrintedMangle(t, "c { color: green } a { color: red } /*!x*/ /*!y*/ b { color: blue }", "c {\n color: green;\n}\na {\n color: red;\n}\n/*!x*/\n/*!y*/\nb {\n color: #00f;\n}\n", "") expectPrintedMangle(t, "c { color: green } a { color: red } /*!x*/ /*!y*/ b { color: red }", "c {\n color: green;\n}\na,\nb {\n color: red;\n}\n/*!x*/\n/*!y*/\n", "") expectPrintedMangle(t, "c { color: green } a { color: red } /*!x*/ /*!y*/ a { color: red }", "c {\n color: green;\n}\na {\n color: red;\n}\n/*!x*/\n/*!y*/\n", "") } func TestMangleAtMedia(t *testing.T) { expectPrinted(t, "@media screen { @media screen { a { color: red } } }", "@media screen {\n @media screen {\n a {\n color: red;\n }\n }\n}\n", "") expectPrintedMangle(t, "@media screen { @media screen { a { color: red } } }", "@media screen {\n a {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "@media screen { @media not print { a { color: red } } }", "@media screen {\n @media not print {\n a {\n color: red;\n }\n }\n}\n", "") expectPrintedMangle(t, "@media screen { @media not print { @media screen { a { color: red } } } }", "@media screen {\n @media not print {\n a {\n color: red;\n }\n }\n}\n", "") expectPrintedMangle(t, "@media screen { a { color: red } @media screen { a { color: red } } }", "@media screen {\n a {\n color: red;\n }\n}\n", "") expectPrintedMangle(t, "@media screen { a { color: red } @media screen { a { color: blue } } }", "@media screen {\n a {\n color: red;\n }\n a {\n color: #00f;\n }\n}\n", "") expectPrintedMangle(t, "@media screen { .a { color: red; @media screen { .b { color: blue } } } }", "@media screen {\n .a {\n color: red;\n .b {\n color: #00f;\n }\n }\n}\n", "") expectPrintedMangle(t, "@media screen { a { color: red } } @media screen { b { color: red } }", "@media screen {\n a {\n color: red;\n }\n}\n@media screen {\n b {\n color: red;\n }\n}\n", "") } func TestFontWeight(t *testing.T) { expectPrintedMangle(t, "a { font-weight: normal }", "a {\n font-weight: 400;\n}\n", "") expectPrintedMangle(t, "a { font-weight: bold }", "a {\n font-weight: 700;\n}\n", "") expectPrintedMangle(t, "a { font-weight: 400 }", "a {\n font-weight: 400;\n}\n", "") expectPrintedMangle(t, "a { font-weight: bolder }", "a {\n font-weight: bolder;\n}\n", "") expectPrintedMangle(t, "a { font-weight: var(--var) }", "a {\n font-weight: var(--var);\n}\n", "") expectPrintedMangleMinify(t, "a { font-weight: normal }", "a{font-weight:400}", "") } func TestFontFamily(t *testing.T) { expectPrintedMangle(t, "a {font-family: aaa }", "a {\n font-family: aaa;\n}\n", "") expectPrintedMangle(t, "a {font-family: serif }", "a {\n font-family: serif;\n}\n", "") expectPrintedMangle(t, "a {font-family: 'serif' }", "a {\n font-family: \"serif\";\n}\n", "") expectPrintedMangle(t, "a {font-family: aaa bbb, serif }", "a {\n font-family: aaa bbb, serif;\n}\n", "") expectPrintedMangle(t, "a {font-family: 'aaa', serif }", "a {\n font-family: aaa, serif;\n}\n", "") expectPrintedMangle(t, "a {font-family: '\"', serif }", "a {\n font-family: '\"', serif;\n}\n", "") expectPrintedMangle(t, "a {font-family: 'aaa ', serif }", "a {\n font-family: \"aaa \", serif;\n}\n", "") expectPrintedMangle(t, "a {font-family: 'aaa bbb', serif }", "a {\n font-family: aaa bbb, serif;\n}\n", "") expectPrintedMangle(t, "a {font-family: 'aaa bbb', 'ccc ddd' }", "a {\n font-family: aaa bbb, ccc ddd;\n}\n", "") expectPrintedMangle(t, "a {font-family: 'aaa bbb', serif }", "a {\n font-family: \"aaa bbb\", serif;\n}\n", "") expectPrintedMangle(t, "a {font-family: 'aaa serif' }", "a {\n font-family: \"aaa serif\";\n}\n", "") expectPrintedMangle(t, "a {font-family: 'aaa bbb', var(--var) }", "a {\n font-family: \"aaa bbb\", var(--var);\n}\n", "") expectPrintedMangle(t, "a {font-family: 'aaa bbb', }", "a {\n font-family: \"aaa bbb\", ;\n}\n", "") expectPrintedMangle(t, "a {font-family: , 'aaa bbb' }", "a {\n font-family: , \"aaa bbb\";\n}\n", "") expectPrintedMangle(t, "a {font-family: 'aaa',, 'bbb' }", "a {\n font-family:\n \"aaa\",,\n \"bbb\";\n}\n", "") expectPrintedMangle(t, "a {font-family: 'aaa bbb', x serif }", "a {\n font-family: \"aaa bbb\", x serif;\n}\n", "") expectPrintedMangleMinify(t, "a {font-family: 'aaa bbb', serif }", "a{font-family:aaa bbb,serif}", "") expectPrintedMangleMinify(t, "a {font-family: 'aaa bbb', 'ccc ddd' }", "a{font-family:aaa bbb,ccc ddd}", "") expectPrintedMangleMinify(t, "a {font-family: 'initial', serif;}", "a{font-family:\"initial\",serif}", "") expectPrintedMangleMinify(t, "a {font-family: 'inherit', serif;}", "a{font-family:\"inherit\",serif}", "") expectPrintedMangleMinify(t, "a {font-family: 'unset', serif;}", "a{font-family:\"unset\",serif}", "") expectPrintedMangleMinify(t, "a {font-family: 'revert', serif;}", "a{font-family:\"revert\",serif}", "") expectPrintedMangleMinify(t, "a {font-family: 'revert-layer', 'Segoe UI', serif;}", "a{font-family:\"revert-layer\",Segoe UI,serif}", "") expectPrintedMangleMinify(t, "a {font-family: 'default', serif;}", "a{font-family:\"default\",serif}", "") } func TestFont(t *testing.T) { expectPrintedMangle(t, "a { font: caption }", "a {\n font: caption;\n}\n", "") expectPrintedMangle(t, "a { font: normal 1px }", "a {\n font: normal 1px;\n}\n", "") expectPrintedMangle(t, "a { font: normal bold }", "a {\n font: normal bold;\n}\n", "") expectPrintedMangle(t, "a { font: 1rem 'aaa bbb' }", "a {\n font: 1rem aaa bbb;\n}\n", "") expectPrintedMangle(t, "a { font: 1rem/1.2 'aaa bbb' }", "a {\n font: 1rem/1.2 aaa bbb;\n}\n", "") expectPrintedMangle(t, "a { font: normal 1rem 'aaa bbb' }", "a {\n font: 1rem aaa bbb;\n}\n", "") expectPrintedMangle(t, "a { font: normal 1rem 'aaa bbb', serif }", "a {\n font: 1rem aaa bbb, serif;\n}\n", "") expectPrintedMangle(t, "a { font: italic small-caps bold ultra-condensed 1rem/1.2 'aaa bbb' }", "a {\n font: italic small-caps 700 ultra-condensed 1rem/1.2 aaa bbb;\n}\n", "") expectPrintedMangle(t, "a { font: oblique 1px 'aaa bbb' }", "a {\n font: oblique 1px aaa bbb;\n}\n", "") expectPrintedMangle(t, "a { font: oblique 45deg 1px 'aaa bbb' }", "a {\n font: oblique 45deg 1px aaa bbb;\n}\n", "") expectPrintedMangle(t, "a { font: var(--var) 'aaa bbb' }", "a {\n font: var(--var) \"aaa bbb\";\n}\n", "") expectPrintedMangle(t, "a { font: normal var(--var) 'aaa bbb' }", "a {\n font: normal var(--var) \"aaa bbb\";\n}\n", "") expectPrintedMangle(t, "a { font: normal 1rem var(--var), 'aaa bbb' }", "a {\n font: normal 1rem var(--var), \"aaa bbb\";\n}\n", "") expectPrintedMangleMinify(t, "a { font: italic small-caps bold ultra-condensed 1rem/1.2 'aaa bbb' }", "a{font:italic small-caps 700 ultra-condensed 1rem/1.2 aaa bbb}", "") expectPrintedMangleMinify(t, "a { font: italic small-caps bold ultra-condensed 1rem / 1.2 'aaa bbb' }", "a{font:italic small-caps 700 ultra-condensed 1rem/1.2 aaa bbb}", "") // See: path_to_url expectPrinted(t, "a { font: 10px'foo' }", "a {\n font: 10px\"foo\";\n}\n", "") expectPrinted(t, "a { font: 10px'123' }", "a {\n font: 10px\"123\";\n}\n", "") expectPrintedMangle(t, "a { font: 10px'foo' }", "a {\n font: 10px foo;\n}\n", "") expectPrintedMangle(t, "a { font: 10px'123' }", "a {\n font: 10px\"123\";\n}\n", "") expectPrintedMangleMinify(t, "a { font: 10px'foo' }", "a{font:10px foo}", "") expectPrintedMangleMinify(t, "a { font: 10px'123' }", "a{font:10px\"123\"}", "") } func TestWarningUnexpectedCloseBrace(t *testing.T) { expectPrinted(t, ".red {\n color: red;\n}\n}\n.blue {\n color: blue;\n}\n.green {\n color: green;\n}\n", `.red { color: red; } } .blue { color: blue; } .green { color: green; } `, `<stdin>: WARNING: Unexpected "}" `) } func TestPropertyTypoWarning(t *testing.T) { expectPrinted(t, "a { z-idnex: 0 }", "a {\n z-idnex: 0;\n}\n", "<stdin>: WARNING: \"z-idnex\" is not a known CSS property\nNOTE: Did you mean \"z-index\" instead?\n") expectPrinted(t, "a { x-index: 0 }", "a {\n x-index: 0;\n}\n", "<stdin>: WARNING: \"x-index\" is not a known CSS property\nNOTE: Did you mean \"z-index\" instead?\n") // CSS variables should not be corrected expectPrinted(t, "a { --index: 0 }", "a {\n --index: 0 ;\n}\n", "") // Short names should not be corrected ("alt" is actually valid in WebKit, and should not become "all") expectPrinted(t, "a { alt: \"\" }", "a {\n alt: \"\";\n}\n", "") } func TestParseErrorRecovery(t *testing.T) { expectPrinted(t, "x { y: z", "x {\n y: z;\n}\n", "<stdin>: WARNING: Expected \"}\" to go with \"{\"\n<stdin>: NOTE: The unbalanced \"{\" is here:\n") expectPrinted(t, "x { y: (", "x {\n y: ();\n}\n", "<stdin>: WARNING: Expected \")\" to go with \"(\"\n<stdin>: NOTE: The unbalanced \"(\" is here:\n") expectPrinted(t, "x { y: [", "x {\n y: [];\n}\n", "<stdin>: WARNING: Expected \"]\" to go with \"[\"\n<stdin>: NOTE: The unbalanced \"[\" is here:\n") expectPrinted(t, "x { y: {", "x {\n y: {\n }\n}\n", "<stdin>: WARNING: Expected identifier but found whitespace\n<stdin>: WARNING: Expected \"}\" to go with \"{\"\n<stdin>: NOTE: The unbalanced \"{\" is here:\n") expectPrinted(t, "x { y: z(", "x {\n y: z();\n}\n", "<stdin>: WARNING: Expected \")\" to go with \"(\"\n<stdin>: NOTE: The unbalanced \"(\" is here:\n") expectPrinted(t, "x { y: z(abc", "x {\n y: z(abc);\n}\n", "<stdin>: WARNING: Expected \")\" to go with \"(\"\n<stdin>: NOTE: The unbalanced \"(\" is here:\n") expectPrinted(t, "x { y: url(", "x {\n y: url();\n}\n", "<stdin>: WARNING: Expected \")\" to end URL token\n<stdin>: NOTE: The unbalanced \"(\" is here:\n<stdin>: WARNING: Expected \"}\" to go with \"{\"\n<stdin>: NOTE: The unbalanced \"{\" is here:\n") expectPrinted(t, "x { y: url(abc", "x {\n y: url(abc);\n}\n", "<stdin>: WARNING: Expected \")\" to end URL token\n<stdin>: NOTE: The unbalanced \"(\" is here:\n<stdin>: WARNING: Expected \"}\" to go with \"{\"\n<stdin>: NOTE: The unbalanced \"{\" is here:\n") expectPrinted(t, "x { y: url(; }", "x {\n y: url(; };\n}\n", "<stdin>: WARNING: Expected \")\" to end URL token\n<stdin>: NOTE: The unbalanced \"(\" is here:\n<stdin>: WARNING: Expected \"}\" to go with \"{\"\n<stdin>: NOTE: The unbalanced \"{\" is here:\n") expectPrinted(t, "x { y: url(abc;", "x {\n y: url(abc;);\n}\n", "<stdin>: WARNING: Expected \")\" to end URL token\n<stdin>: NOTE: The unbalanced \"(\" is here:\n<stdin>: WARNING: Expected \"}\" to go with \"{\"\n<stdin>: NOTE: The unbalanced \"{\" is here:\n") expectPrinted(t, "/* @license */ x {} /* @preserve", "/* @license */\nx {\n}\n", "<stdin>: ERROR: Expected \"*/\" to terminate multi-line comment\n<stdin>: NOTE: The multi-line comment starts here:\n") expectPrinted(t, "a { b: c; d: 'e\n f: g; h: i }", "a {\n b: c;\n d: 'e\n f: g;\n h: i;\n}\n", "<stdin>: WARNING: Unterminated string token\n") expectPrintedMinify(t, "a { b: c; d: 'e\n f: g; h: i }", "a{b:c;d:'e\nf: g;h:i}", "<stdin>: WARNING: Unterminated string token\n") } func TestPrefixInsertion(t *testing.T) { // General "-webkit-" tests for _, key := range []string{ "backdrop-filter", "box-decoration-break", "clip-path", "font-kerning", "initial-letter", "mask-image", "mask-origin", "mask-position", "mask-repeat", "mask-size", "print-color-adjust", "text-decoration-skip", "text-emphasis-color", "text-emphasis-position", "text-emphasis-style", "text-orientation", } { expectPrintedWithAllPrefixes(t, "a { "+key+": url(x.png) }", "a {\n -webkit-"+key+": url(x.png);\n "+key+": url(x.png);\n}\n", "") expectPrintedWithAllPrefixes(t, "a { before: value; "+key+": url(x.png) }", "a {\n before: value;\n -webkit-"+key+": url(x.png);\n "+key+": url(x.png);\n}\n", "") expectPrintedWithAllPrefixes(t, "a { "+key+": url(x.png); after: value }", "a {\n -webkit-"+key+": url(x.png);\n "+key+": url(x.png);\n after: value;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { before: value; "+key+": url(x.png); after: value }", "a {\n before: value;\n -webkit-"+key+": url(x.png);\n "+key+": url(x.png);\n after: value;\n}\n", "") expectPrintedWithAllPrefixes(t, "a {\n -webkit-"+key+": url(x.png);\n "+key+": url(y.png);\n}\n", "a {\n -webkit-"+key+": url(x.png);\n "+key+": url(y.png);\n}\n", "") expectPrintedWithAllPrefixes(t, "a {\n "+key+": url(y.png);\n -webkit-"+key+": url(x.png);\n}\n", "a {\n "+key+": url(y.png);\n -webkit-"+key+": url(x.png);\n}\n", "") expectPrintedWithAllPrefixes(t, "a { "+key+": url(x.png); "+key+": url(y.png) }", "a {\n -webkit-"+key+": url(x.png);\n "+key+": url(x.png);\n -webkit-"+key+": url(y.png);\n "+key+": url(y.png);\n}\n", "") } // Special-case tests expectPrintedWithAllPrefixes(t, "a { appearance: none }", "a {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { background-clip: not-text }", "a {\n background-clip: not-text;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { background-clip: text !important }", "a {\n -webkit-background-clip: text !important;\n -ms-background-clip: text !important;\n background-clip: text !important;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { background-clip: text }", "a {\n -webkit-background-clip: text;\n -ms-background-clip: text;\n background-clip: text;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { hyphens: auto }", "a {\n -webkit-hyphens: auto;\n -moz-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { position: absolute }", "a {\n position: absolute;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { position: sticky !important }", "a {\n position: -webkit-sticky !important;\n position: sticky !important;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { position: sticky }", "a {\n position: -webkit-sticky;\n position: sticky;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { tab-size: 2 }", "a {\n -moz-tab-size: 2;\n -o-tab-size: 2;\n tab-size: 2;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { text-decoration-color: none }", "a {\n -webkit-text-decoration-color: none;\n -moz-text-decoration-color: none;\n text-decoration-color: none;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { text-decoration-line: none }", "a {\n -webkit-text-decoration-line: none;\n -moz-text-decoration-line: none;\n text-decoration-line: none;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { text-size-adjust: none }", "a {\n -webkit-text-size-adjust: none;\n -ms-text-size-adjust: none;\n text-size-adjust: none;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { user-select: none }", "a {\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: -moz-none;\n -ms-user-select: none;\n user-select: none;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { mask-composite: add, subtract, intersect, exclude }", "a {\n -webkit-mask-composite:\n source-over,\n source-out,\n source-in,\n xor;\n mask-composite:\n add,\n subtract,\n intersect,\n exclude;\n}\n", "") // Check that we insert prefixed rules each time an unprefixed rule is // encountered. This matches the behavior of the popular "autoprefixer" tool. expectPrintedWithAllPrefixes(t, "a { before: value; mask-image: a; middle: value; mask-image: b; after: value }", "a {\n before: value;\n -webkit-mask-image: a;\n mask-image: a;\n middle: value;\n -webkit-mask-image: b;\n mask-image: b;\n after: value;\n}\n", "") // Test that we don't insert duplicated rules when source code is processed // twice. This matches the behavior of the popular "autoprefixer" tool. expectPrintedWithAllPrefixes(t, "a { before: value; -webkit-text-size-adjust: 1; -ms-text-size-adjust: 2; text-size-adjust: 3; after: value }", "a {\n before: value;\n -webkit-text-size-adjust: 1;\n -ms-text-size-adjust: 2;\n text-size-adjust: 3;\n after: value;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { before: value; -webkit-text-size-adjust: 1; text-size-adjust: 3; after: value }", "a {\n before: value;\n -webkit-text-size-adjust: 1;\n -ms-text-size-adjust: 3;\n text-size-adjust: 3;\n after: value;\n}\n", "") expectPrintedWithAllPrefixes(t, "a { before: value; -ms-text-size-adjust: 2; text-size-adjust: 3; after: value }", "a {\n before: value;\n -ms-text-size-adjust: 2;\n -webkit-text-size-adjust: 3;\n text-size-adjust: 3;\n after: value;\n}\n", "") } func TestNthChild(t *testing.T) { for _, nth := range []string{"nth-child", "nth-last-child"} { expectPrinted(t, ":"+nth+"(x) {}", ":"+nth+"(x) {\n}\n", "<stdin>: WARNING: Unexpected \"x\"\n") expectPrinted(t, ":"+nth+"(1e2) {}", ":"+nth+"(1e2) {\n}\n", "<stdin>: WARNING: Unexpected \"1e2\"\n") expectPrinted(t, ":"+nth+"(-n-) {}", ":"+nth+"(-n-) {\n}\n", "<stdin>: WARNING: Expected number but found \")\"\n") expectPrinted(t, ":"+nth+"(-nn) {}", ":"+nth+"(-nn) {\n}\n", "<stdin>: WARNING: Unexpected \"-nn\"\n") expectPrinted(t, ":"+nth+"(-n-n) {}", ":"+nth+"(-n-n) {\n}\n", "<stdin>: WARNING: Unexpected \"-n-n\"\n") expectPrinted(t, ":"+nth+"(-2n-) {}", ":"+nth+"(-2n-) {\n}\n", "<stdin>: WARNING: Expected number but found \")\"\n") expectPrinted(t, ":"+nth+"(-2n-2n) {}", ":"+nth+"(-2n-2n) {\n}\n", "<stdin>: WARNING: Unexpected \"-2n-2n\"\n") expectPrinted(t, ":"+nth+"(+) {}", ":"+nth+"(+) {\n}\n", "<stdin>: WARNING: Unexpected \")\"\n") expectPrinted(t, ":"+nth+"(-) {}", ":"+nth+"(-) {\n}\n", "<stdin>: WARNING: Unexpected \"-\"\n") expectPrinted(t, ":"+nth+"(+ 2) {}", ":"+nth+"(+ 2) {\n}\n", "<stdin>: WARNING: Unexpected whitespace\n") expectPrinted(t, ":"+nth+"(- 2) {}", ":"+nth+"(- 2) {\n}\n", "<stdin>: WARNING: Unexpected \"-\"\n") expectPrinted(t, ":"+nth+"(0) {}", ":"+nth+"(0) {\n}\n", "") expectPrinted(t, ":"+nth+"(0 ) {}", ":"+nth+"(0) {\n}\n", "") expectPrinted(t, ":"+nth+"( 0) {}", ":"+nth+"(0) {\n}\n", "") expectPrinted(t, ":"+nth+"(00) {}", ":"+nth+"(0) {\n}\n", "") expectPrinted(t, ":"+nth+"(01) {}", ":"+nth+"(1) {\n}\n", "") expectPrinted(t, ":"+nth+"(0n) {}", ":"+nth+"(0n) {\n}\n", "") expectPrinted(t, ":"+nth+"(n) {}", ":"+nth+"(n) {\n}\n", "") expectPrinted(t, ":"+nth+"(-n) {}", ":"+nth+"(-n) {\n}\n", "") expectPrinted(t, ":"+nth+"(1n) {}", ":"+nth+"(n) {\n}\n", "") expectPrinted(t, ":"+nth+"(-1n) {}", ":"+nth+"(-n) {\n}\n", "") expectPrinted(t, ":"+nth+"(2n) {}", ":"+nth+"(2n) {\n}\n", "") expectPrinted(t, ":"+nth+"(-2n) {}", ":"+nth+"(-2n) {\n}\n", "") expectPrinted(t, ":"+nth+"(odd) {}", ":"+nth+"(odd) {\n}\n", "") expectPrinted(t, ":"+nth+"(odd ) {}", ":"+nth+"(odd) {\n}\n", "") expectPrinted(t, ":"+nth+"( odd) {}", ":"+nth+"(odd) {\n}\n", "") expectPrinted(t, ":"+nth+"(even) {}", ":"+nth+"(even) {\n}\n", "") expectPrinted(t, ":"+nth+"(even ) {}", ":"+nth+"(even) {\n}\n", "") expectPrinted(t, ":"+nth+"( even) {}", ":"+nth+"(even) {\n}\n", "") expectPrinted(t, ":"+nth+"(n+3) {}", ":"+nth+"(n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"(n-3) {}", ":"+nth+"(n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"(n +3) {}", ":"+nth+"(n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"(n -3) {}", ":"+nth+"(n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"(n+ 3) {}", ":"+nth+"(n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"(n- 3) {}", ":"+nth+"(n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"( n + 3 ) {}", ":"+nth+"(n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"( n - 3 ) {}", ":"+nth+"(n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"(+n+3) {}", ":"+nth+"(n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"(+n-3) {}", ":"+nth+"(n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"(-n+3) {}", ":"+nth+"(-n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"(-n-3) {}", ":"+nth+"(-n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"( +n + 3 ) {}", ":"+nth+"(n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"( +n - 3 ) {}", ":"+nth+"(n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"( -n + 3 ) {}", ":"+nth+"(-n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"( -n - 3 ) {}", ":"+nth+"(-n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"(2n+3) {}", ":"+nth+"(2n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"(2n-3) {}", ":"+nth+"(2n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"(2n +3) {}", ":"+nth+"(2n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"(2n -3) {}", ":"+nth+"(2n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"(2n+ 3) {}", ":"+nth+"(2n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"(2n- 3) {}", ":"+nth+"(2n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"( 2n + 3 ) {}", ":"+nth+"(2n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"( 2n - 3 ) {}", ":"+nth+"(2n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"(+2n+3) {}", ":"+nth+"(2n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"(+2n-3) {}", ":"+nth+"(2n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"(-2n+3) {}", ":"+nth+"(-2n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"(-2n-3) {}", ":"+nth+"(-2n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"( +2n + 3 ) {}", ":"+nth+"(2n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"( +2n - 3 ) {}", ":"+nth+"(2n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"( -2n + 3 ) {}", ":"+nth+"(-2n+3) {\n}\n", "") expectPrinted(t, ":"+nth+"( -2n - 3 ) {}", ":"+nth+"(-2n-3) {\n}\n", "") expectPrinted(t, ":"+nth+"(2n of + .foo) {}", ":"+nth+"(2n of + .foo) {\n}\n", "<stdin>: WARNING: Unexpected \"+\"\n") expectPrinted(t, ":"+nth+"(2n of .foo, ~.bar) {}", ":"+nth+"(2n of .foo, ~.bar) {\n}\n", "<stdin>: WARNING: Unexpected \"~\"\n") expectPrinted(t, ":"+nth+"(2n of .foo) {}", ":"+nth+"(2n of .foo) {\n}\n", "") expectPrinted(t, ":"+nth+"(2n of.foo+.bar) {}", ":"+nth+"(2n of .foo + .bar) {\n}\n", "") expectPrinted(t, ":"+nth+"(2n of[href]) {}", ":"+nth+"(2n of [href]) {\n}\n", "") expectPrinted(t, ":"+nth+"(2n of.foo,.bar) {}", ":"+nth+"(2n of .foo, .bar) {\n}\n", "") expectPrinted(t, ":"+nth+"(2n of .foo, .bar) {}", ":"+nth+"(2n of .foo, .bar) {\n}\n", "") expectPrinted(t, ":"+nth+"(2n of .foo , .bar ) {}", ":"+nth+"(2n of .foo, .bar) {\n}\n", "") expectPrintedMinify(t, ":"+nth+"(2n of [foo] , [bar] ) {}", ":"+nth+"(2n of[foo],[bar]){}", "") expectPrintedMinify(t, ":"+nth+"(2n of .foo , .bar ) {}", ":"+nth+"(2n of.foo,.bar){}", "") expectPrintedMinify(t, ":"+nth+"(2n of #foo , #bar ) {}", ":"+nth+"(2n of#foo,#bar){}", "") expectPrintedMinify(t, ":"+nth+"(2n of :foo , :bar ) {}", ":"+nth+"(2n of:foo,:bar){}", "") expectPrintedMinify(t, ":"+nth+"(2n of div , span ) {}", ":"+nth+"(2n of div,span){}", "") expectPrintedMangle(t, ":"+nth+"(even) { color: red }", ":"+nth+"(2n) {\n color: red;\n}\n", "") expectPrintedMangle(t, ":"+nth+"(2n+1) { color: red }", ":"+nth+"(odd) {\n color: red;\n}\n", "") expectPrintedMangle(t, ":"+nth+"(0n) { color: red }", ":"+nth+"(0) {\n color: red;\n}\n", "") expectPrintedMangle(t, ":"+nth+"(0n+0) { color: red }", ":"+nth+"(0) {\n color: red;\n}\n", "") expectPrintedMangle(t, ":"+nth+"(1n+0) { color: red }", ":"+nth+"(n) {\n color: red;\n}\n", "") expectPrintedMangle(t, ":"+nth+"(0n-2) { color: red }", ":"+nth+"(-2) {\n color: red;\n}\n", "") expectPrintedMangle(t, ":"+nth+"(0n+2) { color: red }", ":"+nth+"(2) {\n color: red;\n}\n", "") } for _, nth := range []string{"nth-of-type", "nth-last-of-type"} { expectPrinted(t, ":"+nth+"(2n of .foo) {}", ":"+nth+"(2n of .foo) {\n}\n", "<stdin>: WARNING: Expected \")\" to go with \"(\"\n<stdin>: NOTE: The unbalanced \"(\" is here:\n") expectPrinted(t, ":"+nth+"(+2n + 1) {}", ":"+nth+"(2n+1) {\n}\n", "") } } func TestComposes(t *testing.T) { expectPrinted(t, ".foo { composes: bar; color: red }", ".foo {\n composes: bar;\n color: red;\n}\n", "") expectPrinted(t, ".foo .bar { composes: bar; color: red }", ".foo .bar {\n composes: bar;\n color: red;\n}\n", "") expectPrinted(t, ".foo, .bar { composes: bar; color: red }", ".foo,\n.bar {\n composes: bar;\n color: red;\n}\n", "") expectPrintedLocal(t, ".foo { composes: bar; color: red }", ".foo {\n color: red;\n}\n", "") expectPrintedLocal(t, ".foo { composes: bar baz; color: red }", ".foo {\n color: red;\n}\n", "") expectPrintedLocal(t, ".foo { composes: bar from global; color: red }", ".foo {\n color: red;\n}\n", "") expectPrintedLocal(t, ".foo { composes: bar from \"file.css\"; color: red }", ".foo {\n color: red;\n}\n", "") expectPrintedLocal(t, ".foo { composes: bar from url(file.css); color: red }", ".foo {\n color: red;\n}\n", "") expectPrintedLocal(t, ".foo { & { composes: bar; color: red } }", ".foo {\n & {\n color: red;\n }\n}\n", "") expectPrintedLocal(t, ".foo { :local { composes: bar; color: red } }", ".foo {\n color: red;\n}\n", "") expectPrintedLocal(t, ".foo { :global { composes: bar; color: red } }", ".foo {\n color: red;\n}\n", "") expectPrinted(t, ".foo, .bar { composes: bar from github }", ".foo,\n.bar {\n composes: bar from github;\n}\n", "") expectPrintedLocal(t, ".foo { composes: bar from github }", ".foo {\n}\n", "<stdin>: WARNING: \"composes\" declaration uses invalid location \"github\"\n") badComposes := "<stdin>: WARNING: \"composes\" only works inside single class selectors\n" + "<stdin>: NOTE: The parent selector is not a single class selector because of the syntax here:\n" expectPrintedLocal(t, "& { composes: bar; color: red }", "& {\n color: red;\n}\n", badComposes) expectPrintedLocal(t, ".foo& { composes: bar; color: red }", "&.foo {\n color: red;\n}\n", badComposes) expectPrintedLocal(t, ".foo.bar { composes: bar; color: red }", ".foo.bar {\n color: red;\n}\n", badComposes) expectPrintedLocal(t, ".foo:hover { composes: bar; color: red }", ".foo:hover {\n color: red;\n}\n", badComposes) expectPrintedLocal(t, ".foo[href] { composes: bar; color: red }", ".foo[href] {\n color: red;\n}\n", badComposes) expectPrintedLocal(t, ".foo .bar { composes: bar; color: red }", ".foo .bar {\n color: red;\n}\n", badComposes) expectPrintedLocal(t, ".foo, div { composes: bar; color: red }", ".foo,\ndiv {\n color: red;\n}\n", badComposes) expectPrintedLocal(t, ".foo { .bar { composes: foo; color: red } }", ".foo {\n .bar {\n color: red;\n }\n}\n", badComposes) } ```
The 1832–33 United States House of Representatives elections were held on various dates in various states between July 2, 1832 and October 7, 1833. Each state set its own date for its elections to the House of Representatives before the first session of the 23rd United States Congress convened on December 2, 1833. They were held concurrently with the 1832 presidential election, in which Democrat Andrew Jackson was re-elected. The congressional reapportionment based on the 1830 United States Census increased the size of the House to 240 seats. The Jacksonians gained 17 seats, picking up several new seats in districts that were created by the reapportionment, with the rival National Republican Party losing three seats. Economic issues were key factors in this election: Southern agricultural districts reacted angrily to the passage of the Tariff of 1832, which led to the Nullification Crisis. President Andrew Jackson and the Jacksonians showed a distrust for the banking sector, particularly the central Second Bank of the United States, which was strongly supported by the rival National Republican Party. The third-party Anti-Masonic Party, based on anti-Masonry, gained eight seats, and Nullifier Party, a John C. Calhoun-led states' rights party that supported South Carolina in the Nullification Crisis, picked up eight of the nine representatives in South Carolina's delegation. The House initially elected Andrew Stevenson as Speaker, but he resigned from the House after President Jackson appointed him as U.S. Minister to the United Kingdom: National Republican Representatives subsequently elected John Bell as Speaker over James Polk. Election summaries Following the 1830 Census, 27 new seats were apportioned, with 4 states losing 1 seat each, 8 states having no change, and the remaining 12 states gaining between 1 and 6 seats. Special elections 22nd Congress |- ! | George Edward Mitchell | | Jacksonian | 18221826 1829 | | Incumbent died June 28, 1832.New member elected October 1, 1832.Jacksonian hold.Successor seated December 3, 1832. | nowrap | |- ! | Charles Clement Johnston | | Jacksonian | 1831 | | Incumbent died June 17, 1832.New member elected in 1832.Jacksonian hold.Successor seated December 12, 1832. | nowrap | |- ! | Jonathan Hunt | | NationalRepublican | 1827 | | Incumbent died May 15, 1832.New member elected January 1, 1833 on the fourth ballot.National Republican hold.Winner also elected the same day to the next term, see below.Successor seated January 21, 1833. | nowrap | :::: |- ! | Philip Doddridge | | NationalRepublican | 1829 | | Incumbent died November 19, 1832.New member elected January 1, 1833.Jacksonian gain.Successor seated January 21, 1833. | nowrap | |} 23rd Congress |- ! | John Randolph | | Jacksonian | 18151817 18191825 18271829 1833 | | Incumbent died May 24, 1833.New member elected in August 1833.Jacksonian hold. | nowrap | |- ! | Joel B. Sutherland | | Jacksonian | 1826 | | Incumbent member-elect resigned March 3, 1833, to become a judge, but then resigned that position to run for this seat.Incumbent re-elected October 8, 1833. | nowrap | |} Alabama |- ! |- ! |- ! |- ! |- ! |} Connecticut Connecticut kept its apportionment at 6 seats and elected its members at-large April 11, 1833. |- ! rowspan=6 | | Noyes Barber | | NationalRepublican | 1821 | Incumbent re-elected. | rowspan=6 nowrap | |- | William W. Ellsworth | | National Republican | 1829 | Incumbent re-elected. |- | Ebenezer Young | | National Republican | 1829 | Incumbent re-elected. |- | Jabez W. Huntington | | National Republican | 1829 | Incumbent re-elected. |- | Ralph I. Ingersoll | | National Republican | 1825 | | Incumbent retired.New member elected.National Republican hold. |- | William L. Storrs | | National Republican | 1829 | | Incumbent retired.New member elected.National Republican hold. |} Delaware |- ! |} Georgia Georgia now had 9 seats, having gained 2 seats in reapportionment, and elected its members at-large on October 1, 1832. |- ! rowspan=9 | | James M. Wayne | | Jacksonian | 1828 | Incumbent re-elected. | rowspan=9 nowrap | |- | Richard Henry Wilde | | Jacksonian | 18141816 1824 1826 1827 | Incumbent re-elected. |- | Wiley Thompson | | Jacksonian | 1820 | | Incumbent retired.New member elected.Jacksonian hold. |- | Augustin S. Clayton | | Jacksonian | 1831 | Incumbent re-elected. |- | Thomas F. Foster | | Jacksonian | 1828 | Incumbent re-elected. |- | Henry G. Lamar | | Jacksonian | 1829 | | Incumbent lost re-election.New member elected.Jacksonian hold. |- | Daniel Newnan | | Jacksonian | 1830 | | Incumbent lost re-election.New member elected.Jacksonian hold. |- | colspan=3 | New seat | | New seat.Jacksonian gain. |- | colspan=3 | New seat | | New seat.Jacksonian gain. |} Illinois Illinois gained two seats in reapportionment and elected its three members on August 6, 1832. |- ! | colspan=3 | None | | New seat.Jacksonian gain. | nowrap | |- ! | colspan=3 | None | | New seat.Jacksonian gain. | nowrap | |- ! | Joseph Duncan | | Jacksonian | 1826 | Incumbent re-elected. | nowrap | |} Indiana |- ! |- ! |- ! |- ! |- ! |- ! |- ! |} Kentucky |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |} Louisiana |- ! |- ! |- ! |} Maine Maine held its elections September 9, 1833. |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! | colspan=3 | None | | New seat.Jacksonian gain. | nowrap | |} Maryland |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |} Massachusetts Elections were held April 1, 1833, after the term began but before the House convened in December 1833. However, at least one district went to several ballots into early 1834. |- ! | Benjamin Gorham | | NationalRepublican | 1820 1822 1827 | | Incumbent retired.New member elected.National Republican hold. | nowrap | |- ! | Benjamin Crowninshield | | Jacksonian | 1823 | | Incumbent lost re-election.New member elected.National Republican gain. | nowrap | |- ! | Jeremiah Nelson | | NationalRepublican | 1832 | | Incumbent retired.New member elected late on the third ballot.Jacksonian gain. | nowrap | ::: |- ! | Edward Everett | | NationalRepublican | 1830 | Incumbent re-elected. | nowrap | |- ! | John Davis | | NationalRepublican | 1824 | Incumbent re-elected. | nowrap | |- ! | George Grennell Jr. | | NationalRepublican | 1828 | Incumbent re-elected. | nowrap | |- ! |- ! | Isaac C. Bates | | NationalRepublican | 1826 | Incumbent re-elected. | nowrap | |- ! | Henry Dearborn | | NationalRepublican | 1830 | | Incumbent lost re-election.New member elected late on the eighth ballot.Anti-Masonic gain. | nowrap | :::::::: |- ! | James L. Hodges | | NationalRepublican | 1827 | | Incumbent retired.New member elected.National Republican hold. | nowrap | |- ! |- ! | John Quincy Adams | | NationalRepublican | 1830 | |Incumbent re-elected from a new party.Anti-Masonic gain. | nowrap | |} Mississippi Elections held early, on August 6, 1832. |- ! rowspan=2 | 2 seats on a general ticket | Franklin E. Plummer | | Jacksonian | 1830 | Incumbent re-elected. | nowrap rowspan=2 | |- | colspan=3 | None | | New seat.Jacksonian gain. |} Missouri |- ! rowspan=2 | |} New Hampshire |- ! rowspan=9 | | John Brodhead | | Jacksonian | 1829 | | Incumbent retired.New member elected.Jacksonian hold. | rowspan=5 nowrap | |- | Thomas Chandler | | Jacksonian | 1829 | | Incumbent retired.New member elected.Jacksonian hold. |- | Joseph Hammons | | Jacksonian | 1829 | | Incumbent retired.New member elected.Jacksonian hold. |- | Joseph M. Harper | | Jacksonian | 1831 | Incumbent re-elected. |- | Henry Hubbard | | Jacksonian | 1829 | Incumbent re-elected. |} New Jersey |- ! rowspan=6 | |} New York New York elected its 40 members from November 5 to 7, 1832. It gained seven members from reapportionment. Two members were elected in the 8th, 17th, 22nd, and 23rd districts, while four members were elected in the 3rd district on a general ticket. |- ! | James Lent | | Jacksonian | 1828 | | Incumbent retired.New member elected.Jacksonian hold. | nowrap | |- ! | John T. Bergen | | Jacksonian | 1830 | | Incumbent retired.New member elected.Jacksonian hold. | nowrap | |- ! rowspan=4 | | Churchill C. Cambreleng | | Jacksonian | 1821 | Incumbent re-elected. | rowspan=4 nowrap | |- | Campbell P. White | | Jacksonian | 1828 | Incumbent re-elected. |- | Gulian C. Verplanck | | Jacksonian | 1824 | | Incumbent retired.New member elected.Jacksonian hold. |- | colspan=3 | None | | New seat.Jacksonian gain. |- ! | Aaron Ward | | Jacksonian | 1830 | Incumbent re-elected. | nowrap | |- ! | Edmund H. Pendleton | | NationalRepublican | 1830 | | Incumbent lost re-election.New member elected.Jacksonian gain. | nowrap | |- ! | Samuel J. Wilkin | | NationalRepublican | 1830 | | Incumbent lost re-election.New member elected.Jacksonian gain. | nowrap | |- ! | John C. Brodhead | | Jacksonian | 1830 | | Incumbent retired.New member elected.Jacksonian hold. | nowrap | |- ! rowspan=2 | | John King | | Jacksonian | 1830 | | Incumbent retired.New member elected.Jacksonian hold. | rowspan=2 nowrap | |- | colspan=3 | None | | New seat.Jacksonian gain. |- ! | Job Pierson | | Jacksonian | 1830 | Incumbent re-elected. | nowrap | |- ! | Gerrit Y. Lansing | | Jacksonian | 1830 | Incumbent re-elected. | nowrap | |- ! | John W. Taylor | | NationalRepublican | 1812 | | Incumbent lost re-election.New member elected.Jacksonian gain. | nowrap | |- ! | Joseph Bouck | | Jacksonian | 1830 | | Incumbent retired.New member elected.Anti-Masonic gain. | nowrap | |- ! | William G. Angel | | Jacksonian | 1828 | | Incumbent retired.New member elected.Jacksonian hold. | nowrap | |- ! | Erastus Root | | Jacksonian | 1830 | | Incumbent retired.New member elected.Jacksonian hold. | nowrap | |- ! | Michael Hoffman | | Jacksonian | 1824 | | Incumbent retired.New member elected.Jacksonian hold. | nowrap | |- ! | Nathan Soule | | Jacksonian | 1830 | | Incumbent retired.New member elected.Jacksonian hold. | nowrap | |- ! rowspan=2 | | Samuel Beardsley | | Jacksonian | 1830 | Incumbent re-elected. | rowspan=2 nowrap | |- | Nathaniel Pitcher | | Jacksonian | 1830 | | Incumbent retired.New member elected.Jacksonian hold. |- ! | Daniel Wardwell | | Jacksonian | 1830 | Incumbent re-elected. | nowrap | |- ! | William Hogan | | Jacksonian | 1830 | | Incumbent lost renomination.New member elected.Jacksonian hold. | nowrap | |- ! | John A. Collier | | Anti-Masonic | 1830 | | Incumbent lost re-election.New member elected.Jacksonian gain. | nowrap | |- ! | Charles Dayan | | Jacksonian | 1830 | | Incumbent retired.New member elected.Jacksonian hold. | nowrap | |- ! rowspan=2 | | Edward C. Reed | | Jacksonian | 1830 | | Incumbent retired.New member elected.Jacksonian hold. | rowspan=2 nowrap | |- | Gamaliel H. Barstow | | Anti-Masonic | 1830 | | Incumbent lost re-election.New member elected.Jacksonian gain. |- ! rowspan=2 | | Freeborn G. Jewett | | Jacksonian | 1830 | | Incumbent retired.New member elected.Jacksonian hold. | rowspan=2 nowrap | |- | colspan=3 | None | | New seat.Jacksonian gain. |- ! | Ulysses F. Doubleday | | Jacksonian | 1830 | | Incumbent retired.New member elected.Jacksonian hold. | nowrap | |- ! | William Babcock | | Anti-Masonic | 1830 | | Incumbent retired.New member elected.Jacksonian gain. | nowrap | |- ! | John Dickson | | Anti-Masonic | 1830 | Incumbent re-elected. | nowrap | |- ! | Grattan H. Wheeler | | Anti-Masonic | 1830 | | Incumbent retired.New member elected.Jacksonian gain. | nowrap | |- ! | Frederick Whittlesey | | Anti-Masonic | 1830 | Incumbent re-elected. | nowrap | |- ! | Phineas L. Tracy | | Anti-Masonic | 1827 | | Incumbent retired.New member elected.Anti-Masonic hold. | nowrap | |- ! | Bates Cooke | | Anti-Masonic | 1830 | | Incumbent retired.New member elected.Anti-Masonic hold. | nowrap | |- ! | colspan=3 | None | | New seat.Anti-Masonic gain. | nowrap | |- ! | colspan=3 | None | | New seat.Anti-Masonic gain. | nowrap | |- ! | colspan=3 | None | | New seat.Anti-Masonic gain. | nowrap | |} North Carolina |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! | Samuel Price Carson | | Jacksonian | 1825 | | Incumbent lost re-election.New member elected.National Republican gain. | nowrap | |- ! |} Ohio |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |} Pennsylvania Following the reapportionment resulting from the 1830 census, Pennsylvania gained two representatives, increasing from 26 to 28, and was redistricted into 25 districts, two of which were plural districts. Pennsylvania elected its members October 9, 1832. |- ! | Joel B. Sutherland | | Jacksonian | 1826 | Incumbent re-elected.Winner resigned to become a judge, but then won re-election to the seat. | nowrap | |- ! rowspan=2 | | Henry Horn | | Jacksonian | 1830 | | Incumbent lost re-election.New member elected.National Republican gain. | rowspan=2 nowrap | |- | colspan=3 | None (Seat created) | | New seat.National Republican gain. |- ! | John G. Watmough | | NationalRepublican | 1830 | Incumbent re-elected. | nowrap | |- ! rowspan=3 | | William Hiester | | Anti-Masonic | 1830 | Incumbent re-elected. | rowspan=3 nowrap | |- | Joshua Evans Jr. | | Jacksonian | 1828 | | Incumbent retired.New member elected.Anti-Masonic gain. |- | David Potts Jr. | | Anti-Masonic | 1830 | Incumbent re-elected. |- ! | Joel K. Mann | | Jacksonian | 1830 | Incumbent re-elected. | nowrap | |- ! | colspan=3 | None (District created) | | New seat.Jacksonian gain. | nowrap | |- ! | Peter Ihrie Jr. | | Jacksonian | 1829 | | Incumbent lost re-election.New member elected.Jacksonian hold | nowrap | |- ! | Henry King | | Jacksonian | 1830 | Incumbent re-elected. | nowrap | |- ! | Henry A. P. Muhlenberg | | Jacksonian | 1828 | Incumbent re-elected. | nowrap | |- ! | John C. Bucher | | Jacksonian | 1830 | | Incumbent lost re-election.New member elected.Anti-Masonic gain. | nowrap | |- ! | Adam King | | Jacksonian | 1826 | | Incumbent lost re-election.New member elected.Anti-Masonic gain. | nowrap | |- ! | Thomas H. Crawford | | Jacksonian | 1828 | | Incumbent lost re-election.New member elected.Anti-Masonic gain. | nowrap | |- ! | colspan=3 | None (District created) | | New seat.Jacksonian gain. | nowrap | |- ! | colspan=3 | None (District created) | | New seat.Jacksonian gain. | nowrap | |- ! | colspan=3 | None (District created) | | New seat.Jacksonian gain. | nowrap | |- ! | colspan=3 | None (District created) | | New seat.Jacksonian gain. | nowrap | |- ! | colspan=3 | None (District created) | | New seat.Jacksonian gain. | nowrap | |- ! | George Burd | | NationalRepublican | 1830 | Incumbent re-elected. | nowrap | |- ! | Richard Coulter | | Jacksonian | 1826 | Incumbent re-elected. | nowrap | |- ! | Andrew Stewart | | Anti-Masonic | 18201828 1830 | Incumbent re-elected. | nowrap | |- ! | Thomas M. T. McKennan | | Anti-Masonic | 1830 | Incumbent re-elected. | nowrap | |- ! | Harmar Denny | | Anti-Masonic | 1829 | Incumbent re-elected. | nowrap | |- ! | colspan=3 | None (District created) | | New seat.Jacksonian gain. | nowrap | |- ! | John Banks | | Anti-Masonic | 1830 | Incumbent re-elected. | nowrap | |- ! | colspan=3 | None (District created) | | New seat.Jacksonian gain. | nowrap | |} Rhode Island ! rowspan=2 | |} South Carolina |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |} Tennessee Elections held late, from August 1 to August 2, 1833. |- ! rowspan=2 | | John Blair | | Jacksonian | 1823 | Incumbent re-elected. | rowspan=2 nowrap | |- | Thomas D. Arnold | | NationalRepublican | 1831 | Redistricted from the . |- ! | Thomas D. Arnold | | NationalRepublican | 1831 | |Incumbent redistricted to the .New member elected.Jacksonian gain. | nowrap | |- ! | James I. Standifer | | Jacksonian | 1829 | |Incumbent redistricted to the .New member elected.Jacksonian hold. | nowrap | |- ! rowspan=2 | | Jacob C. Isacks | | Jacksonian | 1823 | |Incumbent redistricted to the .New member elected.Jacksonian hold. | nowrap rowspan=2 | |- | James I. Standifer | | Jacksonian | 1829 | Redistricted from the . |- ! rowspan=2 | | William Hall | | Jacksonian | 1831 | | Incumbent retired.New member elected.Jacksonian hold. | nowrap rowspan=2 | |- | Jacob C. Isacks | | Jacksonian | 1823 | Redistricted from the . |- ! | James K. Polk | | Jacksonian | 1825 | |Incumbent redistricted to the .New member elected.Jacksonian hold. | nowrap | |- ! | John Bell | | Jacksonian | 1827 | Incumbent re-elected. | nowrap | |- ! | Cave Johnson | | Jacksonian | 1829 | | Incumbent redistricted to the .New member elected.Jacksonian hold. | nowrap | |- ! rowspan=2 | | William Fitzgerald | | Jacksonian | 1831 | | Incumbent redistricted to the .New member elected.Jacksonian hold. | nowrap rowspan=2 | |- | James K. Polk | | Jacksonian | 1825 | Redistricted from the . |- ! | colspan=3 | None (District created) | | New seat.Jacksonian gain. | nowrap | |- ! | Cave Johnson | | Jacksonian | 1829 | | Incumbent redistricted from the .Jacksonian gain. | nowrap | |- ! | William Fitzgerald | | Jacksonian | 1831 | | Incumbent redistricted from the .New member elected.National Republican gain. | nowrap | |- ! | colspan=3 | None (District created) | | New seat.Jacksonian gain. | nowrap | |} Vermont Vermont elected its members January 1, 1833, but two were elected late in the Spring of 1833. The 's election in the previous cycle (1830–1831) went to eleven ballots, so its member wasn't elected until the 1832, near the beginning of this cycle (1832–1833). |- ! | Jonathan Hunt | | NationalRepublican | 1827 | | Incumbent died May 15, 1832.New member elected.Winner also elected the same day to finish the current term. | nowrap | |- ! | William Slade | | Anti-Masonic | 1831 | Incumbent re-elected. | nowrap | |- ! | Horace Everett | | NationalRepublican | 1828 | Incumbent re-elected on the third ballot. | nowrap | ::: |- ! | Heman Allen | | NationalRepublican | 1832 | Incumbent re-elected. | nowrap | |- ! | William Cahoon | | Anti-Masonic | 1829 | | Incumbent lost re-election.New member elected on the second ballot.Anti-Masonic hold. | nowrap | :: |} Virginia |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |- ! |} Non-voting delegates Arkansas Territory |- ! | Ambrose H. Sevier | | Jacksonian | 1828 | Incumbent re-elected on an unknown date. | nowrap | |} Florida Territory |- ! | Joseph M. White | | Jacksonian | 1825 | Incumbent re-elected on an unknown date. | nowrap | |} Michigan Territory |- ! | Austin Eli Wing | | Jacksonian | 1830 or 1831 | | Incumbent retired.New delegate elected.Jacksonian hold. | nowrap | |} See also 1832 United States elections List of United States House of Representatives elections (1824–1854) 1832 United States presidential election 1832–33 United States Senate elections 22nd United States Congress 23rd United States Congress Notes References Bibliography External links Office of the Historian (Office of Art & Archives, Office of the Clerk, U.S. House of Representatives)
National Rural Research Network (NRRN) (Francais: Réseau National de Researche Rurale) is an organization representing post-secondary students, academics, government representatives, and community development practitioners interested in rural development issues, opportunities, and challenges in Canada. NRRN was established in 2005 through funding of the Rural Secretariat and facilitated by the Canadian Rural Revitalization Foundation. The purpose of NRRN is to facilitate the research and information needs of people involved in rural community development. In particular, NRRN is involved with policy and program practitioners across all levels of government; community leaders in economic and social development; producers and producer associations; rural researchers; and those who commission or who seek funding for rural research. Events To facilitate opportunities for community leaders, students, academics, and government to discuss rural issues and opportunities, NRRN has hosted a number of forums and conferences. 2005 Rural Immigration Think Tank (Brandon, Manitoba) CRRF-NRRN Annual Policy Conference (Gatineau, Quebec and Lankark County, Ontario) 2006 CRRF-NRRN Annual Policy Conference (Twillingate, Newfoundland and Labrador) 2007 CRRF-NRRN Annual Policy Conference (Vermilion, Alberta) 2008 Northern Dialogue Session (Whitehorse, Yukon) CRRF-NRRN Annual Policy Conference (Inuvik, Northwest Territories) Governance NRRN is governed Shirley Dawe (Western Economic Diversification Canada), Bill Reimer (Concordia University), David Douglas (University of Guelph), Robert Annis (Rural Development Institute, Brandon University), Ray Bollman (Statistics Canada), Mike Stolte (The CIEL), Kate Humpage (Rural Secretariat), Rob Greenwood (Harris Centre, Memorial University). References External links National Rural Research Network Canadian Rural Revitalization Foundation Research institutes in Canada Rural research centres
The Dean of Jersey is the leader of the Church of England in Jersey. He is ex officio a member of the States of Jersey, although since the constitutional reforms of 1948 the Dean may not take part in parliamentary votes. The Dean acts as the chaplain of the States Assembly and may speak in debates on any matter. The Dean is appointed by the Crown by means of letters patent and sworn into that office by Jersey's Royal Court. The Dean also serves as rector of one of the Parishes of Jersey and is instituted and inducted in that office by the Bishop of Winchester. Since 1784 it has been customary (but not obligatory) for the Dean to also be the rector of the Parish Church of St Helier, but this has not always been the case. For example, William Corbet Le Breton, father of Lillie Langtry, was rector of Saint Saviour at the time he became Dean, though transferred to St Helier in 1875. Since 1661, the Dean of Jersey has a seal of pointed ellipse type. The arms of the deanery impale those of each individual (or alternatively a monogram). The Dean of Jersey presides over the ecclesiastical court. List of deans See also Dean of Guernsey References Bibliography Customs, Ceremonies & Traditions of the Channel Islands, Lemprière, 1976, External links The Channel Islands on Diocese of Winchester Jersey clergy Jersey Parochial politics of Jersey Jersey Christianity in Jersey Members of the States of Jersey Deans of Jersey 1620 establishments in the British Empire
Jonas Aspelin (8 September 1884 – 3 September 1964) was a Norwegian businessperson. He was born in Kristiania as a son of Gustaf Aspelin (1857–1917) and Elisa Holmboe (1865–1926). He was thus a maternal great-grandson of Leonhard Christian Borchgrevink Holmboe and nephew of Carl Fredrik Holmboe. His sister Karen married Ragnar Sommar Bruzelius, mayor of Gustaf's city of origin Kristianstad. Jonas Aspelin attended commerce school, and spent about five years abroad in Germany, England and the United States. His father had founded an eponymous company for wholesale of metals in 1881. Gustaf Aspelin died in 1917, and Jonas took over, and later took his brother Knut on board as co-owner. He was also a deputy chair of the employers' association Jerngrossistenes Forening and supervisory council member of Storebrand. He was appointed Swedish consul to Norway in 1924, and promoted to consul-general in 1929. He served in this capacity for about thirty years. He also chaired the friendship society Swedish Society, which had been co-founded and chaired by his father. Early in his career he was decorated as a Commander of the Order of Vasa and a Knight of the Order of the Polar Star. In 1952 he became a Knight, First Class of the Order of St. Olav. He died in September 1964 and was buried in Ris. References 1884 births 1964 deaths Businesspeople from Oslo Norwegian people of Swedish descent 20th-century Norwegian businesspeople Norwegian expatriates in Germany Norwegian expatriates in the United Kingdom Norwegian expatriates in the United States Commanders of the Order of Vasa Knights of the Order of the Polar Star Holmboe family
A point man is a soldier in the front of a military advance. Point man may also refer to: Point Man, a 2019 Vietnam War film Point Man, a character in the video game F.E.A.R. Pointman, a television series Pointman (user interface), device used to control one's avatar
Mount Suarez () is a mountain, 2,360 m, standing just east of Mount Noville on the divide between Van Reeth and Robison Glaciers, in the Queen Maud Mountains. Mapped by United States Geological Survey (USGS) from surveys and U.S. Navy air photos, 1960–64. Named by Advisory Committee on Antarctic Names (US-ACAN) for LTJG Ralph Suarez, aircraft navigator of U.S. Navy Squadron VX-6 on Operation Deep Freeze 1965, 1966 and 1967. Mountains of Marie Byrd Land
George Monger (3 March 1840 – 9 August 1887) was an English recipient of the Victoria Cross, the highest and most prestigious award for gallantry in the face of the enemy that can be awarded to British and Commonwealth forces. Details Monger was 17 years old, and a private in the 23rd Regiment of Foot (later The Royal Welch Fusiliers), British Army during the Indian Mutiny when the following deed took place on 18 November 1857 at Secundra Bagh, Lucknow, India for which he was awarded the VC: Private Monger volunteered to accompany an officer, Thomas Bernard Hackett, whom he assisted in rescuing a corporal of the 23rd Regiment of Foot, who was lying wounded and exposed to very heavy fire. His citation reads: Further information He died in 1887 at the age of 47 from tuberculosis. He is buried at Hastings Cemetery, East Sussex, in section H, grave E-18 common. The headstone was erected by local residents. A blue plaque is displayed on his former house in Tower Road, St Leonards-on-Sea, East Sussex. His Victoria Cross is displayed at the Royal Welch Fusiliers Museum at Caernarfon Castle, Gwynedd, Wales. References Location of grave and VC medal (East Sussex) 1840 births 1887 deaths People from the City of Winchester British recipients of the Victoria Cross Royal Welch Fusiliers soldiers Indian Rebellion of 1857 recipients of the Victoria Cross 19th-century deaths from tuberculosis British Army recipients of the Victoria Cross Burials at Hastings Cemetery Tuberculosis deaths in England Military personnel from Winchester
```xml /** * Get pathname from absolute path. * * @param absolutePath the absolute path * @returns the pathname */ export function getPathnameFromAbsolutePath(absolutePath: string) { // Remove prefix including app dir let appDir = '/app/' if (!absolutePath.includes(appDir)) { appDir = '\\app\\' } const [, ...parts] = absolutePath.split(appDir) const relativePath = appDir[0] + parts.join(appDir) // remove extension const pathname = relativePath.split('.').slice(0, -1).join('.') return pathname } ```
Ali Musa oglu Guliyev (31 May 1912, Yelizavetpol – 29 January 1989, Baku) was a Soviet and Azerbaijani scientist. Early life In 1943, he defended his Ph.D. thesis on “Obtaining Hexamethylenetetramine (urotropine) from Natural Gas”. In 1945, the Synthesis of Additives Laboratory was organized in Azerbaijan Scientific-Research Institute of Oil-Processing. Guliyev headed this laboratory. As a result of experiments by him and his team, lubricating additives, Az.SRI depressor and Az.SRI -4 were applied in industry for the first time in the Soviet Union. In 1948 and 1951, Guliyev and his team of were awarded two Stalin Prizes (later renamed to The USSR State Prize) for these developments. Career Guliye trained many other scientists. From 1951 to 1960 he was the Chair of Organic Chemistry in Baku State University. From 1960 to 1974, he chaired the department. In 1958, Guliyev was elected a correspondent member of Azerbaijan, and in 1959, academician of AS of Azerbaijan. Recognition Guliyev was elected as a member of the Supreme Soviet of Azerbaijan SSR in VIII and IX convocations. He received two Stalin Prizes and an Azerbaijan SSR State Prize. He was awarded two Orders of the Red Banner of Labour, three Orders of the Badge of Honour and medals, six honorary diplomas of the Supreme Soviet of Azerbaijan SSR, two golden and four silver medals of VDNKh of USSR. The Institute of Chemistry of Additives of AS of Azerbaijan was named after him. References 1912 births 1989 deaths Scientists from Ganja, Azerbaijan Academic staff of Baku State University Baku State University alumni Recipients of the Stalin Prize Recipients of the Order of the Red Banner of Labour Organic chemists Azerbaijani chemists Soviet chemists
is a Japanese photographer who's work has been featured at Tokyo Photographic Art Museum. References External links Nihon shashinka jiten () / 328 Outstanding Japanese Photographers. Kyoto: Tankōsha, 2000. . ''Graduated from Nihon University Buzan High school in 1967,and Nihon University Faculty of Animal Husbandry in 1971. Japanese photographers 1949 births Living people Place of birth missing (living people) Date of birth missing (living people) 20th-century Japanese photographers
```php <?php /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ namespace Google\Service\DataCatalog; class GoogleCloudDatacatalogV1BigQueryTableSpec extends \Google\Model { /** * @var string */ public $tableSourceType; protected $tableSpecType = GoogleCloudDatacatalogV1TableSpec::class; protected $tableSpecDataType = ''; protected $viewSpecType = GoogleCloudDatacatalogV1ViewSpec::class; protected $viewSpecDataType = ''; /** * @param string */ public function setTableSourceType($tableSourceType) { $this->tableSourceType = $tableSourceType; } /** * @return string */ public function getTableSourceType() { return $this->tableSourceType; } /** * @param GoogleCloudDatacatalogV1TableSpec */ public function setTableSpec(GoogleCloudDatacatalogV1TableSpec $tableSpec) { $this->tableSpec = $tableSpec; } /** * @return GoogleCloudDatacatalogV1TableSpec */ public function getTableSpec() { return $this->tableSpec; } /** * @param GoogleCloudDatacatalogV1ViewSpec */ public function setViewSpec(GoogleCloudDatacatalogV1ViewSpec $viewSpec) { $this->viewSpec = $viewSpec; } /** * @return GoogleCloudDatacatalogV1ViewSpec */ public function getViewSpec() { return $this->viewSpec; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(GoogleCloudDatacatalogV1BigQueryTableSpec::class, your_sha256_hashSpec'); ```
```python # # This software may be used and distributed according to the terms of the """ integration with a native debugger like lldb Check path_to_url for APIs. This file runs standalone by lldb's Python interperter. It does not have access to `bindings` or other Sapling modules. Do not import Sapling modules here. There are 2 ways to use this feature, - Use `debugbt` command. - Use `lldb -p <pid>`, then run `command script import ./dbgutil.py`, then use the `bta` command. """ import functools import struct import subprocess import sys def backtrace_all(ui, pid: int): """write backtraces of all threads of the given pid. Runs inside Sapling Python environment. """ import inspect import os import tempfile import bindings python_source = inspect.getsource(sys.modules["sapling.dbgutil"]) with tempfile.TemporaryDirectory(prefix="saplinglldb") as dir: python_script_path = os.path.join(dir, "dbgutil.py") if ui.formatted: out_path = "" else: # Buffer output so we out_path = os.path.join(dir, "bta_output.txt") with open(python_script_path, "wb") as f: f.write(python_source.encode()) args = [ ui.config("ui", "lldb") or "lldb", "-b", "--source-quietly", "-o", f"command script import {python_script_path}", "-o", f"bta {pid}{out_path and ' ' + out_path}", ] subprocess.run(args, stdout=(subprocess.DEVNULL if out_path else None)) if out_path: with open(out_path, "rb") as f: data = f.read() ui.writebytes(data) def _lldb_backtrace_all_attach_pid(pid, write): """Attach to a pid and write its backtraces. Runs inside lldb Python environment, outside Sapling environment. """ import lldb debugger = lldb.debugger target = debugger.CreateTarget("") process = target.AttachToProcessWithID(lldb.SBListener(), pid, lldb.SBError()) try: _lldb_backtrace_all_for_process(target, process, write) finally: if sys.platform == "win32": # Attempt to resume the suspended process. "Detach()" alone does not # seem to resume it... debugger.SetAsync(True) process.Continue() process.Detach() def _lldb_backtrace_all_for_process(target, process, write): """Write backtraces for the given lldb target/process. Runs inside lldb Python environment, outside Sapling environment. """ import lldb if target.addr_size != 8: write("non-64-bit (%s) architecture is not yet supported\n" % target.addr_size) return def read_u64(address: int) -> int: """read u64 from an address""" return struct.unpack("Q", process.ReadMemory(address, 8, lldb.SBError()))[0] def resolve_frame(frame) -> str: """extract python stack info from a frame. The frame should be a Sapling_PyEvalFrame function call. """ # Sapling_PyEvalFrame(PyThreadState* tstate, PyFrameObject* f, int exc) # # x64: # pushq %rbp # movq %rsp, %rbp ; FP # subq $0x20, %rsp ; SP = FP - 0x20 # movq %rdi, -0x8(%rbp) # movq %rsi, -0x10(%rbp) ; PyFrame f at FP - 0x10, or SP + 0x10 # movl %edx, -0x14(%rbp) # movq -0x8(%rbp), %rdi # movq -0x10(%rbp), %rsi # movl -0x14(%rbp), %edx # callq 0x1034bddee ; symbol stub for: _PyEval_EvalFrameDefault # addq $0x20, %rsp # popq %rbp # retq # # arm64 (x29 is FP): # sub sp, sp, #0x30 # stp x29, x30, [sp, #0x20] # add x29, sp, #0x20 ; FP = SP + 0x20 # stur x0, [x29, #-0x8] ; x0 is 1st arg (tstate) # str x1, [sp, #0x10] ; x1 is 2nd arg, `f`, at SP + 0x10 # str w2, [sp, #0xc] # ldur x0, [x29, #-0x8] # ldr x1, [sp, #0x10] # ldr w2, [sp, #0xc] # bl 0x1046b6140 ; symbol stub for: _PyEval_EvalFrameDefault # ldp x29, x30, [sp, #0x20] # add sp, sp, #0x30 # ret # # x64 MSVC: # ; Sapling_PyEvalFrame(PyThreadState* tstate, PyFrame* f, int exc) { # push rbp # sub rsp,40h # lea rbp,[rsp+40h] # mov dword ptr [rbp-4],r8d # mov qword ptr [rbp-18h],rdx ; FP - 0x18 # mov qword ptr [rbp-10h],rcx # ; return _PyEval_EvalFrameDefault(tstate, f, exc); # mov r8d,dword ptr [exc] # mov rdx,qword ptr [f] # mov rcx,qword ptr [tstate] # call qword ptr [__imp__PyEval_EvalFrameDefault (07FF748CDDF40h)] # nop # add rsp,40h # pop rbp # ret fp: int = frame.fp sp: int = frame.sp ptr_addr = None if fp - sp == 0x40 and sys.platform == "win32": ptr_addr = fp - 0x18 elif fp - sp == 0x20: ptr_addr = fp - 0x10 if ptr_addr is not None: try: python_frame_address = read_u64(ptr_addr) return resolve_python_frame(python_frame_address) except Exception as e: return f"<error {e} {ptr_addr}>" return "" def resolve_python_frame(python_frame_address: int) -> str: # NOTE: `sapling_cext_evalframe_resolve_frame` needs the Python GIL # to be "safe". However, it is likely just reading a bunch of # objects (ex. frame, code, str) and those objects are not being # GC-ed (since the call stack need them). So it is probably okay. value = target.EvaluateExpression( f"(char *)(sapling_cext_evalframe_resolve_frame((size_t){python_frame_address}))" ) return (value.GetSummary() or "").strip('"') for thread in process.threads: write(("%r\n") % thread) frames = [] # [(frame | None, line)] has_resolved_python_frame = False for i, frame in enumerate(thread.frames): name = frame.GetDisplayFunctionName() if name == "Sapling_PyEvalFrame": resolved = resolve_frame(frame) if resolved: has_resolved_python_frame = True # The "frame #i" format matches the repr(frame) style. frames.append((None, f" frame #{i}: {resolved}\n")) continue if name: frames.append((frame, f" {repr(frame)}\n")) if has_resolved_python_frame: # If any Python frame is resolved, strip out noisy frames like _PyEval_EvalFrameDefault. frames = [ (frame, line) for frame, line in frames if not _is_cpython_function(frame) ] write("".join(line for _frame, line in frames)) write("\n") def _is_cpython_function(frame) -> bool: return frame is not None and "python" in (frame.module.file.basename or "").lower() def _lldb_backtrace_all_command(debugger, command, exe_ctx, result, internal_dict): """lldb command: bta [pid] [PATH]. Write Python+Rust traceback to stdout or PATH.""" args = command.split(" ", 1) if len(args) >= 1 and args[0]: pid = int(args[0]) impl = functools.partial(_lldb_backtrace_all_attach_pid, pid) else: target = exe_ctx.target process = exe_ctx.process impl = functools.partial(_lldb_backtrace_all_for_process, target, process) path = args[1].strip() if len(args) >= 2 else None if path: with open(path, "w", newline="\n") as f: impl(f.write) f.flush() else: impl(sys.stdout.write) def __lldb_init_module(debugger, internal_dict): # When imported by lldb 'command script import', this function is called. # Add a 'bta' command to call _lldb_backtrace_all. debugger.HandleCommand( f"command script add -f {__name__}._lldb_backtrace_all_command bta" ) ```
Richard G. Baraniuk is the C. Sidney Burrus Professor of Electrical and Computer Engineering at Rice University and the Founder and Director of the open education initiative OpenStax (formerly called Connexions). Academic biography Dr. Baraniuk received a B.Sc. from the University of Manitoba in 1987 and a M.Sc. from the University of Wisconsin-Madison in 1988. He earned a Ph.D. in electrical engineering at the University of Illinois at Urbana-Champaign in 1992 under the supervision of Douglas L. Jones. After spending 1992-1993 at École Normale Supérieure in Lyon, France working with Patrick Flandrin, he joined Rice University. Research Baraniuk has been active in the development of digital signal processing, image processing, and machine learning systems, with numerous contributions to the theory of wavelets, compressive sensing, and deep learning. The Rice "single-pixel camera" that he developed with Kevin Kelly was the first compressive imaging device and was selected by MIT Technology Review as a TR10 Top 10 Emerging Technology in 2007. Six of Baraniuk's currently 45 granted US and foreign patents on compressive sensing were licensed by Siemens in 2016 to accelerate magnetic resonance imaging (MRI) scans. He has served as Project Director for the ARO MURI on "Opportunistic Sensing" from 2013-2018, the ONR MURI on "Foundations of Deep Learning" from 2020-2025, the DOE "INCITE" project, and several DARPA projects, including "Analog to Information" and "Analog to Information Receiver". Open education, Connexions, and OpenStax Baraniuk is one of the founders of the Open Education movement. In 1999, Baraniuk launched "Connexions" (which was later re-named "OpenStax CNX"), one of the first initiatives to offer free, open-source textbooks via the web. OpenStax CNX continues to be one of the largest and most used open education platforms worldwide. Baraniuk's own OpenStax CNX textbook, "Signals and Systems," has generated 9 million page views including a very popular translation into Spanish. OpenStax CNX provides the digital publishing platform for OpenStax (formerly called "OpenStax College"), a free and open library of college textbooks that as of May 2021 has saved 20 million US college students $1.7 billion. Baraniuk has been an active advocate and popularizer of open education – speaking at the TED 2006 conference – and was also one of the framers of the Cape Town Open Education Declaration. Awards and honors Baraniuk has received numerous awards, including a NATO postdoctoral fellowship from NSERC in 1992, the National Young Investigator award from the National Science Foundation in 1994, a Young Investigator Award from the Office of Naval Research in 1995, the Rosenbaum Fellowship from the Isaac Newton Institute of Cambridge University in 1998, the University of Illinois at Urbana–Champaign ECE Young Alumni Achievement Award in 2000, and the Wavelet Pioneer Award from SPIE in 2008. He also received the 2012 Compressive Sampling Pioneer award from SPIE for his work on compressive sensing and the 2014 Technical Achievement Award from IEEE Signal Processing Society. He was selected as a DOD Vannevar Bush Fellow (formerly National Security Science and Engineering Faculty Fellow) in 2017. OpenStax CNX (then called "Connexions") received the Tech Museum Laureate Award from the Tech Museum of Innovation in 2006, and Baraniuk was selected as one of Edutopia Magazine's Daring Dozen educators in 2007. In 2008, Baraniuk received the Internet Pioneer Award from Berkman Center for Internet & Society, and in 2010 he received the IEEE Signal Processing Society Education Award. In 2011 he received the WISE Education Award from the Qatar Foundation. In 2015 he was awarded the IEEE James H. Mulligan, Jr. Education Medal. In 2021, he was awarded the Harold W. McGraw Prize in Education. Baraniuk was elected a Fellow of the IEEE in 2001, a Fellow of the American Association for the Advancement of Science in 2009, a Fellow of the National Academy of Inventors in 2016, a Member of the American Academy of Arts and Sciences in 2017, and a Member of the National Academy of Engineering in 2022. References External links Baraniuk's web page at Rice. TED Talk: The birth of the open-source learning revolution (TED2006) Year of birth missing (living people) Living people American electrical engineers Rice University faculty Grainger College of Engineering alumni University of Wisconsin–Madison College of Engineering alumni Qatar Foundation people
The Extramural Sanctuary of Demeter and Persephone at Cyrene, Libya is located on a coastal plateau of Libya, beyond the boundaries of the city (extramural). In approximately 630 BC Greeks from the island of Thera colonized Cyrene. Other Greek colonists not long after increased the population, thus transforming Cyrene into what was regarded as both the largest and wealthiest Greek colony of North Africa. Archaeological excavations of Cyrene's Extramural Sanctuary of Demeter and Persephone, also known as Kore, daughter of Demeter and legendary Queen of the Underworld and consort of Hades, began in 1969 under the sponsorship of the University of Michigan. Between 1973 and 1981 the University of Pennsylvania Museum of Archeology and Anthropology continued the excavations at Cyrene under the direction of Professor Donald White (Museum Curator Emeritus, Mediterranean Section). Following the renewal of relations between Libya and the United States in 2004, the Cyrenaica Archaeological Project (CAP), under the direction of Professor Susan Kane of Oberlin College, was granted permission to resume the work of its predecessors. The grounds of the Sanctuary to Demeter and Persephone, which include a temple and theater complex, elevate on terraces across the slope of a ravine, specifically the wadi (Arabic: وادي wādī; also: Vadi) bel Gadir, southwest of the walled city. The Sanctuary comprised structures sprawled out over twenty miles and divided into three primary structures: the Lower, Middle and Upper Sanctuaries. The archaeological remains of the walled complex span approximately 850 years of religious activity, dating from ca. 600 BC through the mid third century AD. During the time of this sacred activity at the Sanctuary a voluminous amount of votive material was accumulated in its interior: pottery, lamps, coinage, stone sculpture, jewellery, inscriptions, glass, as well as bronze and terracotta figurines. The pottery excavated at the Sanctuary does provide useful evidence concerning both the question of its foundation and type of religious activity. Architecture The Extramural Sanctuary was in use from the late 7th century BC until 4th century AD. The principal epochs of sanctuary architecture took shape in the background of monumental events in the history of Cyrene (parent city). During the Sanctuary's four phases, it underwent significant internal change, but still characteristically remained an extramural hillside precinct enclosing a variety independent(?) cultic installations. The major concessions to its rather steep-rise setting involve organizing the sloping hillside into a series of terraced zones which are themselves organized (over time) into three separately defined architectural zones: the Upper, Middle, and Lower Sanctuaries. Enough architectural evidence remains from the late Battiad period to show that the Upper and Middle sections already existed at that time. Although the identity of the Upper Sanctuary's Classical buildings remains mostly uncertain until as late as the Hellenistic period, evidence for cult activity on this level is good. The Sanctuary's expansion north or down the wadi slope to the level of the Lower Sanctuary did not occur until the early Imperial period when both the Upper and the Lower Sanctuary levels take on the architectural features of what henceforth remain their characteristic layouts until the earthquake of 262 AD. Most of the site's architectural limestone and marble frusta located scattered throughout the earthquake levels across the Middle Sanctuary appears to have originated with the Imperial period Upper Sanctuary additions. It is these additions which furnish most of the Sanctuary's restorable monuments. Moreover, although most of the surviving evidence for building activity down to the end of the Hellenistic period pertains to the Middle Sanctuary, in years leading up to the Sanctuary's earthquake destructions in the 3rd and 4th centuries, only a few new architectural endeavours were undertaken, mainly at the Upper Sanctuary level. Religious aspects This space embodied the countryside's sacred aspects, as a space by which urbanity (city) is severed from the world of nature. However, the Sanctuary also functioned as a realm of inclusiveness, i.e. through its festivals, rituals, and cults. More generally, the sacred precinct (Sanctuary) served as a platform and occasion for civic union, expression and for building communicable relations with the peoples of the surrounding area. One such occasion was the Thesmophoria, an agricultural festival known to have been celebrated at Cyrene in honor of Demeter and Persephone. Pottery Of the imported archaic Greek objects unearthed at the Extramural Sanctuary of Demeter and Persephone Corinthian pottery represents a rather sizable portion, of which the majority belongs to the Late Corinthian I and II periods. Archaeological excavators expected the examination of the Corinthian pottery to yield concrete evidence concerning the resolution of the chronological question of the foundation of the Sanctuary, but for one reason it later proved that the answer did not rest in the pottery: the surviving pottery's poor state of preservation. However, the pottery does furnish important information regarding the Sanctuary from primarily social, religious, historical and economic perspectives. Given the contemporary evidence of Greek pottery, the Sanctuary itself appears to succeed the settlement of Cyrene, traditionally dated to circa 630 BCE, by approximately one generation. However, because earlier Corinthian pottery also suggests an establishment date for the Sanctuary somewhat thirty years after 630 BCE, the absolute date is uncertain. The range and number of pottery finds during the first quarter of the sixth century increases substantially, thus indicating that by this time the Sanctuary was already firmly established. Specifically, based on the Corinthian pottery from the Sanctuary, it is clearly evident that less expensive commodities were continuously imported. Such importation provides evidence that cheaper commodities were still seeking an overseas market (see map: Mercantile and Relevant Sites of the Sanctuary above). It is possible that this "cheaper" market stemmed from the needs of the less affluent inhabitants of Cyrene. Furthermore, excluding evidence for "cheaper" markets, artifacts from the Sanctuary also provide information about the local elites' interests in trade and commerce, as Corinthian black-figure pottery, some of the finest products of Corinthian workshops, were abundantly imported into Cyrene. Thus, based on these observations, conclusions drawn by the earlier study of the East Greek, Island and Laconian pottery, particularly kraters (in Greek: κρατήρ, kratēr, from the verb κεράννυμι, keránnymi, "to mix"), that Cyrene avoided Persian attack circa 515 BCE, were confirmed upon careful examination of the Corinthian pottery. In addition, Professors Donald White and Gerald Schaus have discussed in detail the question of ritual feasting or dining at the Sanctuary, but Corinthian pottery does not supply conclusive evidence for or against the rituals. However, of the imported pottery vases, minimal observations of two exclusive types may provide some insight concerning this ongoing issue: vases associated with personal use (perfumed-oil containers, small boxes, etc.) and those with wine, its preparation, serving and consumption (kraters, cups, and oinochoai). The pottery vases categorized as having a personal use may have served as dedicationsto Persephone and her divine mother (Demeter). Moreover, one-third of all finds unearthed at the Sanctuary, namely kotylai and black-glazed hydriai (both are known to possess cultic associations with Demeter), serve in some form or fashion as votive objects. In short, more than half of all the Corinthian pottery imports appear to have almost certainly functioned as dedicatory gifts to the mother-daughter deities. In contrast to these vases, the vases directly related to the consumption of wine could have also served a practical purpose. Half of all the whole-sized pottery finds, particularly those in association with wine mixing and pouring vases, suggest ritual drinking. On a rather different note, these finds, i.e. the artifacts specifically concerned with the preparation and consumption of wine, also have an immediate literary relevance. For example, in the Homeric Hymn to Demeter, a celebratory song hymned in honor of the grain goddess (Demeter), Demeter expresses her unwillingness to drink wine until it has been "mixed" with a concoction of mint, water and barley (II.205-210). Thus, although there exists a lack of indisputable evidence proving ritual drinking took place at the Sanctuary, it is nonetheless highly plausible that cups and like vases were left as dedicatory votives after the ritual feast. See also Intraurban Sanctuary of Demeter and Persephone at Cyrene, Libya Further reading Schaus, Gerald, Donald White, University Museum, and Donald White. The extramural sanctuary of Demeter and Persephone at Cyrene, Libya. I-VII. Philadelphia: 1990, 1990. Print. Review: Shelby Brown: The Extramural Sanctuary of Demeter and Persephone at Cyrene, Libya: Background and Introduction to the Excavations by Donald White. American Journal of Archaeology, Vol. 90, No. 3 (July, 1986), pp. 358–360. Published by: Archaeological Institute of America. References External links Cyrenaica.org Cyrenaica-terracottas.org Archaeology.org World Heritage Sites in Libya Archaeological sites in Libya Temples of Demeter Temples of Persephone 7th-century BC religious buildings and structures Cyrene, Libya
The Catamount Cup (also known as the Sheraton/TD Bank Catamount Cup for sponsorship reasons) is an annual men's college ice hockey tournament hosted by the University of Vermont in Burlington, Vermont. The tournament is contested by the Vermont Catamounts and three visiting teams. Since the inaugural tournament in 1990, it has been held on and off either just before or after New Year's Eve. As opposed to most in-season tournament, all Catamount Cup games are scheduled before the tournament begins and there is no formal championship game. If teams are tied in record at the end of the tournament goal differential is used as the tie-breaker. Yearly results Appearances External links Catamount Cup archive at the College Hockey Historical Archives Vermont Catamounts ice hockey College ice hockey tournaments in the United States Ice hockey competitions in Vermont
Khabibullin's conjecture is a conjecture in mathematics related to Paley's problem for plurisubharmonic functions and to various extremal problems in the theory of entire functions of several variables. The conjecture was named after its proposer, B. N. Khabibullin. There are three versions of the conjecture, one in terms of logarithmically convex functions, one in terms of increasing functions, and one in terms of non-negative functions. The conjecture has implications in the study of complex functions and is related to Euler's Beta function. While the conjecture is known to hold for certain conditions, counterexamples have also been found. The first statement in terms of logarithmically convex functions Khabibullin's conjecture (version 1, 1992). Let be a non-negative increasing function on the half-line such that . Assume that is a convex function of . Let , , and . If then This statement of the Khabibullin's conjecture completes his survey. Relation to Euler's Beta function The product in the right hand side of the inequality () is related to the Euler's Beta function : Discussion For each fixed the function turns the inequalities () and () to equalities. The Khabibullin's conjecture is valid for without the assumption of convexity of . Meanwhile, one can show that this conjecture is not valid without some convexity conditions for . In 2010, R. A. Sharipov showed that the conjecture fails in the case and for . The second statement in terms of increasing functions Khabibullin's conjecture (version 2). Let be a non-negative increasing function on the half-line and . If then The third statement in terms of non-negative functions Khabibullin's conjecture (version 3). Let be a non-negative continuous function on the half-line and . If then See also Logarithmically convex function References Conjectures Inequalities
The Northside Historic District encompasses two of the earliest significant settlement areas of Yarmouth, Massachusetts. Stretching along Massachusetts Route 6A from the Barnstable line in the west to White Brook in the east, the district includes almost 300 buildings on . It includes the two villages of Yarmouth Center and Yarmouthport, which were important 18th and 19th century centers of civic and economic activity. Although the district includes a number of early colonial First Period structures (the oldest being the c, 1690 Timothy Hallett House, 24 Hallett Street), the majority of its buildings date between 1780 and 1860, and are either Federal or Greek Revival in character. There are a number of important early Cape-style homes in the district; these are typically smaller single story buildings, where the later buildings have larger floor plans and are two stories or two and a half stories in height. There are a modest number of houses in styles popular in the second half of the 19th century, including a Gothic Revival house at 134 Hallett Street and Italianate houses at 282 and 364 Hallett. Institutional buildings in the district include three churches, all from the late 19th century; one of them, the First Congregational Church, dates its congregation to the establishment of Yarmouth's first meeting house in 1640. All three buildings are from the later decades of the 19th century. There are three civic buildings: two school buildings (the 1880 Queen Anne Sloyd Building, and the c. 1881 Colonial Revival Lyceum Hall), and the library, an 1870 Gothic Revival structure. The district was listed on the National Register of Historic Places in 1987. See also South Yarmouth/Bass River Historic District National Register of Historic Places listings in Barnstable County, Massachusetts References Historic districts on the National Register of Historic Places in Massachusetts National Register of Historic Places in Barnstable County, Massachusetts Yarmouth, Massachusetts
Night Circus may refer to: The Night Circus, a 2011 fantasy novel by Erin Morgenstern The Night Circus, a 1958 play by Michael V. Gazzo Night Circus (EP), a 2016 release by rapper Bryce Vine "Night Circus", a story in the 2004 manga Alone in My King's Harem by Hoshino Lily "Night Circus, Part I – By the Red Moon" and "Night Circus, Part II – Trapeze", piano pieces by Borah Bergman from the 1983 album A New Frontier
Belbas is a Village Development Committee in Pyuthan, a Middle Hills district of Rapti Zone, western Nepal. Etymology Bel () - an edible fruit-producing tree species, sacred to Lord Shiva and central to a coming of age ceremony for Newar girls.Bas () - resting place or camp.Thus a resting place with Bel trees. Villages in VDC References External links UN map of VDC boundaries, water features and roads in Pyuthan District Populated places in Pyuthan District
Qazal (, also Romanized as Qezel; also known as Qizil) is a village in Poshtdarband Rural District, in the Central District of Kermanshah County, Kermanshah Province, Iran. At the 2006 census, its population was 117, in 26 families. References Populated places in Kermanshah County
```css `currentColor` improves code reusability Use pseudo-classes to describe a special state of an element Adjacent sibling selector Debug with `*` selector Conditional comments ```
```javascript var withBase64 = require('./source-map-base64.js'); var withMap = require('./source-map-external.js'); console.log(withBase64()); console.log(withMap.default()); console.log("Hello") ```
This is a list of English words that are thought to be commonly misused. It is meant to include only words whose misuse is deprecated by most usage writers, editors, and professional grammarians defining the norms of Standard English. It is possible that some of the meanings marked non-standard may pass into Standard English in the future, but at this time all of the following non-standard phrases are likely to be marked as incorrect by English teachers or changed by editors if used in a work submitted for publication, where adherence to the conventions of Standard English is normally expected. Some of the examples are homonyms or pairs of similarly spelled words that are often confused. The words listed below are frequently used in ways that major English dictionaries do not condone in any definition. See List of English words with disputed usage for words that are used in ways that are deprecated by some usage writers but are condoned by some dictionaries. There may be regional variations in grammar, orthography, and word-use, especially between different English-speaking countries. Such differences are not classified normatively as non-standard or "incorrect" once they have gained widespread acceptance in a particular country. List A a lot and allot. A lot means "many" or "much"; allot means to distribute something. abdicate, abnegate, abrogate, and arrogate. To abdicate is to resign from the throne, or more loosely to cast off a responsibility. To abnegate is to deny oneself something. To abrogate is to repeal (do away with) a law or abolish (put an end to) an arrangement, also to evade a responsibility. To arrogate is to attempt to take on a right or responsibility to which one is not entitled. Standard: Edward VIII abdicated the throne of the United Kingdom. Standard: Henry VIII abrogated Welsh customary law. Non-standard: You should not abrogate to yourself the whole honour of the President's visit (should be "arrogate"). accept and except. While they sound similar (or even identical in parts of the US), except is a preposition that means "apart from", while accept is a verb that means "agree with", "take in", or "receive". Except is also occasionally used as a verb, meaning to take out or to leave out. Standard: We accept all major credit cards, except Diners Club. Standard: People are fools... present company excepted! (Which means, "present company excluded") Non-standard: I had trouble making friends with them; I never felt . Non-standard: We all went swimming, for Jack. acute and chronic. Acute means "sharp", as an acute illness is one that rapidly worsens and reaches a crisis. A chronic illness may also be a severe one, but it is long-lasting, lingering, or having a long history. Standard: She was treated with epinephrine during an acute asthma attack. Standard: It is not a terminal illness, but it does cause chronic pain. Non-standard: I have suffered from acute asthma for twenty years. Non-standard: I just started feeling this chronic pain in my back. adverse and averse. Adverse means unfavorable, contrary or hostile. Averse means having a strong feeling of opposition, antipathy, or repugnance. Merriam-Webster notes that adverse is commonly used as an attributive adjective (before the noun), while averse is rarely used in this situation. Standard: They sailed despite adverse weather conditions. Standard: He was averse to taking his medicine. Non-standard: He is not adverse to having a drink now and then. aesthetic and ascetic. Aesthetic relates to an appealing or unappealing visual look or atmosphere. Ascetic is used to express the avoidance of pleasure due to self-discipline. Standard: The aesthetics of the building were beautiful. Standard: Some religions support ascetic practices. affect and effect. The verb affect means "to influence something", and the noun effect means "the result of". Effect can also be a verb that means "to cause [something] to be", while affect as a noun has technical meanings in psychology, music, and aesthetic theory: an emotion or subjectively experienced feeling. A device to remember when trying to decide which is the right choice: If something affects you it usually has an effect on you. Standard: The other benefit of class and collective actions is that they effect social and economic change. Standard: This poem affected me so much that I cried. Standard: Temperature has an effect on reaction spontaneity. Standard: The dynamite effected the wall's collapse. Standard: He seemed completely devoid of affect. Non-standard: An IOC spokesman told Press Association Sport: "We were aware that FIFA might consider changing the dates for the 2022 World Cup. We are confident that FIFA will discuss the dates with us so as to co-ordinate them and avoid any affect on the Winter Games." Non-standard: Some neighbors complain about Romney's new presidential entourage—including dozens of Secret Service agents who now guard the candidate 24 hours a day—and its affect on their quiet street. Non-standard: His teammate Steve Nash can see how the time off had an affect on Gasol. Non-standard: Seneca Jones Timber Co. executives say the pipe will effect 2,000 acres of their timberland, another 1,000 acres of property for roads, as well as public lands where Seneca harvests and transports logs. Non-standard: The rain effected our plans for the day. Non-standard: We tried appeasing the rain gods, but to no affect. aisle and isle. An aisle is a corridor through which one may pass from one place to another. An isle is an island. Standard: He came from a small isle in the Caribbean. Standard: The coffee is down the third aisle on the left. algorithm and logarithm. An algorithm is a step-by-step procedure, usually for calculation, the processing of data, or choosing among alternatives. The logarithm of a number is the power (i.e., exponent) to which a specified base must be raised to produce that number. Standard: The board of directors developed an algorithm for choosing the company's new president from among the remaining candidates. Standard: The algorithm for long divsion is usually taught in grade school. On the other hand, the algorithm for square root extraction, of which the best known pencil-and-paper form is still the one developed by Hero of Alexandria, is nowadays rarely taught, even in secondary school. Standard: Using a base of 2, the logarithm of 32 is 5, because 25 equals 32. Standard: The number of octaves between two sounds is equal to the base-2 logarithm of the ratio of their frequencies. allow. The verb allow usually requires a referent. The construction "allows to" is a common error of German-speakers and South Asians with English as a second language. An accepted intransitive construction is "allows for" ("allows of" is also attested but obsolete). Standard: The application allows users to download more quickly. Standard: Roman law allowed a soldier to make a valid will without any formality. Non-standard: The instrument allows to measure ... Standard but awkward: "Allows to" can be used in this way, by moving the referent to the end: "The screen does not allow to pass any insects larger than gnats" and "A tenant who causes or allows to transpire damage to the property is liable ...". Such phraseology is awkward and should usually be rewritten, but not always. allusion and illusion. An allusion is an indirect or metaphorical reference to something; an illusion is a false picture of something that is there. appraise and apprise. To appraise is to assess or value something; to apprise is to teach or inform. Standard: His performance was appraised very positively. Standard: I lost no time in apprising her of the situation. Non-standard: Has he been appraised of the fact? Arab and Arabic. As an adjective, Arab refers to people and things of ethnic Arab origin. Arabic refers to the Arabic language or writing system. Its use as a synonym for Arab is considered controversial by some. are and our. Are is the second-person singular present and the first-, second-, and third-person plural present of the verb be. Our means "belonging to us". Standard: Are you coming to our house after the show? Standard: Our family has been trying to save money because of the country's current economic situation. ascent and assent. To ascend means to go up or advance from an original position. To assent is to agree. Standard: I watched the balloon's ascent into the sky. Standard: We need to reach assent on how to do this project. assure, ensure, and insure. In American English, to assure is purely to intend to give the listener confidence, to ensure is to make certain of, and to insure is to purchase insurance. The only difference with British English is that assure can be used instead of insure, particularly in the context of life insurance or assurance. Standard: I assure you that I will have your car washed by the time you return. Standard: When you mow the lawn, ensure there are no foreign objects in the grass. Standard: I plan to purchase the collision policy when I insure my car. Standard: I already have more than enough life assurance. Non-standard: His actions insured that the attacking army would fail. awaken and awoken: Awaken is typically used to express waking in the present tense. Awoken is typically used to express waking in the past tense. Awoken is the original "hard verb" inflection of "to wake", but through morphological leveling the soft form awakened has become more common. Standard: We must awaken the dragon. Standard: The dragon has awoken. B barter, haggle and banter. To barter means to exchange goods rather than carrying out commercial transactions using money. To haggle is to negotiate a price. Banter is a noun meaning a friendly or good-natured exchange of remarks. belie. To belie means "to contradict" or "to give a false impression of". It is sometimes used incorrectly to mean to betray something hidden. bemused. To be bemused is to be perplexed or bewildered; however, it is commonly used incorrectly in place of amused. bisect and dissect. Bisect means "to cut into two"; dissect means "to cut apart", both literally and figuratively. is an archaic word meaning "to separate by cutting", but has not been in common use since the 17th century. Standard: The Americas are bisected by the Panama canal. Standard: She dissected Smith's dissertation, pointing out scores of errors. Standard: We dissected the eye of a bull in biology class today. Non-standard: We the eye of a bull in biology class today. born and borne. Born is when a living creature enters the world through the birthing process. Borne means to carry, realize, or bear something. Standard: I was born on March 6, 1982. Standard: I contracted mosquito-borne malaria while in Africa. breath and breathe. A breath (noun) is the air that is inhaled or exhaled from the lungs. To breathe (verb) is the act of inhaling or exhaling. buy and by. Buy means to purchase or spend money on something. By is a preposition meaning close to or indicating who did something. Standard: I want to buy a TV. Standard: We are by the station now. Standard: My favorite novel is by Ursula Le Guin. C cache, cachet and cash. A cache (IPA: ) is a storage place from which items may be quickly retrieved. A cachet (IPA: ) is a seal or mark, such as a wax seal on an envelope or a mark of authenticity on a product (usually used figuratively to mean "marked by excellence, distinction or superiority"). Standard: The pirates buried a cache of jewels near the coast. Standard: Living in New York City definitely has a certain cachet. Standard: But if a recommendation out of the Board of Governors meeting Tuesday in Las Vegas gets enacted as soon as this autumn, division titles would lose more than cachet. Standard: The Wiz would be safer following the path San Antonio took with Leonard, only they haven't built up the cachet that allowed the Spurs to say, essentially, "Trust us. Hold tight as a cheap cap hold, and we'll make it worth your while." Standard: This of course would be the second time Prokhorov was able to take advantage of a situation where his huge cache of cash helped him with the Nets. Non-standard: It was easy: For one, he was an athlete who had made it, which provided the ultimate caché among parents who wanted their kids to go as far in sports as their talent could take them. Non-standard: The greatest cache this team has is that one of the players has an umlaut in his name. Non-standard: You need a couple of money guys (serious big money), then it doesn't hurt if you have a minority owner or two with some cache in said city to help win over the local fans. Non-standard: Despite the celebrity status, big-name athletes seem to have more cache with average Americans than their cohorts from Hollywood or the Executive Suite. can't and cant. Can't is a contraction of cannot. Cant has a number of different meanings, including a slope or slant, or a kind of slang or jargon spoken by a particular group of people. "Canting arms" is a coat-of-arms that represents meaning of the bearer's surname. Standard: I can't understand the dialogue in this book because it is written in cant. Standard: Heralds do not pun; they cant. Non-standard: I cant swim; I have never taken lessons. canvas and canvass. Canvas is a type of fabric known for being tough and strong. Canvass is a way to try to get people's support or find out where their support lies. Standard: I use a canvas cover to protect the barbecue. Standard: Canvass the block for information on their votes. Non-standard: My political party needs to canvas the local neighborhoods. cloth, clothe and clothes. Cloth is the material that is typically woven and available in rolls, known as 'bolts' (though 'bolt' is a defined length of cloth) and sold in fabric stores. Clothe is a verb and refers to the action of putting on clothes that have been created using cloth. Clothes are garments that have been manufactured using cloth. Standard: I will look for a clothes shop to purchase some garments to wear. Standard: At the local cloth shop I can purchase fabric to sew some garments. Standard: I will clothe her in the new garment I have made, so that she may attend the ball. Non-standard: This cloth shop only sells women's garments. Non-standard: The clothes shop only sells bolts of cloth. complementary and complimentary. Things or people that go together well are complementary (i.e., they complete each other); complimentary describes an item given without charge (considered a 'gift'), usually in addition to a product or service that may have been purchased. It also describes praise given to someone or something. Standard: Exercise, nutrition, and medical care are complementary factors in good health. Standard: The motel provides a complimentary breakfast to overnight guests. Standard: Jane was complimentary about the new couch, which she said complements the drapes and carpet. Similarly, a complement is an accessory, while a compliment is a statement of admiration. complacency and complaisance. Complacency means self-satisfaction especially when accompanied by unawareness of actual dangers or deficiencies. Complaisance means the willingness to comply with the wishes of others. contiguous, continual, and continuous. Contiguous means "touching" or "adjoining in space"; continual means "repeated in rapid succession"; continuous means "uninterrupted" (in time or space). Standard: Alaska is not one of the forty-eight contiguous states. Standard: The field was surrounded by a continuous fence. Standard: The continuous murmur of the stream. Standard: His continual interruptions are very irritating. contingent and contingency. As a noun, a contingent is a representative group; a contingency is a possible event. Standard: The explorers were prepared for every contingency. Standard: He was a member of the California contingent at the convention. Non-standard: He was greeted by a contingency from the school board. copy write and copyright: Copy write means to make written copies for manuals, press releases, or advertisements. A copyright consists of select privileges that legally protect a work and prohibit its duplication. Standard: Contact a copy writer if you need more advertisements written for the event. Standard: This book has another five years of protection under its copyright. D defuse and diffuse. To defuse is to remove the fuse from a bomb, or in general to render a situation less dangerous, whereas to diffuse is to disperse randomly. Diffuse can also be used as an adjective, meaning "not concentrated". Standard: Bill's face turned red at Joe's tactless remark to the Kennel Club meeting, but Clarice defused the situation by turning it into a joke. "Not that even a Dachshund would stoop so low, of course!" she quipped. Standard: The speaker droned on, his words like a powerful sleeping gas slowly diffusing through the stuffy air of the auditorium. Standard: The spotlights went dark, leaving the scene lit only by the diffuse glow of the lanterns. Non-standard: Houston was aware it was happening and worked to diffuse the campaign late in the process. Non-standard: A government agency long associated with efforts to mediate and diffuse tense situations in communities helped organize rallies over the killing of Florida teen Trayvon Martin last year, a conservative leaning legal advocacy group claims. Non-standard: Cavaliers small forward Luol Deng tried to diffuse all the questions about how emotional it will be facing his former team – the Chicago Bulls – Wednesday night at The Q. Non-standard: After finding the suspected bomb, Pennsylvania state police were called in to diffuse it. desert and dessert. As a verb, desert means to abandon. As a noun, desert is a barren or uninhabited place; an older meaning of the word is "what one deserves", as in the idiom just deserts. A dessert is the last course of a meal. disassemble and dissemble. To disassemble means "to dismantle" (e.g., to take a machine code program apart to see how it works); to dissemble means "to tell lies". disburse and disperse. Disburse means "to give out", especially money. Disperse means "to scatter". discreet and discrete. Discreet means "circumspect". Discrete means "having separate parts", as opposed to contiguous. disinterested and uninterested. To be disinterested in something means to have no personal stake in a particular side of an issue. To be uninterested means to not be interested in or intrigued by something. Standard: World Cup referees must be disinterested, so they can't be from one of the countries playing in the match. Standard: Though his initial reaction suggested otherwise, he maintains that he remains uninterested in the business proposition. Non-standard: The key to attracting a member of the opposite sex is to balance between giving attention to him or her and appearing disinterested. E e.g. and i.e. The abbreviation e.g. stands for the Latin exempli gratiā "for example", and should be used when the example(s) given are just one or a few of many. The abbreviation i.e. stands for the Latin id est "that is", and is used to give the only example(s) or to otherwise qualify the statement just made. Standard: A Briton is a British citizen, e.g., John Lennon. Standard: Tolkien's The Hobbit is named after its protagonist, i.e., Bilbo Baggins. Non-standard: A Briton is a British citizen, i.e., Paul McCartney (at the last count, there were about 60 million Britons—Sir Paul is far from being the only one) economic and economical. Economic means "having to do with the economy". Economical means "financially prudent, frugal" and also figuratively in the sense "sparing use" (of time, language, etc.) Standard: Buying in bulk can often be the most economical choice. Standard: The actor should be economical in his use of movement. Standard: He attended the School of Economic and Business Sciences. Non-standard: Leading economical indicators suggest that a recession may be on the horizon. Non-standard: The actor should be economic in his use of movement. elicit and illicit. Elicit is a verb that means to draw out, evoke or obtain. Illicit is an adjective that refers to something illegal or improper. Standard: The lawyer hopes to elicit convincing testimony from the witness. Standard: Police found a large amount of illicit drugs. Standard: They had an illicit love affair. emigration and immigration. Emigration is the process of leaving a country; immigration is the process of arriving in a country—in both cases, indefinitely. Standard: Ethnic communities, such as Little Italy, were created by people emigrating from their home countries. eminent, immanent, imminent, and preeminent. Eminent, originally meaning "emerging", means "illustrious or highly-regarded". Preeminent means "most highly-regarded". Imminent means "about to occur". Immanent (less common than the other two, and often theological) means "indwelling, pervading". Standard: The eminent doctor Jones testified on behalf of the defence. Standard: Rumours that war was imminent soon spread through the population. Standard: God's grace is immanent throughout the entire creation. emoji and emoticon. Emojis are actual pictures, whereas emoticons are typographic displays of a facial representation, e.g. :-). epitome is used to mean a typical or ideal example of something. epidemy is an epidemic disease. eponymous is used to describe something that gives its name to something else, not something that receives the name of something else. Standard: Frank, the eponymous owner of Frank's Bistro, prepares all meals in a spotless kitchen. Non-standard: Frank maintains an eponymous restaurant, Frank's Bistro. exacerbate and exasperate. Exacerbate means "to make worse". Exasperate means "to annoy". Standard: Treatment by untrained personnel can exacerbate injuries. Standard: Do not let Jack talk to the state trooper; he is tactless and will just exasperate her. expedient and expeditious. Expedient means "done conveniently or quickly, but possibly improperly". Expeditious means "done efficiently", and does not carry any negative connotation. Standard: The chef's expedient solution was to microwave the undercooked hamburger. Standard: The chef's expeditious solution was to cook a new hamburger. F flack and flak. Flak is adverse criticism. A flack is a publicity agent or press relations person. Standard: He took a lot of flak for his unpopular position. Non-standard: But he took no flack from her people. flesh and flush. To flesh out is to add flesh to a skeleton, or metaphorically to add substance to an incomplete rendering. To flush out is to cause game fowl to take to flight, or to frighten any quarry from a place of concealment. Standard: The forensic pathologist will flesh out the skull with clay. Standard: The beaters flushed out the game with drums and torches. Non-standard: This outline is incomplete and must be flushed out. flounder and founder. To flounder is to be clumsy, confused, indecisive, as if flopping about like a fish out of water (a flounder being a kind of fish). To founder is to fill with water and sink (or, figuratively, to fail). Standard: The ship is damaged and may founder. Standard: She was floundering on the balance beam. Non-standard: The ship is damaged and may flounder. flout and flaunt. One flouts a rule or law by flagrantly ignoring it. One flaunts something by showing it off. Standard: If you have it, flaunt it. Standard: He continually flouted the speed limit. Standard: The diplomat's son flaunted his ability to flout the speed limit. Non-standard: If you have it, flout it. Non-standard: He continually flaunted the speed limit. forego and forgo: Forego means to go before. Forgo means to give up or do without. Standard: After reading the foregoing paragraph, she decided to forgo the rest of the book. G gone and went. Gone is the past participle of go. Went is the simple past tense of go. Non-standard: Looking back on it, they should have went No. 1 in their respective drafts. Non-standard: She had previously underwent a surgical procedure to remove an abscess discovered during a recent ultrasound. Non-standard: Phoenix has went 5–15 over the last 20 games and now that Bledsoe is out with another knee injury, the Suns could potentially see their losing streak extend to seven as they face the elite Cleveland Cavaliers, San Antonio Spurs and Oklahoma City Thunder in their next three games. guarantee and guaranty. In legal terms, a guaranty is a binding assurance of the performance of a product or service, commonly a security for the fulfillment of an obligation (often on another's behalf), while a guarantee is a person who benefits from a guaranty (provided by a guarantor). However, it has become common for the word guarantee to refer to any assurance itself (often verbal, rather than a written warranty) of a certain outcome, including figuratively. The verb form has also become guarantee. Standard: I guarantee that you will make a return on your investment. Standard: The radio advertisement promised a three-month, money-back satisfaction guarantee. Standard: The collision statistics to date seem to virtually guarantee several such accidents per month until this intersection is redesigned. Standard: The completion bond firm lost its $50 million guaranty when the film production collapsed after the death of the director. Uncommon except in law: This phone comes with a written one-year guaranty against defects. (Use warranty in most contexts, which is more precise and more common.) Uncommon except in law: The guarantee studio received a $50 million payout from the completion bond firm. (Rephrase, e.g.: The studio received a $50 million guaranty payout from the completion bond firm.) H hang. The standard past participle of hang is hung. The past participle hanged is reserved for execution by hanging, and sometimes for suicide by hanging, although usage guides differ on the importance of the distinction between hanged and hung. hangar and hanger. Standard: The aeroplane is in the hangar; the coat is on the hanger. hay and straw. Hay is animal fodder made by cutting and drying a grassy plant. Straw is the dry stalk of a cereal plant (e.g., barley, oats, rice, or rye), after the grain or seed has been removed; it is used to line an animal's stall or for insulation. hear and here. To hear is to detect a sound with one's ears. Here refers to one's immediate location. hoard and horde. A hoard is a store or accumulation of things. A horde is a large group of people. Standard: A horde of shoppers lined up to be the first to buy the new gizmo. Standard: He has a hoard of discontinued rare cards. Non-standard: Do not horde the candy, share it. Non-standard: The hoard charged when the horns sounded. Non-standard: It probably shouldn't come as a surprise; an angry hoard is calling for his head to be mounted on a wall. Non-standard: Despite good progress on the team's bid for a new arena, the Bucks aren't getting LeBron James or Durant next summer, so why horde cap space to chase ghosts? I imply and infer. Something is implied if it is a suggestion intended by the person speaking, whereas a conclusion is inferred if it is reached by the person listening. Standard: When Tony told me he had no money, he was implying that I should give him some. Standard: When Tony told me he had no money, I inferred that I should give him some. Non-standard: When Tony told me he had no money, he was inferring that I should give him some. inherent and inherit. A part inherent in X is logically inseparable from X. To inherit is a verb, meaning "pass down a generation". Standard: Risk is inherent in the stock market. Standard: The next president inherits a legacy of mistrust and fear. Non-standard: There is violence inherit in the system. it's and its. It's is a contraction that replaces it is or it has (see apostrophe). Its is the possessive determiner corresponding to it, meaning "belonging to it". Standard: It's time to eat! (it is time) Standard: It's been nice getting to meet you. (it has been) Standard: My cell phone has poor reception because its antenna is broken. Non-standard: Its good to be the king. Non-standard: The bicycle tire had lost all of pressure. J jibe and jive. Jibe is to be in accord with. Jive is hepcat patois or deception. Standard: Don't give me that same old jive. Standard: Your report doesn't jibe with the facts. Non-standard: Your report doesn't jive with the facts. L levee and levy. A levee is a structure built along a river to raise the height of its banks, thereby preventing nearby land from flooding (see: dike). To levy is to impose (1) a tax, fine or other assessment, or (2) a military draft; as a noun, a levy is an assessment or army thus gathered. The two words share a common root, but they are not considered interchangeable in Standard English. Because they are homophones, misuse is usually only apparent when observed in writing. Standard: The Netherlands is well known for its elaborate system of levees. Standard: This statute allows the state to levy a 3% tax. Non-standard: Recent storms have weakened the levy. loathe and loath or loth: Loathe is a verb meaning "to strongly dislike", and loath (or loth) is an adjective meaning "unwilling" or "reluctant". Standard: I loathe arrogant people. Standard: I was loath to concede defeat. Standard: I was loth to concede defeat. Non-standard: Colangelo and Krzyzewski are loathe to break the players up into categories, but essentially, that's what is in place. Non-standard: Which is why the Panthers were loathe to give him a guaranteed contract. loose and lose. Loose can mean the opposite of tight, or the opposite of tighten. Lose can mean "fail to win", "misplace", or "cease to be in possession". Lose is often misspelled loose. Standard: We cannot afford to lose customers to our competitors. Standard: A screw is loose and I need a screwdriver to tighten it. Non-standard: If the team cannot score any points, they will loose the game. M militate and mitigate. To militate is to fight or exert pressure for something to happen or not to happen; it is typically followed by a preposition. To mitigate is to make something milder, typically something undesirable, and takes no preposition. Standard: The seriousness of your crime was mitigated by the provocation you were under. Standard: Over-protective practices in this factory militate against increased efficiency. Non-standard: Over-protective practices in this factory mitigate against increased efficiency. N novice and novitiate. A novice is a prospective or trainee member, as of a religious order. The novitiate is the state of being a novice, or the time for which one is a novice. However, a novice monk or nun is often incorrectly described as "a novitiate" (perhaps confused with "initiate"). O of and have. In some dialects of spoken English, of and the contracted form of have, 've, sound alike. However, in standard written English, they are not interchangeable. Standard: Susan would have stopped to eat, but she was running late. Standard: You could have warned me! Non-standard: I should of known that the store would be closed. (Should be "I should've known" or “I should have known”) overestimate and underestimate. There is frequent confusion between things that cannot and should not be over/underestimated, though the meanings are opposite. Standard: The damage caused by pollution cannot be overestimated (i.e., it is so enormous that no estimate, however high, is excessive) Standard: The damage caused by pollution should not be overestimated (i.e., while significant, it would be wrong to exaggerate it) Standard: The damage caused by pollution should not be underestimated (i.e., it is wrong to regard it as minor) Non-standard: The damage caused by pollution cannot be underestimated (literal meaning: it is so minimal that no estimate is too small. Intended meaning: as in the first or third example) P palate, palette, and pallet. The palate is the roof of the mouth; used metaphorically to refer to one's preferences in food. A palette is a board for holding and mixing paint; used metaphorically to refer to a range or selection of colors or other features. A pallet is a wooden platform for raising stacked goods off the floor, or a thin sleeping mattress placed on the floor. Standard: After unloading the boxes from the pallets, I slept on a pallet on the floor. Standard: My palate is not very refined. Standard: The artist placed globs of varying paint colors on his palette before beginning to paint. past and passed. Past refers to events that have previously occurred, while passed is the past tense of "to pass", whether in a congressional action or a physical occurrence. Standard: Congress passed the bill limiting the powers of the President. Standard: History is mainly concerned with the events of the past. Standard: He went past my house on his way to the store. Standard: He passed my house on his way to the store. Non-standard: He past my house on his way to the store. peremptory and preemptive. A peremptory act or statement is absolute; it cannot be denied. A preemptive action is one taken before an adversary can act. Standard: He issued a peremptory order. Standard: Preemptive air strikes stopped the enemy from launching the new warship. perpetrate and perpetuate. To perpetrate something is to commit it, while to perpetuate something is to cause it to continue or to keep happening. Standard: The gang perpetrated outrages against several citizens. Standard: The stories only serve to perpetuate the legend that the house is haunted. perquisite and prerequisite. Perquisite usually means 'an extra allowance or privilege'. Prerequisite means 'something required as a condition'. Standard: He had all the perquisites of a movie star, including a stand-in. Standard: Passing the examination was one of the prerequisites for a teaching position. perspective and prospective. Perspective is a view with correct visual angles, example: parallel railway tracks converging in the distance. "Prospective" is a future possibility or expectation. perspicuity and perspicacity. If something is perspicuous, it is easily understood; its meaning is obvious. If one is perspicacious, then one is quick to understand or has good insight. Standard: I admired her perspicacity; she just seemed to get it so much better than I. Standard: He expressed the idea so perspicuously that anyone could understand. Non-standard: She spoke in a perspicacious way. photogenic and photographic. The former means someone's likeness is particularly amenable to being well photographed. The latter is anything pertaining to photography whether it is technical, e.g., photographic chemicals or equipment, or generic, e.g., photographic journals. pored and poured. The phrase 'pored over' means to study an item intently, however sometimes seen incorrectly in its place is poured over, which would mean the act of tipping a substance onto something. prescribe and proscribe. To prescribe something is to command or recommend it. To proscribe somebody or something is to outlaw them or it. Standard: The doctor prescribed some medicine to clear up the infection. Standard: The new law was going to proscribe public gatherings. prevaricate, procrastinate, and prognosticate. To prevaricate is to avoid telling the truth. To procrastinate is to put off doing something that must be done. To prognosticate is to predict or prophesy. principal and principle. Principal is an adjective meaning "main" (though it can also be a noun meaning the head of a college or similar institution). "Principle" is a noun meaning a fundamental belief or rule of action. Standard: The principal achievement of the nineteenth century is the rise of industry. Standard: I like a man who sticks to his principles. Non-standard: The principle belief of Marxism–Leninism is the dictatorship of the proletariat. progeny, prodigy, and posterity. Progeny are offspring, or things that follow or develop from something else. A prodigy is a genius or extremely talented person (especially a young one). Posterity means future generations, or the future in a personified sense (usually used after "for" or "to"). R rain, reign and rein. A reign refers to the rule of a monarch. Reins are the straps used to control the movements of an animal (typically a horse). Thus, to "take the reins" means to assume control, and to have "free rein" means to be free of constraints. Standard: From dozens of ideas floated to rein in skyrocketing costs of Oregon's public pension system, Gov. John Kitzhaber and lawmakers two years ago pinned their hopes on one, risky option. Standard: Harrison would thrive in bench units with less attentive defenders and presumably a less capable lead guard who can let him take the reins from time to time. Standard: And there are signs that ESPN's spending may need to be reined in. Standard: Thursday's central bank comments came after analysts said allowing market forces free rein could drive the yuan sharply lower. Standard: It is but one example of Israel's failure to rein in youths suspected of carrying out ultranationalist attacks. Standard: Nationally, gambling has been slow to recover since the Great Recession as people continue to rein in leisure spending. Standard: Button's representatives said in a statement Friday that police have told them such thefts have become a growing problem, with thieves pumping in the gas to give them free rein in the properties. Standard: It's rare to bring homicide charges against a physician, but the case came amid a prescription drug abuse epidemic that has led lawmakers to try to rein in so-called pill mills that dole out medications with little scrutiny. Standard: But reining in Maduro, who became president after Chavez died in 2013, will be tough. Standard: A few months later, the ailing president, Boris Yeltsin, stepped aside and Vladimir Putin took the reins as Russian president. Non-standard: ...the Suns gave Sports Illustrated's Jack McCallum free reign of practices... Non-standard: Bobby Jindal, a whiz kid takes the reigns of Louisiana's Department of Health and Hospital Non-standard: Taylor will be passing on the reigns of the neighborhood school to Assistant Principal Amy Kleiner. Non-standard: ...his rein of terror in 1969 is fascinating part of the history of 20th century crime... Non-standard: He spent the last four seasons trying to patch together lineups in Houston, where injuries reined supreme, and he had a great deal of success under the circumstances. Non-standard: Wesley Johnson: It's more that Johnson was proven a long-limbed bust before Lindsey Hunter and a tanking Phoenix team gave him free reign to jack triples and perhaps clarify his NBA destiny. Johnson still shot just 32 percent from deep amid all that freedom; his chances of membership here look slim. Non-standard: Over 13 games, he averaged 15.5 points and 9.9 assists while shooting 44.8 percent from 3-point range (while reigning in his attempts a bit). Non-standard: The transition from the previous luxury tax system, which penalized teams one dollar for every dollar they went over the tax threshold, to the new one that includes an escalating pay scale for every $5 million teams go over the threshold, was supposed to reign in spending and help level the playing field. Non-standard: If you're Mike Lupica you have the biggest column in one of America's largest circulation newspapers, you host a prestige show on ESPN each week and you have, presumably, free reign to talk about whatever you want to talk about in sports. Non-standard: In fact, many moms say there's no way they would let their children do what their own parents gave them free reign to do as kids. Non-standard: Brooks allowed Durant and Westbrook free reign as players and kept an open-door policy in terms of suggestions, not that he had much choice. Non-standard: It'll be up to Doc Rivers and Chris Paul to reign Stephenson in early on. Non-standard: Mexican fans reigned down debris on Panama players, and the match was held up for 11 minutes before Guardado stepped up to nail his first penalty kick and send the match to extra time. Non-standard: Bryant has been given free reign for close to a decade. raise and raze. Raise means to move to a higher position while raze means to tear down. redundant does not mean "useless" or "unable to perform its function". It means that there is an excess of something, that something is "surplus to requirements" and no longer needed. It can also refer to a duplicate of something retained as a backup, failsafe, or reinforcement. Standard: The week before Christmas, the company made seventy-five workers redundant. Standard: A new pill that will instantly cure any illness has made antibiotics redundant. (Antibiotics could still be used to cure illnesses, but they are no longer needed because a better pill has been invented.) Standard: The security system has two levels of redundancy. Non-standard: Over-use of antibiotics risks making them redundant. (This should read: over-use of antibiotics risks making them ineffective) regime, regimen and regiment. A regimen is a system of order, and may often refer to the systematic dosing of medication. A regiment is a military unit. Standard: The sick soldier was removed from his regiment. Standard: The sick soldier was ordered to complete a regimen of amoxicillin. Standard: But there were issues regarding his training regimen and conditioning, and he was demoted by the Kings last season to their American Hockey League affiliate in Manchester. Standard: The story states that TB12 markets Guerrero's training regimen as "a proven approach to help people reach and maintain their peak levels of performance. Developed by Brady and his body coach, Alex Guerrero, their revolutionary approaches to wellness in the areas of nutrition and supplementation, as well as physical and mental fitness training, have helped athletes maximize their potential and maintain peak performance levels for more than a decade." Non-standard: But wow, without the daily regiment of basketball, imagine what will happen to him? Non-standard: Sports, science and technology are converging at an all-time pace and eight NBA teams are experimenting with a new device designed to optimize and personalize training regiments, thus the ability to maximize performance and reduce injury. Non-standard: A treatment regiment, sometimes constant, was not enough. Non-standard: It's going to require a lot of additional work but she already runs a lot as part of her training regiment for tennis. Non-standard: It would appear that Guerrero's training, eating, and supplemental regiment works, at least for Brady, to whom Guerrero devotes near-constant attention by mapping out his training and nutrition years into the future. regretful and regrettable. Regretful is an adjective meaning to be full of regret. Regrettable is an adjective meaning deplorable or unfortunate. Standard: She felt very regretful about her regrettable actions. revert. To revert is to return to a former state, not to reply or respond to someone. Standard: The Hulk reverted to Bruce Banner after he had a nice cup of tea and calmed down a bit. Non-standard: Thanks for your email, I will look into this and revert to you. S sensual and sensuous. Both words mean "to do with the senses". Sensual is more often applied to a pleasure or experience or to a person's character; sensuous to someone or something of enticing appearance. Standard: Don Juan is the most sensual character in fiction. Standard: Ascetics believe in avoiding all sensual pleasures. Standard: Marilyn Monroe looks extremely sensuous in this film clip. set and sit. When used as a transitive verb, to set means "to place" or "to adjust to a value", whereas to sit means "to be seated". Standard: Set the pot upon the stove. Standard: Set the temperature-control to 100 °C. Non-standard: Set down over there. Standard: Sit on the chair. shirk and shrink. To shirk means "to consistently avoid", "to neglect", "to be too afraid to engage". To shrink means "to contract", "to become physically smaller in size"; also, to shrink away means, "to suddenly jerk away from something in horror". However, to shrink from may also mean, "to hesitate or show reluctance toward". Standard: I will not shirk discussion. Standard: I will not shrink from discussion. Standard: She shrank away from me. Non-standard: I will not shrink discussion. Non-standard: I will not shirk from discussion. shall, will, should and would. See Shall and will. since and sense. Since is used as an adverb or a preposition to imply the same meaning as "after then" or "from" in a sentence. Sense is a noun meaning any method to gather data about an environment. Standard: I have known her since last year. Standard: My sense of smell is weak. Non-standard: I won't go sense I have no fuel. Non-standard: I can since your aura. cite, sight and site. A sight is something seen; a site is a place. To cite is to quote or list as a source. Standard: You are a sight for sore eyes. Standard: I found a list of the sights of Rome on a tourist site. Standard: Please cite the sources you used in your essay. Standard: You must travel to the site of the dig to see the dinosaur bones. Standard: It is necessary to have line-of-sight if you want to use semaphore. Non-standard: One must be careful on a construction sight. Non-standard: I will site the book in which I saw the statistics. Non-standard: I could not fire because I did not have line-of-site to the target. stationary and stationery. Stationary is an adjective meaning "not moving"; stationery is a noun meaning office supplies. Standard: The train remained stationary for a few moments, before lurching forward along the track. Standard: We can pick up more paper and pens at the stationery store. Non-standard: Let's go buy some stationary at the department store. Non-standard: An object remains stationery until a force acts upon it. suit and suite. Suit is a noun meaning an article of clothing; it is also a verb meaning to make/be appropriate. Suite is a noun meaning a set of things forming a series or set. Standard: He got dressed in his new suit. Standard: Before leaving the hotel suite, she checked her lipstick in the mirror. Non-standard: That wall color will suite our apartment nicely. T taut and tout: Taut is when something is tight or stretched. Tout means to hype up, advertise, or promote. Standard: You need to hold it taut to stretch it properly. Standard: This concert needs a lot of tout to be successful. temblor and trembler. A temblor is an earthquake. A trembler is something that trembles (also, a fine-tuned motion detector). tenant and tenet. A tenant is a person or body that rents property. A tenet is a particular belief of a religion or other belief system. Standard: I am looking for a tenant for my apartment. Standard: One of the tenets of Roman Catholicism is the infallibility of the Pope. Non-standard: "... to accept certain tenants of Islam while rejecting others". than and then. Than is a grammatical particle and preposition associated with comparatives, whereas then is an adverb and a noun. In certain dialects, the two words are usually homophones because they are function words with reduced vowels, and this may cause speakers to confuse them. Standard: I like pizza more than lasagna. Standard: We ate dinner, then went to the movies. Non-standard: You are a better person then I am. their, there, they're, and there're. There refers to the location of something. Their means "belonging to them". They're is a contraction of "they are". There're is a contraction of "there are". Standard: There're five of them, and they're all coming to the restaurant for their dinner; we will meet them there. Non-standard: I don't like peanuts because of there texture when being chewed. Non-standard: Bobby and Sally are coming over later and there bringing some friends with them. Non-standard: The dogs are lying over their in the shade. there's, where's, etc. In spoken English, a singular contraction can be used in reference to a plural in words like there's and where's. This stems from the fact that there're and where're are more difficult to enunciate and are often avoided for that reason in colloquial speech. Non-standard: Where's the cars? (Instead of Where're or where are) Non-standard: There's many types of car. (Instead of There are) throe and throw. Throe is a spasm (more often seen in the plural throes). Throw means to propel an object through the air. to and too. Too means "in excess" or "also". To is a preposition or is a part of a verb in the infinitive. At the end of a sentence to may also refer to a dropped verb in the infinitive. Standard: I have too much time on my hands. Standard: Kick it to me. trimester. A trimester is a period of three months. Because it is most commonly used in conjunction with a nine-month academic year or a nine-month term of human pregnancy, it is sometimes wrongly assumed that trimester is a synonym for one third of a year or other period. Standard: One calendar year contains four trimesters. Non-standard: Without further delay, then, comes ESPN.com's annual (and overdue) First Trimester Report, ushering folks back to the office by taking stock of the season's opening third. U use and used. Used is the past participle of use. Among its meanings is "accustomed". The expression used to is in some spoken accents similar sounding to use to, leading to confusion. Standard: I always carry an umbrella because I am used to the weather being unpredictable in Melbourne. Standard: An umbrella is what I use to avoid getting wet. Non-standard: You should be use to it by now. V venal and venial. These words are sometimes confused; venal means "corrupt", "able to be bribed", or "for sale"; venial means "pardonable, not serious". Standard: According to Catholic doctrine, eating meat on a Friday during Lent is a venial sin, but murder is a mortal sin. Standard: All ages have examples of venal politicians. W waive and wave Standard: Brent Barry, TNT's analyst for Thursday's Bulls-Knicks game, views Phil Jackson's latest experiment a lost cause and advocates Carmelo Anthony waive his no-trade clause to join a winner. Standard: The forthcoming "pink slime" trial has the feeling to some degree of Hogan v. Gawker, insofar as there being a state court judge who waved off First Amendment objections to let a jury decide. Non-standard: Scott waived off the notion that the Pac 12 might become a dumping ground for the SEC. Non-standard: Tensions were apparently high at this meeting, and three SPD officers moved toward the pie-thrower — but Johnson waived them off. Non-standard: Except, upon review, the referees said that the clock should have started when Cousins touched the ball and that meant the shot did not get off on time. The officials waived off the shot. Non-standard: On the call, Van Gundy argued for Snyder to waive it off and end the game. Non-standard: Only two people, Ed Gilmartin, vice president of Beta Theta Pi, and Ryan Foster, waved their right to a preliminary hearing. Non-standard: In his post, Obama waives off the legal challenge. want, won't and wont. Want means the act of desiring or wishing for something. Won't is a contraction for "will not", while wont is a word meaning "accustomed" or "inclined to" (as an adjective) or "habit or custom" (as a noun). Standard: He won't let me drive his car. Standard: He spent the morning reading, as he was wont to do. Standard: He took a walk in the evening, as was his wont. Standard: His only want was to see his son again. Non-standard: I wont need to go to the supermarket after all. Non-standard: He took a walk in the evening, as was his want. warrantee and warranty. A warranty is a legal assurance that some object can perform some specified task or meets certain quality standards. A warrantee is a person who benefits from a warranty, provided by a warrantor. The verb form is warrant. Standard: Most new cars come with at least a three-year warranty. Standard: This contract warrants that you will make a certain minimum return on your investment. Non-standard: Your mobile phone has stopped working? Maybe you need to file a claim under the warrantee. where and wherefore. Wherefore means 'why'. In the well-known passage from Romeo and Juliet she is not asking where he is but rather why he is Romeo, whose name only stands in the way of their love. who's and whose. Whose is an interrogative word (Whose is this?) or a relative pronoun (The people whose house you admired); who's is a contraction for "who is" or "who has". Non-standard: Which brings us right back to Del Negro, whose navigated this mercurial stretch seamlessly. Non-standard: But there remains a group of teams, of which the Brooklyn Nets are a member, who's fate remains in the balance. Non-standard: Mr. Cent, who's real name is Curtis Jackson, was worth as much as $150 million earlier this year. Non-standard: Well, more like 19 months older, but whose counting? Non-standard: At 7’2 300, Haas is one of the only players in the country whose actually bigger than Hammons. Non-standard: Embattled, hard-line, milquetoast coach who's job is on the line so he cuts it loose and starts winning??? Non-standard: Amy Carey, a VIPP volunteer whose the first to respond to a lost dog call, made it her mission to find the canines. Non-standard: They have run the numbers and they know that enough guys slip through the cracks the first time they come through the league that it's worth giving unproven guys a shot as opposed to a veteran on the downside of his career whose already shown what he will be. Non-standard: Duncan is getting older but he's still a 7’0 with one of the most refined post games in NBA history whose capable of stepping out and playing at the high post. Non-standard: There's a world full of young basketball players who slipped through the cracks in their first stint through the NBA and there's no reason for any of the league's 30 teams to waste a roster spot on a proven commodity whose proven he can't play anymore. Non-standard: Sen. Marco Rubio, who's seat is up, has said he will not seek re-election. Non-standard: Renowned Dallas sports anchor Dale Hansen of WFAA believes that Starr isn't the only one who's job should be in the chopping block, however. Non-standard: Track, supposedly the glue that brings the whole thing together, would be nothing more than a collection of pole vaulters, distance runners and others who's every accomplishment immediately falls under the lens of the ever-present doping microscope: Is anything you see in this stadium really to be believed? woman and women. Woman is the singular form of the word for an adult human female. Women is the plural form. Non-standard: USADA is the national anti-doping partner of the Olympics, and Rousey spent much of her childhood training to compete in the Games, eventually becoming the first American women to medal in judo with her 2008 bronze medal campaign in Beijing. Non-standard: The audience cheered as the woman were asked to leave, and everyone gave Lochte a standing ovation. Non-standard: Keenly aware of her role as a women of color in media, Ifill once told The New York Times, "When I was a little girl watching programs like this – because that's the kind of nerdy family we were – I would look up and not see anyone who looked like me in any way. No women. No people of color. Y you're and your. While they sound the same in many dialects, in standard written English they have separate meanings. You're is a contraction of "you are", and your is a possessive pronoun meaning "belonging to you". When in doubt, check whether the word in question can logically be expanded to "you are". Standard: When driving, always wear your seatbelt. Standard: If you're going out, please be home by ten o'clock. Non-standard: You also can't use 4G or LTE if you're Android phone doesn't support Bluetooth tethering. Non-standard: If you're first instinct is "man the USA lucked into the soft side of the bracket" your instinct would be correct. Non-standard: From here, you draft supporting talent, develop that talent, add some veteran free agents, and if your lucky, you're on your way to truly competing. Non-standard: You're mother called this morning. Non-standard: Your the first person to notice my new haircut today! See also Commonly misspelled English words English language, English grammar, Disputed English grammar Engrish, Franglais, Spanglish, Yinglish Eggcorn Homonym, Synonym, Antonym Hypercorrection Malapropism Misspelling List of common English usage misconceptions List of dialects of the English language List of English homographs List of English words with disputed usage List of words having different meanings in British and American English Wiktionary appendices List of dialect-independent homophones List of dialect-dependent homophones Notes References Also available as part of New Oxford Style manual (2016). External links "Not I. It's me", by John Humphrys (2003). An opinion piece excerpted from his book Between You and I: A Little Book of Bad English. Grammar Puss, by Steven Pinker (1994). Argues against prescriptive rules. A revised draft of this article became the chapter "The Language Mavens" in The Language Instinct. Can Grammarly improve your writing Lists of English words English grammar Linguistic error
The Algol-class vehicle cargo ships, also known as Fast Sealift Ships (FSS) or SL-7s, are currently the fastest cargo ships in the world, capable of speeds in excess of . Originally built in 1972 and 1973 as high-speed container ships known as SL-7s for SeaLand, the ships' high operating costs limited their profitability. All eight ships were acquired by the United States Navy in 1981 and 1982, with the last ship converted, delivered to and placed in service with Military Sealift Command in 1986. The conversion entailed the installation of four cranes, addition of roll on/roll off capability and a redesign of the cargo hold to better facilitate storage of vehicles. Due largely to their high cost of operation, all fast sealift ships are kept in Reduced Operating Status, but can be activated and ready to sail in 96 hours. All ships are named after bright stars in the night sky. Service All eight ships took part in Operations Desert Shield and Desert Storm, delivering thirteen percent of all the cargo transported between the United States and Saudi Arabia during and after the Persian Gulf War. Fast sealift ships have taken part in Operations Restore Hope, Joint Guardian, Enduring Freedom and Iraqi Freedom in addition to humanitarian relief efforts across the globe. On 1 October 2007, the United States Maritime Administration began operating all eight FSS. All eight were transferred to the Ready Reserve on 1 October 2008. At this time their USNS designations were replaced with SS designations as they were no longer US Navy ships. Antares propulsion failure From GlobalSecurity.org: Unfortunately, one FSS, the Antares, failed off the East coast of the United States with a considerable amount of the 24th Infantry Division (Mechanized) equipment and 100 soldiers aboard. The ship was towed to Rota, Spain by the ocean-going tugboat Apache. Some of the cargo was airlifted to Saudi Arabia but most had to be unloaded and reloaded by the soldiers and Seebees aboard the FSS USNS Altaire returning from her initial voyage. This cargo arrived about three weeks later than planned. (Before the war, the Antares had been scheduled for major overhaul, but this was delayed. Thus a degree of risk was accepted in the decision to use Antares to speed the deployment.) Fast Sealift Ships SS Algol (T-AKR-287) (formerly SS Sea-Land Exchange) SS Bellatrix (T-AKR-288) (formerly SS Sea-Land Trade) SS Denebola (T-AKR-289) (formerly SS Sea-Land Resource) SS Pollux (T-AKR-290) (formerly SS Sea-Land Market) SS Altair (T-AKR-291) (formerly SS Sea-Land Finance) SS Regulus (T-AKR-292) (formerly SS Sea-Land Commerce) SS Capella (T-AKR-293) (formerly SS Sea-Land McLean) SS Antares (T-AKR-294) (formerly SS Sea-Land Galloway) References External links United States Navy Fact File: Fast Sealift Ships – T-AKR Naval Vessel Register: Fast Sealift – Support (FSS), Specialized Globalsecurity.org Military Sealift Command fact sheet Auxiliary ship classes of the United States Navy High speed vessels of the United States Navy Auxiliary transport ship classes
Eichbach is a small river of Hesse and of Bavaria, Germany. It is the right headwater of the Weibersbach in Albstadt. See also List of rivers of Hesse List of rivers of Bavaria Rivers of Hesse Rivers of Bavaria Rivers of the Spessart Rivers of Germany
Uppland Runic Inscription 6 (U 6) is the Rundata designation for a runestone that was discovered in several different pieces on the island of Björkö in Stockholm County, Sweden (within the historic province of Uppland). The 10 extant pieces have been placed together and are displayed in the Birka Museum on the island of Björkö. Discovery Different fragments of the stone had been found on Björkö for over 100 years. The first fragments were discovered by Hjalmar Stolpe in 1873 and additional pieces were found in 1893, 1992, and 2012. Originally, researchers thought the pieces belonged to several different runestones, but after the most recent find, they were able to piece together all fragments into one stone. Many of the pieces had been used in the construction of local buildings. Owing to the various discoveries over the years, the miscellaneous finds were originally designated separately as U 6, U 7, U 8, and U Fv 1993:230. The Swedish History Museum has the pieces inventoried as numbers 5208, 30573:1-4, 30574:1-3, and 35206. Description The stone's design includes two quadrupeds, a rider and a large cross. The runic inscription is badly fragmented, although it is known that at least two people were commemorated. The carving was done by runemaster Östen, who is known for his stones in the Södertälje area. Inscription Transliteration of runic text into Latin letters × þorst… … …stain × rais… … -str-- …-… …uk × eftiʀ × ¶ …tunba… × … × a… …ʀ… …ain × … Translation into English Þorsteinn (and)… -steinn raised… (in memory of) Ástriðr (?)… And in memory of… Eysteinn (?)… References Uppland Runic Inscription 6
Giacomo Ferrari may refer to: Giacomo Ferrari (politician), Italian engineer and politician Giacomo Ferrari (rugby union), Italian rugby union player Giacomo Ferrari (sailor), Italian sailor Giacomo Gotifredo Ferrari, Italian composer and singing teacher
Nick Willing (born 1961) is a British director, producer and writer of films and television series. Early life Willing is the son of Portuguese painter Dame Paula Rego and English artist Victor Willing and was largely brought up in Portugal, but settled in England at the age of 12, after the family suffered a business collapse. In 2017 he directed a television film, Paula Rego, Secrets & Stories, about his mother, featuring his two sisters and his brother-in-law, Australian sculptor, Ron Mueck. He graduated from The National Film and Television School in 1982 and started directing music videos for bands such as Eurythmics, Bob Geldof, Swing Out Sister, Debbie Gibson, Kirsty MacColl, Kim Appleby, Tony Banks, and Nik Kershaw. Throughout this period he was also writing screenplays, and in 1996 his adaptation of the Steve Szilagyi novel Photographing Fairies was financed by PolyGram Filmed Entertainment and made into a feature film. Photographing Fairies was a critical success and won several awards including the Méliès d’Or in 1998. Alice in Wonderland followed with a cast which included Whoopi Goldberg, Ben Kingsley, Robbie Coltrane, Martin Short, Peter Ustinov, Gene Wilder, Ken Dodd, Christopher Lloyd, George Wendt and Miranda Richardson. Alice was made for NBC television in 1999 and won 4 Primetime Emmys. Director filmography 1997 – Photographing Fairies 1999 – Alice in Wonderland 2000 – Jason and the Argonauts 2002 – Close Your Eyes a.k.a. Doctor Sleep and Hypnotic 2004 – Sea of Souls 2005 – The River King 2006 – Jackanory, The Magician of Samarkand and Muddle Earth 2007 – Tin Man 2009 – Alice 2011 – Neverland 2013 – Baby Sellers 2014 – Altar 2015 – Olympus 2017 – Paula Rego, Secrets & Stories 2019 – Unstoppable. Sean Scully & The Art of Everything As writer Nick Willing wrote his first two movies Photographing Fairies and Doctor Sleep and went on to develop the short stories of H. G. Wells into a semi-biographical television series, The Infinite Worlds of H. G. Wells, which premiered in 2001. More recently he wrote the series Alice which received two Primetime Emmy Award nominations, and Neverland for the Syfy network and Sky Movies. In 2014, he wrote the thriller Altar and created the 13-part series Olympus. House of Stories In 2013, Nick stepped in to help negotiate an alternative contract for Casa Das Historias Paula Rego, the Cascais, Portugal museum dedicated to his mother’s work. As a consequence of the 2011–14 international bailout to Portugal by the European Union and the IMF, the Portuguese government closed several foundations, including Paula Rego's, leaving the museum in limbo. He now remains in an administrative role, representing his mother’s interests at the museum. Interviews References External links Living people English film directors British people of Portuguese descent Place of birth missing (living people) English people of Portuguese descent English television directors Alumni of the National Film and Television School People educated at Bryanston School 1961 births
Echium rosulatum is a species of flowering plant in the family Boraginaceae. It is endemic to the western portion of the Iberian Peninsula in Portugal, Galicia (Spain) and the Sierra Morena. It favors acidic and somewhat nitrified soil. It has two subspecies, one native to mainland Iberia and the other one (subsp. davaei) native to the Berlengas archipelago. Description Echium rosulatum is a perennial and generally multi-stemmed plant with decumbent or ascending stems. Leaves are partly to fully sericeous with scant indumentum, few setae and short hairs. The basal leaves are elliptic or oblanceolate, they form a rosette and have a slightly marked petiole. The stem leaves range from oblong or elliptic in the middle, to narrowly ovate or ovate-lanceolate in the upper portion. Inflorescence The inflorescence is panicled, loose, with cymes around 13 cm (up to 18 cm (5.1 to 7.1 in)) when fruiting. Flowers are zygomorphic. The bracts are ovate-lanceolate and are longer than the calyx. The funnel-shaped corolla is long (up to 30 mm) and is covered in small hairs in almost all its surface, with some longer hairs on the nerves. Three to four stamens (two in certain cases) are exerted from the corolla. The stamens' filaments are whitish and sparsely hairy. At least two of the ovoid, bluish-brown anthers are exerted. The style is hairy and longer than the corolla. References rosulatum Endemic flora of the Iberian Peninsula
Miguel Blesa de la Parra (8 August 1947 – 19 July 2017) was a Spanish banker, the chairman of the Spanish bank Caja Madrid from 1996 to 2009. In February 2017, Blesa was sentenced to a six-year jail term in connection with the widespread misuse of company credit cards during his long tenure as chairman of Caja Madrid, but remained at liberty pending the outcome of an appeal to the Supreme Court. Blesa was found dead on a private hunting estate in the province of Córdoba on 19 July 2017, with a shotgun wound to the chest. The autopsy on 20 July confirmed that he killed himself. As the death of Rita Barberá and the others from Gürtel (Francisco Yáñez, María del Mar Rodríguez and Isidro Cuberos) Blesa's heirs are liable for damages to the harmed. He received a Golden Medal from the Real Academia de la Historia, and was awarded as Mejor Presidente de Entidad Financiera 2005 by Banca 15. References 1947 births 2017 suicides 2017 deaths Spanish bankers People named in the Panama Papers Suicides by firearm in Spain Spanish fraudsters University of Granada alumni People from Linares, Jaén
In common usage, technoscience refers to the entire long-standing global human activity of technology combined with the relatively recent scientific method that occurred primarily in Europe during the 17th and 18th centuries. Technoscience is the study of how humans interact with technology using the scientific method. Technoscience thus comprises the history of human application of technology and modern scientific methods, ranging from the early development of basic technologies for hunting, agriculture, or husbandry (e.g. the well, the bow, the plow, the harness) and all the way through atomic applications, biotechnology, robotics, and computer sciences. This more common and comprehensive usage of the term technoscience can be found in general textbooks and lectures concerning the history of science. The relationship with the history of science is important in this subject and also underestimated, for example, by more modern sociologists of science. Instead, it is worth emphasising the links that exist between books on the history of science and technology and the study of the relationship between science and technology within a framework of social developments. We must always consider the generational leap between historical periods and scientific discoveries, the construction of machines, the creation of tools in relation to the technological changes that occurs in very specific situations ( Cfr. Guglielmo Rinzivillo, Raccontare la tecnoscienza. Storia di macchine, strumenti, idee per fare funzionare il mondo, Roma, Edizioni Nuova Cultura, 2020, p.7, ; ISSN 2284-0567). An alternate, more narrow usage occurs in some philosophic science and technology studies. In this usage, technoscience refers specifically to the technological and social context of science. Technoscience recognises that scientific knowledge is not only socially coded and historically situated but sustained and made durable by material (non-human) networks. Technoscience states that the fields of science and technology are linked and grow together, and scientific knowledge requires an infrastructure of technology in order to remain stationary or move forward. The latter, philosophic use of the term technoscience was popularized by French philosopher Gaston Bachelard in 1953. It was popularized in the French-speaking world by Belgian philosopher Gilbert Hottois in the late 1970s and early 1980s, and entered English academic usage in 1987 with Bruno Latour's book Science in Action. In translating the concept to English, Latour also combined several arguments about technoscience that had circulated separately within science and technology studies (STS) before into a comprehensive framework: the intertwinement of scientific and technological development as e.g. shown by the lab studies; the power of laboratories (and engineering workshops) to change the world as we know and experience it; the seamless webs that connect scientists, engineers and societal actors in actual practice (cf. John Law's concept of heterogeneous engineering); the propensity of technoscientific world to create new nature–culture hybrids, and hence to complicate the borders between nature and culture. Conceptual levels of philosophical technoscience We look at the concept of technoscience by considering three levels: a descriptive-analytic level, a deconstructivist level, and a visionary level. Descriptive-analytic On a descriptive-analytic level, technoscientific studies examine the decisive role of science and technology in how knowledge is being developed. What is the role played by large research labs in which experiments on organisms are undertaken, when it comes to a certain way of looking at the things surrounding us? To what extent do such investigations, experiments and insights shape views of 'nature' and of human bodies? How do these insights link to the concept of living organisms as biofacts? To what extent do such insights inform technological innovation? Can the laboratory be understood as a metaphor for social structures in their entirety? Deconstructive On a deconstructive level, theoretical work is being undertaken on technoscience to address scientific practices critically, e.g. by Bruno Latour (sociology), by Donna Haraway (history of science), and by Karen Barad (theoretical physics). It is pointed out that scientific descriptions may be only allegedly objective; that descriptions are of a performative character, and that there are ways to de-mystify them. Likewise, new forms of representing those involved in research are being sought. Visionary On a visionary level, the concept of technoscience comprises a number of social, literary, artistic and material technologies from western cultures in the third millennium. This is undertaken in order to focus on the interplay of hitherto separated areas and to question traditional boundary-drawing: this concerns the boundaries drawn between scientific disciplines as well as those commonly upheld for instance between research, technology, the arts and politics. One aim is to broaden the term 'technology' (which by the Greek etymology of 'techné' connotes all of the following: arts, handicraft, and skill) so as to negotiate possibilities of participation in the production of knowledge and to reflect on strategic alliances. Technoscience can be juxtaposed with a number of other innovative interdisciplinary areas of scholarship which have surfaced in these recent years such as technoetic, technoethics and technocriticism. Facets Social As with any subject, technoscience exists within a broader social context that must be considered. Science & Technology Studies researcher Sergio Sismondo argues, "Neither the technical vision nor the social vision will come into being without the other, though with enough Concerted Effort both may be brought into being together". Despite the frequent separation between innovators and the consumers, Sismondo argues that development of technologies, though stimulated by a technoscientific themes, is an inherently social process. Technoscience is so deeply embedded in people's everyday lives that its developments exist outside a space for critical thought and evaluation, argues Daniel Lee Kleinman (2005). Those who do attempt to question the perception of progress as being only a matter of more technology are often seen as champions of technological stagnation. The exception to this mentality is when a development is seen as threatening to human or environmental well-being. This holds true with the popular opposition of GMO crops, where the questioning of the validity of monopolized farming and patented genetics was simply not enough to rouse awareness. Political Science and technology are tools that continually change social structures and behaviors. Technoscience can be viewed as a form of government or having the power of government because of its impact on society. The impact extends to public health, safety, the environment, and beyond. Innovations create fundamental changes and drastically change the way people live. For example, C-SPAN and social media give American voters a near real-time view of Congress. This has allowed journalists and the people to hold their elected officials accountable in new ways. Environmental Chlorine chemists and their scientific knowledge helped set the agenda for many environmental problems: PCBs in the Hudson River are polychlorinated biphenols; DDT, dieldrin, and aldrin are chlorinated pesticides; CFCs that deplete the ozone layer are chlorofluorocarbons. Industry actually manufactured the chemicals and consumers purchased them. Therefore, one can determine that chemists are not the sole cause for these issues, but they are not blameless. See also Bernard Stiegler Feminist technoscience Technocriticism Technoethics Notes References Steven Lukes, Power (1974), A Radical View, London: Macmillan Bruno Latour and Steve Woolgar (1979). Laboratory Life: the Social Construction of Scientific Facts. Princeton University Press. Gilbert Hottois (1984). Le signe et la technique. La philosophie à l'épreuve de la technique, Paris, Aubier Montaigne, Coll. "Res, L'invention philosophique", p. 59–60. Langdon Winner (1986), The Whale and the Reactor: The Search for Limits in an Age of High Technology, Chicago: University of Chicago Press Stanley Aronowitz, Barbara Martinsons and Michael Menser (1995), Technoscience and Cyberculture, Routledge Adam Schaff (1990). A sociedade informática: as conseqüências sociais da segunda revolução industrial. Editora Brasiliense. Don Ihde (2003) Chasing Technoscience: Matrix for Materiality. Indiana University Press. Sergio Sismondo (2004). An Introduction to Science and Technology Studies. Blackwell Publishing. Daniel Lee Kleinman (2005), Science and Technology in Society: From Biotechnology to the Internet. Blackwell Pub Mike Michael (2006), Technoscience And Everyday Life: The Complex Simplicities of the Mundane, Open University Press Kristin Asdal, Brita Brenna, Ingunn Moser (2007), Technoscience: The Politics of Interventions, Akademika Publishing "Hudson River PCBs — Background and Site Information". United States Environmental Protection Agency. Retrieved 2007-12-31. Hans Lenk (2007), Global TechnoScience and Responsibility, LIT Verlag Don Ihde (2009), Postphenomenology and Technoscience: The Peking University Lectures, State University of New York Adele E. Clarke and al. (2010), Biomedicalization: Technoscience, Health, and Illness in the U.S., Duke University Press Bruce Braun and Sarah J. Whatmore (2010), Political Matter: Technoscience, Democracy, and Public Life, University Of Minnesota Press Marja Ylonen and Luigi Pellizzoni (2012), Neoliberalism and Technoscience: Critical Assessments, Ashgate Publishing Limited Edward Woodhouse (2013), The Future of Technological Civilization. Print; University Readers Guglielmo Rinzivillo (2020), Raccontare la tecnoscienza. Storia di macchine, strumenti, idee per fare funzionare il mondo, Roma, Edizioni Nuova Cultura (; ISSN 2284-0567). External links International Journal of Feminist Technoscience (open access journal with open peer review) Science and technology studies Science studies
```html <div class="widgets"> <div class="row"> <div class="col-md-12"> <div ba-panel ba-panel-title="Form Wizard" ba-panel-class="with-scroll"> <ba-wizard> <ba-wizard-step title="Personal info" form="vm.personalInfoForm"> <form name="vm.personalInfoForm" novalidate> <div class="row"> <div class="col-md-6"> <div class="form-group has-feedback" ng-class="{'has-error': vm.personalInfoForm.username.$invalid && (vm.personalInfoForm.username.$dirty || vm.personalInfoForm.$submitted)}"> <label for="exampleUsername1">Username</label> <input type="text" class="form-control" id="exampleUsername1" name="username" placeholder="Username" ng-model="vm.personalInfo.username" required> <span class="help-block error-block basic-block">Required</span> </div> <div class="form-group" ng-class="{'has-error': vm.personalInfoForm.email.$invalid && (vm.personalInfoForm.email.$dirty || vm.personalInfoForm.$submitted)}"> <label for="exampleInputEmail1">Email address</label> <input type="email" class="form-control" id="exampleInputEmail1" name="email" placeholder="Email" ng-model="vm.personalInfo.email" required> <span class="help-block error-block basic-block">Proper email required</span> </div> </div> <div class="col-md-6"> <div class="form-group" ng-class="{'has-error': vm.personalInfoForm.password.$invalid && (vm.personalInfoForm.password.$dirty || vm.personalInfoForm.$submitted)}"> <label for="exampleInputPassword1">Password</label> <input type="password" class="form-control" id="exampleInputPassword1" name="password" placeholder="Password" ng-model="vm.personalInfo.password" required> <span class="help-block error-block basic-block">Required</span> </div> <div class="form-group" ng-class="{'has-error': !vm.arePersonalInfoPasswordsEqual() && (vm.personalInfoForm.confirmPassword.$dirty || vm.personalInfoForm.$submitted)}"> <label for="exampleInputConfirmPassword1">Confirm Password</label> <input type="password" class="form-control" id="exampleInputConfirmPassword1" name="confirmPassword" placeholder="Confirm Password" ng-model="vm.personalInfo.confirmPassword" required> <span class="help-block error-block basic-block">Passwords should match</span> </div> </div> </div> </form> </ba-wizard-step> <ba-wizard-step title="Product Info" form="vm.productInfoForm"> <form name="vm.productInfoForm" novalidate> <div class="row"> <div class="col-md-6"> <div class="form-group has-feedback" ng-class="{'has-error': vm.productInfoForm.productName.$invalid && (vm.productInfoForm.productName.$dirty || vm.productInfoForm.$submitted)}"> <label for="productName">Product name</label> <input type="text" class="form-control" id="productName" name="productName" placeholder="Product name" ng-model="vm.productInfo.productName" required> <span class="help-block error-block basic-block">Required</span> </div> <div class="form-group" ng-class="{'has-error': vm.productInfoForm.productId.$invalid && (vm.productInfoForm.productId.$dirty || vm.productInfoForm.$submitted)}"> <label for="productId">Product id</label> <input type="text" class="form-control" id="productId" name="productId" placeholder="productId" ng-model="vm.productInfo.productId" required> <span class="help-block error-block basic-block">Required</span> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="productName">Category</label> <select class="form-control" title="Category" selectpicker> <option selected>Electronics</option> <option>Toys</option> <option>Accessories</option> </select> </div> </div> </div> </form> </ba-wizard-step> <ba-wizard-step title="Shipment" form="vm.addressForm"> <form name="vm.addressForm" novalidate> <div class="row"> <div class="col-md-6"> <div class="form-group has-feedback" ng-class="{'has-error': vm.addressForm.address.$invalid && (vm.addressForm.address.$dirty || vm.addressForm.$submitted)}"> <label for="productName">Shipment address</label> <input type="text" class="form-control" id="address" name="address" placeholder="Shipment address" ng-model="vm.shipment.address" required> <span class="help-block error-block basic-block">Required</span> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="productName">Shipment method</label> <select class="form-control" title="Category" selectpicker> <option selected>Fast & expensive</option> <option>Cheap & free</option> </select> </div> </div> </div> <div class="checkbox"> <label class="custom-checkbox"> <input type="checkbox"> <span>Save shipment info</span> </label> </div> </form> </ba-wizard-step> <ba-wizard-step title="Finish"> <form class="form-horizontal" name="vm.finishForm" novalidate> Congratulations! You have successfully filled the form! </form> </ba-wizard-step> </ba-wizard> </div> </div> </div> </div> ```
Below is a list of events in chess in the year 1941. Chess events in brief Basic Chess Endings by Reuben Fine was published. 29 August 1941 – Gideon Ståhlberg played a 400-game simultaneous exhibition in Buenos Aires; 364 wins, 14 draws, 22 losses. 8–14 September 1941 – Europaturnier held in Munich, was organised by Ehrhardt Post, the Chief Executive of Nazi Grossdeutscher Schachbund. Max Euwe had declined the invitation for München 1941 due to his "occupational obligations", as manager of a groceries business. This time he refused to participate, because Alexander Alekhine was invited. Euwe mentioned futile reasons. The real motive was Alekhine's offence of Euwe in his anti-Semitic articles. Alekhine wrote six Nazi articles which first appeared in the Paris newspaper Pariser Zeitung in March 1941. He wrote a series of articles for the Deutsche Zeitung in den Niederlanden called "Jewish and Aryan Chess." The articles were reproduced in Deutsch Schachzeitung. Among others, Alekhine had written about the "Jewish clique" around Euwe in World Chess Championship 1935. The Munich 1941 chess tournament was won by Gösta Stoltz, who scored a spectacular victory (1½ points ahead of Alekhine and Erik Lundin), and won 1,000 Reichsmarks. His trophy (donated by the Ministerpräsident Ludwig Siebert) of Meissen porcelain is worth close to $1,000. Tournaments Sydney (the New South Wales championship), won by Lajos Steiner ahead of Gary Koshnitsky and Cecil Purdy, 1940/41. Beverwijk (the 4th Hoogovenschaaktoernoi) won by Arthur Wijnans, January 1941. Lviv won by Eduard Gerstenfeld ahead of Izaak Appel, Henryk Friedman, Emanuel Rubinstein and Izaak Schächter, January/February 1941. Groningen won by Salo Landau Baarn won by Max Euwe ahead of Hans Kmoch Amsterdam won by Euwe ahead of Nicolaas Cortlever Mar del Plata won by Gideon Ståhlberg followed by Miguel Najdorf, Erich Eliskases, etc., March 1941. Leningrad/Moscow (the Soviet Absolute Championship), won by Mikhail Botvinnik followed by Paul Keres, Vasily Smyslov, Isaac Boleslavsky, Andor Lilienthal, and Igor Bondarevsky, March 23 – April 29, 1941. Moscow (the Moscow City Chess Championship), won by Alexander Kotov Riga (the 1st Soviet Latvian Chess Championship), won by Alexander Koblencs ahead of Fricis Apšenieks Vilnius (the 1st Soviet Lithuanian Chess Championship), won by Isakas Vistaneckis. Tallinn (the Estonian Chess Championship), won by Johannes Türn and Feliks Kibbermann. Bucaramanga (the Colombian Chess Championship), won by Miguel Cuéllar Buenos Aires (Bodas de Plata), won by Ståhlberg and Najdorf, followed by Paulino Frydman, Paul Michel, Carlos Guimard, Hermann Pilnik, etc. Buenos Aires won by Frydman ahead of Moshe Czerniak Buenos Aires won by Najdorf followed by Czerniak, Pilnik, Michel, etc. Montevideo won by Erich Eliskases followed by Markas Luckis, Ludwig Engels, Héctor Rossetto, etc., May 1941. Hamburg won by Klaus Junge and Herbert Heinicke Bad Elster won by Junge ahead of Rudolf Palme and Erich Weinitschke, start 11 May 1941. Graz won by Heinicke and Poschauko, start 15 June 1941. São Pedro won by Eliskases and Guimard, followed by Engels, Frydman, Luckis, Mariano Castillo, Aristide Gromer, Julio Bolbochán, etc., 2–26 July 1941. Krefeld won by Efim Bogoljubow, 5–12 July 1941. Bad Oeynhausen (the 8th German Chess Championship), won by Paul Felix Schmidt and Junge, followed by Kurt Richter, Hans Müller, Georg Kieninger, etc., start 3 August 1941. Ventnor City won by Jacob Levin ahead of Fred Reinfeld St. Louis (the 42nd U.S. Open), won by Reuben Fine ahead of Herman Steiner, July 1941. Hamilton (New York State Chess Association Championship), won by Fine ahead of Arnold Denker, Isaac Kashdan and Samuel Reshevsky, 16–23 August 1941. New York City (Marshall Chess Club Championship), won by Fine followed by Frank Marshall, Sidney Bernstein, Reinfeld, Herbert Seidman, Edward Lasker, etc. Kalmar won by Rudolf Spielmann Madrid (the Spanish Chess Championship, Challenge), won by Ramón Rey Ardid Paris (the French Chess Championship), won by Robert Crépeaux Florence won by Vincenzo Castaldi and Stefano Rosselli del Turco Budapest (the Hungarian Chess Championship), won by Géza Füster ahead of Gedeon Barcza and Pál Réthy Prague (Kautsky Memorial), won by Karel Opočenský ahead of Miroslav Katětov and Karel Treybal Prague won by František Zíta Česká Třebová won by Emil Richter Brno won by Florian and Friedrich Sämisch Trenčianske Teplice won by Jan Foltys ahead of József Szily and Ludovit Potuček Holešov won by Foltys Mährisch-Ostrau won by Foltys Gothenburg (the Swedish Chess Championship), won by Erik Lundin ahead of Gösta Stoltz and Olof Kinnmark Munich (the 2nd Europaturnier), won by Stoltz ahead of Lundin and Alexander Alekhine, Bogoljubow, Bjørn Nielsen, Kurt Richter, Foltys, etc., 8–14 September 1941. Kraków/Warsaw (the 2nd GG-ch), won by Alekhine and Schmidt, 5–19 October 1941. Winnipeg (the 45th Canadian Chess Championship), won by Daniel Yanofsky, October 1941. Kraków (Championship of the city), won by Paul Mross, November 1941. Moscow (the Moscow City Chess Championship), won by Isaak Mazel ahead of Vladimirs Petrovs, 1941/42. Matches Max Euwe beat Efim Bogoljubow (6.5 : 3.5) in Karlsbad, Protectorate of Bohemia and Moravia. Paul Felix Schmidt beat Klaus Junge (3.5 : 0.5) in Bromberg, Germany. Johannes Türn beat Feliks Kibbermann (3.5 : 0.5) in Tallinn, Estonia. Jan Foltys drew with Karel Opočenský (6 : 6) in Prague. Samuel Reshevsky defeated Israel Albert Horowitz (9.5 : 6.5) in New York. Carlos Guimard beat Carlos Maderna (8 : 1) in La Plata, Argentina. Albéric O'Kelly de Galway drew with Victor Soultanbeieff (1 : 1) in Belgium. Team matches 7–8 December, Zagreb: Croatia vs. Slovakia 10-6 (4½-3½, 5½-2½) (Asztalos 01 Rohaček; Rabar 1½ Potuček; Tekavčić 11 Ujtelky; Šubarić 11 Pazman; Jerman 0½ Miština; M.Filipčić 00 Lauda; Petek 11 Štulir; B.Filipčić ½½ Stanek) Births 14 January – Oscar Quiñones in Lima, Peruvian chess player 25 April – Raymond Weinstein in Brooklyn, American chess player 3 May – Nona Gaprindashvili in Zugdidi, Georgia, Women's World Champion (1962–1978), first female GM 16 June – Tõnu Õim in Tallinn, Estonian correspondence GM 2 August – Jacob Murey in Moscow, Israeli GM 11 August – Alla Kushnir in Moscow, Israeli WGM, several-time challenger for the Women's Championship 3 October – Victor Palciauskas in Kaunas, American correspondence GM, World Correspondence Champion 1978–1984 10 September – Rosendo Balinas Jr., Filipino GM 13 December – Bessel Kok, Dutch chess organizer 30 December – Bruno Parma in Ljubljana, Slovene/Yugoslav GM Deaths Jakub Kolski died of starvation in the Warsaw Ghetto. Izaak Towbin died in the Warsaw Ghetto. Leon Kremer died in the General Government. Josef Cukierman committed suicide in France. Konstantin Vygodchikov died in Belarus. František Treybal died in the Protectorate of Bohemia and Moravia 11 January – Emanuel Lasker died in Manhattan, New York. World Chess Champion in the period 1894–1921. 25 April – Fricis Apšenieks died of tuberculosis in Riga. Latvian champion 1926/27 and 1934. 2 May – Ignatz von Popiel died in Lviv. after 22 June – Izaak Appel disappeared and probably died in a Nazi concentration camp, the District Galicia of General Government. 12 July – Charles Jaffe died in Brooklyn, New York. Former New York State champion and chess editor. 13 July – Ilmar Raud died of starvation in Buenos Aires, Argentina (in exile). Estonian champion in 1934 and 1939. August – Aron Zabłudowski killed by Nazis in Białystok, Poland. 3 September – Alexander Ilyin-Genevsky died, according to the Soviet official sources, on Lake Ladoga on a ship in a German air raid (he was the only one killed on the barge, which was displaying Red Cross flags) during the Siege of Leningrad, but is believed by some to have fallen victim to the Stalinist repression as the majority of the Old Guard of revolutionists. Three-time Leningrad City champion in 1925 (jointly), 1926 and 1929. 27 September – Juan Corzo died in Havana. Cuban champion in 1898, 1902, 1907, 1912, and 1918. 2 October – Karel Treybal arrested on 30 May, imprisoned and later charged with concealing weapons for use by resistance forces and the illegal possession of a pistol. He was condemned to death and executed by the Nazis in Prague, the Protectorate of Bohemia and Moravia. 3 October – Frederick Hamilton-Russell died in Cleobury North, England. President of British Chess Federation. 16 October – Antanas Gustaitis was caught attempting to cross the border on 4 March, arrested by NKVD, and taken to Moscow where he was shot. Lithuanian champion in 1922. 29 December – Boris Koyalovich died during the siege of Leningrad. 29 December – Vsevolod Rauzer died during the siege of Leningrad. Ukrainian champion in 1927 and 1933 (jointly). References External links 1941 crosstables 20th century in chess Chess by year
International Hip Swing is a compilation CD released by the label K Records in 1993. It is centered on the alternative rock, indie pop and twee pop genres. International Hip Swing gathered together a selection of recordings previously released in the series of vinyl 7-inch EPs entitled International Pop Underground. Track listing The album contains the following twenty songs: Shadowy Men on a Shadowy Planet – "Rusty and Rover" Melody Dog – "Tomorrow's World" Some Velvet Sidewalk – "Apple" Thee Headcoats – "Shouldn't Happen To A Dog" Lois – "Long Time Gone" (The Everly Brothers cover) Gravel – "Yesterday" Brief Weeds – "(It's So Hard Not To) Say Hello" Tiger Trap – "Hiding" Snuff – "Den Den" Mecca Normal – "Man Thinks 'Woman'" Girl Trouble – "Tarantula" Heavenly – "Escort Crash On Marsten Street" Unrest – "Yes She Is My Skinhead Girl" Duck Hunt – "Vacation" Teenage Fanclub – "Free Again" (Alex Chilton cover) Cannanes – "No One" Seaweed – "Deer Trap" Beat Happening – "Look Around" Fifth Column – "All Women Are Bitches" The McTells – "Clean" See also International Pop Underground Convention References External links International Hip Swing Review International Hip Swing page at K Records 1994 compilation albums Alternative rock compilation albums Indie rock compilation albums K Records compilation albums
Lopatnik () is a small settlement in the hills east of Velenje in northern Slovenia. The area is part of the traditional region of Styria. The entire Municipality of Velenje is now included in the Savinja Statistical Region. References External links Lopatnik on Geopedia Populated places in the City Municipality of Velenje
Paul Lavanga (3 October 1910 – 5 January 1996) was a French modern pentathlete. He competed at the 1936 Summer Olympics. References External links 1910 births 1996 deaths French male modern pentathletes Olympic modern pentathletes for France Modern pentathletes at the 1936 Summer Olympics Sportspeople from Pyrénées-Orientales 20th-century French people
The Afghanistan Oil Pipeline was a project proposed by several oil companies to transport oil from the Caspian region and Central Asia through Afghanistan to Pakistan. History In the 1990s, the American Unocal Corporation, in addition to the Trans-Afghanistan Gas Pipeline, considered building a oil pipeline to link Türkmenabat in Turkmenistan to the Pakistan's Arabian Sea coast. Through the Omsk (Russia) – Pavlodar (Kasakhstan) – Shymkent – Türkmenabat pipeline, it would provide a possible alternative export route for regional oil production from the Caspian Sea. The pipeline was expected to cost US$2.5 billion. However, due to political and security instability at that time, the project was dismissed. Disputed theory Some have proposed that the actual motive for the United States-led Western invasion of Afghanistan in 2001 was Afghanistan's importance as a conduit for oil pipelines to Afghanistan's neighbouring countries, by effectively bypassing Russian and Iranian territories, and breaking the Russian and Iranian collective monopoly on regional energy supplies. Others have argued that the theoretical pipeline was not a significant reason for the invasion because most Western governments and their respective oil companies preferred an export route that went through the Caspian Sea to Azerbaijan then to Georgia and on to the Black Sea instead of one that goes through Afghanistan. See also Ashgabat agreement North-South Transport Corridor References Oil pipelines in Turkmenistan Oil pipelines in Afghanistan Oil pipelines in Pakistan Afghanistan–Pakistan relations Afghanistan–Turkmenistan relations Pakistan–Turkmenistan relations
Invaders from Space is a 1964 film edited together for American television from films #3 and #4 of the 1957 Japanese short film series Super Giant. Plot The story involves the superhero Starman who is sent by the Emerald Planet to protect Earth from the Salamander Men of the planet Kulimon in the Moffit galaxy who plan to destroy Earth. American adaptation The 9 Super Giant films were purchased for distribution to U.S. television and edited into 4 films by Walter Manley Enterprises and Medallion Films. The 2 original Japanese films which went into Invaders from Space (The Mysterious Spacemen's Demonic Castle and Earth on the Verge of Destruction) were 48 minutes and 39 minutes in duration. The two films were edited into one 78-minute film, resulting in a total of 9 minutes being cut from the two films during the re-editing. Also, most of the original music was replaced by library cues. DVD release Invaders from Space is currently available on DVD. Something Weird Video with Image Entertainment released the film and another Starman film, Atomic Rulers of the World on a single disc on December 10, 2002. See also Super Giant Atomic Rulers of the World Attack from Space Evil Brain from Outer Space References Ragone, August. THE ORIGINAL "STARMAN": The Forgotten Supergiant of Steel Who Fought for Peace, Justice and the Japanese Way Originally published in Planet X Magazine, included in Something Weird Video's DVD release. External links 1965 films Super Giant films 1960s science fiction films 1960s Japanese films
Menmaatre Seti I (or Sethos I in Greek) was the second pharaoh of the Nineteenth Dynasty of Egypt during the New Kingdom period, ruling or 1290 BC to 1279 BC. He was the son of Ramesses I and Sitre, and the father of Ramesses II. The name 'Seti' means "of Set", which indicates that he was consecrated to the god Set (also termed "Sutekh" or "Seth"). As with most pharaohs, Seti had several names. Upon his ascension, he took the prenomen "mn-m3't-r' ", usually vocalized in Egyptian as Menmaatre (Established is the Justice of Re). His better known nomen, or birth name, is transliterated as "sty mry-n-ptḥ" or Sety Merenptah, meaning "Man of Set, beloved of Ptah". Manetho incorrectly considered him to be the founder of the 19th Dynasty, and gave him a reign length of 55 years, though no evidence has ever been found for so long a reign. Reign After the enormous social upheavals generated by Akhenaten's religious reform, Horemheb, Ramesses I and Seti I's main priority was to re-establish order in the kingdom and to reaffirm Egypt's sovereignty over Canaan and Syria, which had been compromised by the increasing external pressures from the Hittite state. Seti, with energy and determination, confronted the Hittites several times in battle. Without succeeding in destroying the Hittites as a potential danger to Egypt, he reconquered most of the disputed territories for Egypt and generally concluded his military campaigns with victories. The memory of Seti I's military successes was recorded in some large scenes placed on the front of the temple of Amun, situated in Karnak. A funerary temple for Seti was constructed in what is now known as Qurna (Mortuary Temple of Seti I), on the west bank of the Nile at Thebes while a magnificent temple made of white limestone at Abydos featuring exquisite relief scenes was started by Seti, and later completed by his son. His capital was at Memphis. He was considered a great king by his peers, but his fame has been overshadowed since ancient times by that of his son, Ramesses II. Duration of reign Seti I's reign length was either 11 or 15 full years. Egyptologist Kenneth Kitchen has estimated that it was 15 years, but there are no dates recorded for Seti I after his Year 11 Gebel Barkal stela. As he is otherwise quite well documented in historical records, other scholars suggest that a continuous break in the record for his last four years is unlikely, although it is technically possible simply that no records have been yet discovered. Peter J. Brand noted that the king personally opened new rock quarries at Aswan to build obelisks and colossal statues in his Year 9. This event is commemorated on two rock stelas in Aswan. However, most of Seti's obelisks and statues such as the Flaminian and Luxor obelisks were only partly finished or decorated by the time of his death, since they were completed early under his son's reign based on epigraphic evidence (they bore the early form of Ramesses II's royal prenomen "Usermaatre"). Ramesses II used the prenomen Usermaatre to refer to himself in his first year and did not adopt the final form of his royal title "Usermaatre Setepenre" until late into his second year. Brand aptly notes that this evidence calls into question the idea of a 15 Year reign for Seti I and suggests that "Seti died after a ten to eleven year reign" because only two years would have passed between the opening of the Rock Quarries and the partial completion and decoration of these monuments. This explanation conforms better with the evidence of the unfinished state of Seti I's monuments and the fact that Ramesses II had to complete the decorations on "many of his father's unfinished monuments, including the southern half of the Great Hypostyle Hall at Karnak and portions of his father's temples at Gurnah and Abydos" during the very first Year of his own reign. Critically, Brand notes that the larger of the two Aswan rock stelas states that Seti I "has ordered the commissioning of multitudinous works for the making of very great obelisks and great and wondrous statues (i.e. colossi) in the name of His Majesty, L.P.H. He made great barges for transporting them, and ships crews to match them for ferrying them from the quarry." (KRI 74:12-14) However, despite this promise, Brand stresses that The German Egyptologist Jürgen von Beckerath also accepts that Seti I's reign lasted only 11 Years. Seti's highest known date is Year 11, IV Shemu day 12 or 13 on a sandstone stela from Gebel Barkal but he would have briefly survived for 2 to 3 days into his Year 12 before dying based on the date of Ramesses II's rise to power. Seti I's accession date has been determined by Wolfgang Helck to be III Shemu day 24, which is very close to Ramesses II's known accession date of III Shemu day 27. In 2011, Jacobus van Dijk questioned the "Year 11" stated on the Gebel Barkal stela. This monument is quite badly preserved but still depicts Seti I in erect posture, which is the only case occurring since his Year 4 when he started to be depicted in a stooping posture on his stelae. Furthermore, the glyphs "I ∩" representing the 11 are damaged in the upper part and may just as well be "I I I" instead. Subsequently, Van Dijk proposed that the Gebel Barkal stela is dated to Year 3 of Seti I, and that Seti's highest date more likely is Year 9 as suggested by the wine jars found in his tomb. In a 2012 paper, David Aston analyzed the wine jars and came to the same conclusion since no wine labels higher than his 8th regnal year were found in his tomb. Military campaigns Seti I fought a series of wars in western Asia, Libya and Nubia in the first decade of his reign. The main source for Seti's military activities are his battle scenes on the north exterior wall of the Karnak Hypostyle Hall, along with several royal stelas with inscriptions mentioning battles in Canaan and Nubia. In his first regnal year, he led his armies along the "Horus Military road", the coastal road that led from the Egyptian city of Tjaru (Zarw/Sile) in the northeast corner of the Egyptian Nile Delta along the northern coast of the Sinai peninsula ending in the town of "Canaan" in the modern Gaza strip. The Ways of Horus consisted of a series of military forts, each with a well, that are depicted in detail in the king's war scenes on the north wall of the Karnak Hypostyle Hall. While crossing the Sinai, the king's army fought local Bedouins called the Shasu. In Canaan, he received the tribute of some of the city states he visited. Others, including Beth-Shan and Yenoam, had to be captured but were easily defeated. A stele in Beth-Shan testifies to that reconquest; according to Grdsseloff, Rowe, Albrecht et Albright, Seti defeated Asian nomads in war against the Apirus (Hebrews). Dussaud commented Albright's article: "The interest of Professor Albright's note is mainly due to the fact that he no longer objects to the identification of "Apiru" with "Ibri" (i.e. the Hebrews) provided that we grant him that the vocal change has been driven by a popular etymology that brought the term "eber" (formerly 'ibr), that is to say the man from beyond the river." It seems that Egypt extends beyond the river. The attack on Yenoam is illustrated in his war scenes, while other battles, such as the defeat of Beth-Shan, were not shown because the king himself did not participate, sending a division of his army instead. The year one campaign continued into Lebanon where the king received the submission of its chiefs who were compelled to cut down valuable cedar wood themselves as tribute. At some unknown point in his reign, Seti I defeated Libyan tribesmen who had invaded Egypt's western border. Although defeated, the Libyans would pose an ever-increasing threat to Egypt during the reigns of Merenptah and Ramesses III. The Egyptian army also put down a minor "rebellion" in Nubia in the 8th year of Seti I. Seti himself did not participate in it although his crown prince, the future Ramesses II, may have. Capture of Kadesh The greatest achievement of Seti I's foreign policy was the capture of the Syrian town of Kadesh and neighboring territory of Amurru from the Hittite Empire. Egypt had not held Kadesh since the time of Akhenaten. Seti I was successful in defeating a Hittite army that tried to defend the town. He entered the city in triumph together with his son Ramesses II and erected a victory stela at the site which has been found by archaeologists. Kadesh, however, soon reverted to Hittite control because the Egyptians did not or could not maintain a permanent military occupation of Kadesh and Amurru so close to the Hittite homelands. It is unlikely that Seti I made a peace treaty with the Hittites or voluntarily returned Kadesh and Amurru, but he may have reached an informal understanding with the Hittite king Muwatalli on the precise boundaries of their empires. Five years after Seti I's death, however, his son Ramesses II resumed hostilities and made a failed attempt to recapture Kadesh. Kadesh was henceforth effectively held by the Hittites even though Ramesses temporarily occupied the city in his 8th year. The traditional view of Seti I's wars was that he restored the Egyptian empire after it had been lost in the time of Akhenaten. This was based on the chaotic picture of Egyptian-controlled Syria and Palestine seen in the Amarna letters, a cache of diplomatic correspondence from the time of Akhenaten found at Akhenaten's capital at el-Amarna in Middle Egypt. Recent scholarship, however, indicates that the empire was not lost at this time, except for its northern border provinces of Kadesh and Amurru in Syria and Lebanon. While evidence for the military activities of Akhenaten, Tutankhamun and Horemheb is fragmentary or ambiguous, Seti I has left us an impressive war monument that glorifies his achievements, along with a number of texts, all of which tend to magnify his prowess on the battlefield. Burial Seti's well preserved tomb (KV17) was found in 1817 by Giovanni Battista Belzoni, in the Valley of the Kings; it proved to be the longest at and deepest of all the New Kingdom royal tombs. It was also the first tomb to feature decorations (including the Book of the Heavenly Cow) on every passageway and chamber with highly refined bas-reliefs and colorful paintings – fragments of which, including a large column depicting Seti I with the goddess Hathor, can be seen in the National Archaeological Museum, Florence. This decorative style set a precedent which was followed in full or in part in the tombs of later New Kingdom kings. Seti's mummy itself was discovered by Émil Brugsch on June 6, 1881, in the mummy cache (tomb DB320) at Deir el-Bahri, and has since been kept at the Egyptian Museum in Cairo. His huge sarcophagus, carved in one piece and intricately decorated on every surface (including the goddess Nut on the interior base), is in Sir John Soane's Museum. Soane bought it for exhibition in his open collection in 1824, when the British Museum refused to pay the £2,000 demanded. On its arrival at the museum, the alabaster was pure white and inlaid with blue copper sulphate. Years of the London climate and pollution have darkened the alabaster to a buff colour and absorbed moisture has caused the hygroscopic inlay material to fall out and disappear completely. A small watercolour nearby records the appearance, as it was. The tomb also had an entrance to a secret tunnel hidden behind the sarcophagus, which Belzoni's team estimated to be long. However, the tunnel was not truly excavated until 1961, when a team led by Sheikh Ali Abdel-Rasoul began digging in hopes of discovering a secret burial chamber containing hidden treasures. The team failed to follow the original passage in their excavations, and had to call a halt due to instabilities in the tunnel; further issues with permits and finances eventually ended Sheikh Ali's dreams of treasure, though they were at least able to establish that the passage was over longer than the original estimate. In June 2010, a team from Egypt's Ministry of Antiquities led by Dr. Zahi Hawass completed excavation of the tunnel, which had begun again after the discovery in 2007 of a downward-sloping passage beginning approximately into the previously excavated tunnel. After uncovering two separate staircases, they found that the tunnel ran for in total; unfortunately, the last step seemed to have been abandoned prior to completion and no secret burial chamber was found. Mummy From an examination of Seti's extremely well-preserved mummy, Seti I appears to have been less than forty years old when he died unexpectedly. This is in stark contrast to the situation with Horemheb, Ramesses I and Ramesses II who all lived to an advanced age. The reasons for his relatively early death are uncertain, but there is no evidence of violence on his mummy. His mummy was found decapitated, but this was likely caused after his death by tomb robbers. The Amun priest carefully reattached his head to his body with the use of linen cloths. It has been suggested that he died from a disease which had affected him for years, possibly related to his heart. The latter was found placed in the right part of the body, while the usual practice of the day was to place it in the left part during the mummification process. Opinions vary whether this was a mistake or an attempt to have Seti's heart work better in his afterlife. Seti I's mummy is about tall. In 1980, James Harris and Edward F. Wente conducted a series of X-ray examinations on New Kingdom Pharaohs crania and skeletal remains, which included the mummified remains of Seti I. The authors noted royal mummies like Seti I showed features characteristic of North Mediterranean populations, or the Western World. In April 2021 his mummy was moved from the Museum of Egyptian Antiquities to the National Museum of Egyptian Civilization along with those of 17 other kings and 4 queens in an event termed the Pharaohs' Golden Parade. Alleged co-regency with Ramesses II Around Year 9 of his reign, Seti appointed his son Ramesses II as the crown prince and his chosen successor, but the evidence for a coregency between the two kings is likely illusory. Peter J. Brand stresses in his thesis that relief decorations at various temple sites at Karnak, Qurna and Abydos, which associate Ramesses II with Seti I, were actually carved after Seti's death by Ramesses II himself and, hence, cannot be used as source material to support a co-regency between the two monarchs. In addition, the late William Murnane, who first endorsed the theory of a co-regency between Seti I and Ramesses II, later revised his view of the proposed co-regency and rejected the idea that Ramesses II had begun to count his own regnal years while Seti I was still alive. Finally, Kenneth Kitchen rejects the term co-regency to describe the relationship between Seti I and Ramesses II; he describes the earliest phase of Ramesses II's career as a "prince regency" where the young Ramesses enjoyed all the trappings of royalty including the use of a royal titulary and harem but did not count his regnal years until after his father's death. This is due to the fact that the evidence for a co-regency between the two kings is vague and highly ambiguous. Two important inscriptions from the first decade of Ramesses' reign, namely the Abydos Dedicatory Inscription and the Kuban Stela of Ramesses II, consistently give the latter titles associated with those of a crown prince only, namely the "king's eldest son and hereditary prince" or "child-heir" to the throne "along with some military titles." Hence, no clear evidence supports the hypothesis that Ramesses II was a co-regent under his father. Brand stresses that: See also Dorothy Eady List of colossal sculpture in situ Nineteenth Dynasty of Egypt family tree References Bibliography Brand, Peter J. The Monuments of Seti I: Epigraphic, Historical, and Art-Historical Analysis. E. J. Brill, Leiden 2000, . Epigraphic Survey, The Battle Reliefs of King Sety I. Reliefs and Inscriptions at Karnak vol. 4. (Chicago, 1985). Caverley, Amice "The Temple of King Sethos I at Abydos", (London, Chicago, 1933–58), 4 volumes. Gaballa, Gaballa A. Narrative in Egyptian Art. (Mainz, 1976) Hasel, Michael G., Domination & Resistance: Egyptian Military Activity in the Southern Levant, 1300-1185 BC, (Leiden, 1998). Kitchen, Kenneth, Pharaoh Triumphant: The Life and Times of Ramesses II (Warminster, 1982). Liverani, Mario Three Amarna Essays, Monographs on the Ancient Near East 1/5 (Malibu, 1979). Murnane, William J. (1990) The Road to Kadesh, Chicago. Schulman, Alan R. "Hittites, Helmets & Amarna: Akhenaten's First Hittite War," Akhenaten Temple Project volume II, (Toronto, 1988), 53–79. Spalinger, Anthony J. "The Northern Wars of Seti I: An Integrative Study." Journal of the American Research Center in Egypt 16 (1979). 29–46. Spalinger, Anthony J. "Egyptian-Hittite Relations at the Close of the Amarna Age and Some Notes on Hittite Military Strategy in North Syria," Bulletin of the Egyptological Seminar 1 (1979):55-89. External links Seti I - Archaeowiki.org The Karnak Hypostyle Hall Project website The Monuments of Seti I and their Historical Significance: Epigraphic, Art and Historical Analysis (PDF) 1998 by Peter Brand The complete titulary of Seti I 360° full-screen photospheric visit of Seti I tomb 13th-century BC Pharaohs Pharaohs of the Nineteenth Dynasty of Egypt Ancient Egyptian mummies Year of birth unknown 1279 BC deaths Ramesses I
Steffensen's inequality is an equation in mathematics named after Johan Frederik Steffensen. It is an integral inequality in real analysis, stating: If ƒ : [a, b] → R is a non-negative, monotonically decreasing, integrable function and g : [a, b] → [0, 1] is another integrable function, then where References External links inequalities real analysis
Ted Esposito (23 May 1908 - 1 May 1985) was a former Australian rules footballer who played with Melbourne in the Victorian Football League (VFL). Notes External links 1908 births 1985 deaths Australian rules footballers from Victoria (state) Melbourne Football Club players Eaglehawk Football Club players
The Front Ranges are a group of mountain ranges in the Canadian Rockies of eastern British Columbia and western Alberta, Canada. It is lowest and the easternmost of the three main subranges of the Continental Ranges, located east of the Bull and Elk rivers and a fault line extending northwest of West Elk Pass to McGregor Pass. Subranges Bare Range Bighorn Range Bosche Range De Smet Range Elk Range Fairholme Range First Range Fisher Range Goat Range Greenhills Range High Rock Range Highwood Range Jacques Range Kananaskis Range Lizard Range Maligne Range Miette Range Murchison Group Nikanassin Range Opal Range Palliser Range Queen Elizabeth Ranges Ram Range Sawback Range Slate Range Taylor Range Vermilion Range Victoria Cross Ranges Whitegoat Peaks Wisukitsak Range References Ranges of the Canadian Rockies
The 2001–02 Turkish Basketball League was the 36th season of the top-tier professional basketball league in Turkey. The season started on October 13, 2011. Efes Pilsen won their ninth national championship this season. Regular season League table Beko Basketball League 2001–02 play-offs as of June 30, 2002 The 2002 Beko Basketball League play-offs is the final phase of the 2001–2002 regular season. First round, Quarterfinal and Semifinal series are 5-match series. The teams reaches the first 3 wins is through to the next round. The team which has won both regular season matchups starts with a 1–0 lead to the series. If teams split up the regular season meetings, series starts with a 1–1 draw. Final series are 7-match series and the team reaches first 4 wins is the champion of the Beko Basketball League. External links Turkish Basketball League Official Website Turkish Basketball Federation Official Website TBLStat.net Turkish Basketball Super League seasons Turkish 1
Gangnam District (; ) is one of the 25 districts of Seoul, South Korea. The term Gangnam translates to "South of the [Han] River". Gangnam District is the third largest district in Seoul, with an area of . As of the 2017 census, Gangnam District had a population of 561,052. There is a high concentration of wealth in the district, with prices for an apartment as of 2020 nearly double those in the rest of Seoul. Gangnam District is part of Gangnam School District Eight, along with the Seocho District. This district shares half of Gangnam-daero Gangnam Station area with Seocho District, which is one of the most crowded places in South Korea. Administration Gangnam is one of two gu that make up the Greater Gangnam Area with neighboring Seocho District. The Gangnam District office has designated two smoke-free zones within the district. The first is the section of Gangnam Boulevard between exit No. 2 of Gangnam station of Seoul Subway Line 2 and exit No. 5 of Sinnonhyeon station of Line 9; the second is the 836-meter (914-yard) section of sidewalk along Yeongdong Boulevard from exit No. 5 of Samseong station on Line 2, outside COEX Convention & Exhibition Center and ASEM Tower of the COEX complex. Divisions Gangnam District is composed of 26 dong (neighborhoods): Apgujeong Cheongdam 1 Cheongdam 2 Daechi 1 Daechi 2 Daechi 3 Daechi 4 Dogok 1 Dogok 2 Gaepo 1 Gaepo 2 Gaepo 3 Irwon 1 Irwon 2 Irwon bon Nonhyeon 1 Nonhyeon 2 Samseong 1 Samseong 2 Segok Sinsa Suseo Yeoksam 1 Yeoksam 2 Economy Both the Greater Gangnam Area and Gangnam itself are widely known for its heavily concentrated wealth and very high standard of living, which has been compared to cities such as Beverly Hills, California. The most significant indicator is its extremely expensive real estate. Seoul as a whole is known for its expensive housing prices—as of 2011, its average apartment cost approximately US$5,500 per m2—but the average price in Gangnam is almost twice as high, roughly US$10,000 per m2, which is 3.5 times the nationwide average. This is driven in part by the price of land: the 40 km2 making up Gangnam district rivals in valuation with the entirety of the city of Busan, the second-largest city in South Korea which occupies 770 km2. Combined with the neighboring districts of Seocho and Songpa, the Greater Gangnam Area accounts for almost 10% of the land value of the entire country. While Seoul's traditional business centers such as Central District, Jongno District, Yongsan District and Yeongdeungpo District still maintain their leading roles, Gangnam and its neighboring districts have swiftly become the new core across all areas of business over the last few decades. KOSPI 200 companies based in Gangnam district include KEPCO, GS Group, Hyundai Department Store Group, HITEJinro, Hansol, Hankook Tire, GLOVIS and Korea Zinc Corporation. Besides, POSCO also operates POSCO Center in Teheran Valley, and KT&G operates Kosmo Tower. Other notable companies based in Gangnam include Dongbu Fire Insurance, Young Poong Group, T'way Airlines and Hankook P&G. Gangnam is also home to many IT and other internet-related companies including NC Soft and Pandora TV, and is also a strong hub of the country's financial and banking sectors. Many international companies also operate key offices in Gangnam, including Google, IBM, Toyota, and AMI. Since January 2012, the area has also been home to FNC Entertainment, which moved into its own company offices in Cheongdam-dong, separate from its parent company in the CJ E&M Music Performance Division Building in neighbouring Apgujeong-dong. Other entertainment companies located there include SM Entertainment, JYP Entertainment (until 2018), Cube Entertainment, Pledis Entertainment, LOEN Entertainment, Source Music, Plan A Entertainment, DSP Media, MBK Entertainment, Nega Network, C-JeS Entertainment, WM Entertainment, NH Media, J. Tune Entertainment, TOP Media, Happy Face Entertainment, Dream Tea Entertainment, Polaris Entertainment, Jellyfish Entertainment, DR Music, Stardom Entertainment, and HYBE Corporation. The Korean subsidiary of American Megatrends, AMI Korea, is headquartered in Daechidong, Gangnam District. Economic development Until the early 1980s Gangnam and its neighboring areas had remained the least developed in Seoul, but prodigious development over the last 30 years has earned it a reputation of being one of the most affluent, dynamic, and influential areas in both Seoul and South Korea as a whole. In addition, the COEX Convention & Exhibition Center in Gangnam recently hosted several international conferences such as the 2010 G-20 summit and the 2012 Nuclear Security Summit. Education South Korea is known for its high standard of education and intense competition for university entrance, and Gangnam is considered the national capital of education, which is one of the decisive factors to make Gangnam the most attractive destination in South Korea. In 2010, roughly 6% of the successful candidates to Seoul National University, which is considered the best university in South Korea, were from Gangnam district, while Gangnam's population makes up only 1% of the country's population. In 2008, 22.7 out of 1,000 students in Gangnam district went abroad to study, while the nation's average ratio in the same time frame was only 3.6 per 1,000 students. Following the substantial raising of the profile of the Gangnam district internationally, the area has become a popular destination for international students seeking Korean language lessons, marking the rise of Korea as a 'study tourism' destination. Both long-standing locally owned schools such as the Seoul Korean Academy, and more recent foreign-owned entities such as Lexis Korea report a significant increase in interest in the location. International schools: (한국외국인학교) (서울아카데미국제학교) Former schools Japanese School in Seoul Attractions The important business district around Teheranno (Tehran Street) runs east–west from Gangnam station to Samseong station and the COEX Convention & Exhibition Center-Korean World Trade Center complex. Several popular shopping and entertainment areas are located in Gangnam District, including Apgujeong, the COEX Mall and the area around Gangnam station and Garosugil. Cheongdam-dong is notable as an upmarket shopping area, with stores of global and local luxury brands, such as MCM Haus flagship store; Vera Wang's third global and first Asian flagship store 'Vera Wang Bridal Korea'; as well as French jeweler Cartier's Cartier Maison, located on Apgujeong-ro, which is the largest in Korea and at the time of opening, in 2008, the seventh largest in the world. The area has a large concentration of vegetarian and other upscale restaurants that serve Korean cuisine with a modern twist, namely on the main street from Bongeun Temple to Park Hyatt Hotel in Samseong-dong. Galleria Department Store Seolleung and Jeongneung tombs Trade Tower Apgujeong Rodeo street Sinsa Garosugil COEX Mall COEX Aquarium Kukkiwon (World Taekwondo Headquarters) Korea City Air Terminal Simone Handbag Museum Bongeun Temple, close to COEX Mall Dosan Park Metasequoia Road Nonhyun Furniture Road Yangjae Stream Transportation Gangnam District is served by Seoul Subway Line 2, Seoul Subway Line 3, Seoul Subway Line 7, Seoul Subway Line 9, Bundang Line and the Shinbundang Line. Korail Bundang Line (Seongdong-gu) ← Apgujeongrodeo – Gangnam-gu Office – Seonjeongreung – Seolleung – Hanti – Dogok – Guryong – Gaepo-dong – Daemosan – Suseo → (Songpa-gu) Seoul Metro Seoul Subway Line 2 Euljiro Circle Line (Songpa-gu) ← Samseong – Seolleung – Yeoksam – Gangnam → (Seocho-gu) Seoul Subway Line 3 (Seongdong-gu) ← Apgujeong – Sinsa → (Seocho-gu) ← Maebong – Dogok – Daechi – Hangnyeoul – Daecheong – Irwon – Suseo – (Songpa-gu) Shinbundang Line (Seocho-gu) ← Gangnam Seoul Subway Line 7 (Gwangjin-gu) ← Cheongdam – Gangnam-gu Office – Hak-dong – Nonhyeon → (Seocho-gu) Metro 9 corporation Seoul Subway Line 9 (Seocho-gu) ← Sinnonhyeon ← Eonju ← Seonjeongneung ← Samseong Jungang ← Bongeunsa Festivals There are several festivals held in Gangnam District. International Peace Marathon Festival in October Gangnam Fashion Festival in October Sports Festival for residents in Gangnam Distinct in May Daemosan Festival Following the anti-American protests in Seoul in the early 2000s, the local authorities in the Gangnam District have organized various cultural and sporting events, such as the International Peace Marathon, jointly with the United States Forces Korea. In 2009 they were awarded a 'special prize' by the US Army for promoting cultural exchanges with American troops. Popular culture The Caffè Pascucci coffee chain in Apgujeong-dong was used as one of the main filming locations for Seoul Broadcasting System's 2001 drama Beautiful Days, starring Lee Byung-hun, Choi Ji-woo, Ryu Si-won, Shin Min-a, Lee Jung-hyun and Lee Yoo-jin. Several subway stations in Gangnam and nearby areas were used as filming locations for the 2012 Hollywood film The Bourne Legacy, the fourth installment in the Bourne film series. The 2012 K-pop song "Gangnam Style" by South Korean entertainer Psy was inspired by the lifestyle of the Gangnam region and its music video was shot in the aforementioned location. The song and video's popularity increased international awareness of the district. In the music video, Psy can be seen dancing on top of the ASEM Tower with the Trade Tower in the background. The two buildings are part of World Trade Center Seoul (WTC Seoul), also known as COEX. In December 2012, Cheongdam-dong was the setting for the SBS weekend drama series, Cheongdam-dong Alice. It stars Moon Geun-young, Park Si-hoo, So Yi-hyun and Kim Ji-seok and is based on the novel, Cheongdamdong Audrey. In May 2013, the Cheongdam-dong branch of 10 Corso Como was used as a filming location for the music video of Psy's single "Gentleman". The webtoon My ID is Gangnam Beauty (내 ID는 강남미인!) by Gi Maeng-gi, which is about a girl who underwent plastic surgery due to being bullied because of her appearance, was released on Naver Webtoon in 2016. Its title referred to the namesake district being called the "Mecca of plastic surgery", with the term "Gangnam beauty" being used as a pejorative term to those who undergo the process. In 2018, generalist pay TV channel JTBC aired a television drama adaptation of the webtoon which was produced by ACC Korea. Twin towns – sister cities Gangnam District is twinned with: Chaoyang (Beijing), China Gwinnett County, United States Licheng (Jinan), China Riverside, United States Woluwe-Saint-Pierre, Belgium Zhongshan (Dalian), China Buyeo, South Korea Boseong, South Korea Cheongdo, South Korea Cheorwon, South Korea Ganghwa, South Korea Gapyeong, South Korea Goesan, South Korea Gunsan, South Korea Paju, South Korea Sangju, South Korea Sinan, South Korea Tongyeong, South Korea Yangpyeong, South Korea Yeongju, South Korea Yeongdo (Busan), South Korea Yeongdong, South Korea See also List of districts of Seoul Administrative divisions of Gangnam District Fashion in South Korea References External links Gangnam-gu website https://www.gangnam.go.kr/global/main.do?lang=en Gangnam-gu website] Gangnam-gu > Tourism / Culture > Maps (Gangnam-gu maps) Map, status quo and origin of dong names of Gangnam-gu "Tour The Ritzy Seoul District That Inspired Viral Hit 'Gangnam Style'", photoessay at BusinessInsider.com, 20 September 2012 Gangnam Street Videoclip Districts of Seoul