text
stringlengths
1
22.8M
```less /* your_sha256_hash-------------- * * # Glyphicons for Bootstrap * * Glyphicons icon font path and style overrides * * Version: 1.0 * Latest update: May 25, 2015 * * your_sha256_hash------------ */ // Change paths @font-face { font-family: 'Glyphicons Halflings'; src: url('@{icon-font-path}@{icon-font-name}.eot'); src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'), url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'), url('@{icon-font-path}@{icon-font-name}.woff') format('woff'), url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'), url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg'); } // Set fixed icon size .glyphicon { font-size: @icon-font-size; vertical-align: middle; top: -1px; } ```
```go // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package sysconf import ( "sync" "golang.org/x/sys/unix" ) const ( _HOST_NAME_MAX = _MAXHOSTNAMELEN _LOGIN_NAME_MAX = _MAXLOGNAME + 1 _SYMLOOP_MAX = _MAXSYMLINKS _POSIX2_C_BIND = 1 _POSIX2_C_DEV = -1 _POSIX2_CHAR_TERM = -1 _POSIX2_FORT_DEV = -1 _POSIX2_FORT_RUN = -1 _POSIX2_LOCALEDEF = -1 _POSIX2_SW_DEV = -1 _POSIX2_UPE = -1 ) var ( clktck int64 clktckOnce sync.Once ) func sysconfPOSIX(name int) (int64, error) { // NetBSD does not define all _POSIX_* values used in sysconf_posix.go // The supported ones are handled in sysconf below. return -1, errInvalid } func sysconf(name int) (int64, error) { // NetBSD uses sysctl to get some of these values. For the user.* namespace, // calls get handled by user_sysctl in /usr/src/lib/libc/gen/sysctl.c // Duplicate the relevant values here. switch name { // 1003.1 case SC_ARG_MAX: return sysctl32("kern.argmax"), nil case SC_CHILD_MAX: var rlim unix.Rlimit if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil { if rlim.Cur != unix.RLIM_INFINITY { return int64(rlim.Cur), nil } } return -1, nil case SC_CLK_TCK: clktckOnce.Do(func() { clktck = -1 if ci, err := unix.SysctlClockinfo("kern.clockrate"); err == nil { clktck = int64(ci.Hz) } }) return clktck, nil case SC_NGROUPS_MAX: return sysctl32("kern.ngroups"), nil case SC_JOB_CONTROL: return sysctl32("kern.job_control"), nil case SC_OPEN_MAX: var rlim unix.Rlimit if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { return int64(rlim.Cur), nil } return -1, nil case SC_STREAM_MAX: // sysctl("user.stream_max") return _FOPEN_MAX, nil case SC_TZNAME_MAX: // sysctl("user.tzname_max") return _NAME_MAX, nil case SC_SAVED_IDS: return yesno(sysctl32("kern.saved_ids")), nil case SC_VERSION: return sysctl32("kern.posix1version"), nil // 1003.1b case SC_FSYNC: return sysctl32("kern.fsync"), nil case SC_SYNCHRONIZED_IO: return sysctl32("kern.synchronized_io"), nil case SC_MAPPED_FILES: return sysctl32("kern.mapped_files"), nil case SC_MEMLOCK: return sysctl32("kern.memlock"), nil case SC_MEMLOCK_RANGE: return sysctl32("kern.memlock_range"), nil case SC_MEMORY_PROTECTION: return sysctl32("kern.memory_protection"), nil case SC_MONOTONIC_CLOCK: return sysctl32("kern.monotonic_clock"), nil case SC_SEMAPHORES: return sysctl32("kern.posix_semaphores"), nil case SC_TIMERS: return sysctl32("kern.posix_timers"), nil // 1003.1c case SC_LOGIN_NAME_MAX: return sysctl32("kern.login_name_max"), nil case SC_THREADS: return sysctl32("kern.posix_threads"), nil // 1003.1j case SC_BARRIERS: return yesno(sysctl32("kern.posix_barriers")), nil case SC_SPIN_LOCKS: return yesno(sysctl32("kern.posix_spin_locks")), nil case SC_READER_WRITER_LOCKS: return yesno(sysctl32("kern.posix_reader_writer_locks")), nil // 1003.2 case SC_2_VERSION: // sysctl user.posix2_version return _POSIX2_VERSION, nil case SC_2_C_BIND: // sysctl user.posix2_c_bind return _POSIX2_C_BIND, nil case SC_2_C_DEV: // sysctl user.posix2_c_dev return _POSIX2_C_DEV, nil case SC_2_CHAR_TERM: // sysctl user.posix2_char_term return _POSIX2_CHAR_TERM, nil case SC_2_FORT_DEV: // sysctl user.posix2_fort_dev return _POSIX2_FORT_DEV, nil case SC_2_FORT_RUN: // sysctl user.posix2_fort_run return _POSIX2_FORT_RUN, nil case SC_2_LOCALEDEF: // sysctl user.posix2_localedef return _POSIX2_LOCALEDEF, nil case SC_2_SW_DEV: // sysctl user.posix2_sw_dev return _POSIX2_SW_DEV, nil case SC_2_UPE: // sysctl user.posix2_upe return _POSIX2_UPE, nil // XPG 4.2 case SC_IOV_MAX: return sysctl32("kern.iov_max"), nil case SC_XOPEN_SHM: return yesno(sysctl32("kern.ipc.sysvshm")), nil // 1003.1-2001, XSI Option Group case SC_AIO_LISTIO_MAX: return sysctl32("kern.aio_listio_max"), nil case SC_AIO_MAX: return sysctl32("kern.aio_max"), nil case SC_ASYNCHRONOUS_IO: return yesno(sysctl32("kern.posix_aio")), nil case SC_MESSAGE_PASSING: return yesno(sysctl32("kern.posix_msg")), nil case SC_MQ_OPEN_MAX: return sysctl32("kern.mqueue.mq_open_max"), nil case SC_MQ_PRIO_MAX: return sysctl32("kern.mqueue.mq_prio_max"), nil case SC_PRIORITY_SCHEDULING: return yesno(sysctl32("kern.posix_sched")), nil case SC_ATEXIT_MAX: // sysctl("user.atexit_max") return -1, nil // TODO // 1003.1-2001, TSF case SC_GETGR_R_SIZE_MAX: return _GETGR_R_SIZE_MAX, nil case SC_GETPW_R_SIZE_MAX: return _GETPW_R_SIZE_MAX, nil // Unsorted case SC_HOST_NAME_MAX: return _MAXHOSTNAMELEN, nil case SC_PASS_MAX: return _PASSWORD_LEN, nil case SC_REGEXP: return _POSIX_REGEXP, nil case SC_SHARED_MEMORY_OBJECTS: return _POSIX_SHARED_MEMORY_OBJECTS, nil case SC_SHELL: return _POSIX_SHELL, nil case SC_SPAWN: return _POSIX_SPAWN, nil // Extensions case SC_NPROCESSORS_CONF: return sysctl32("hw.ncpu"), nil case SC_NPROCESSORS_ONLN: return sysctl32("hw.ncpuonline"), nil // Linux/Solaris case SC_PHYS_PAGES: return sysctl64("hw.physmem64") / int64(unix.Getpagesize()), nil // Native case SC_SCHED_RT_TS: return sysctl32("kern.sched.rtts"), nil case SC_SCHED_PRI_MIN: return sysctl32("kern.sched.pri_min"), nil case SC_SCHED_PRI_MAX: return sysctl32("kern.sched.pri_max"), nil case SC_THREAD_DESTRUCTOR_ITERATIONS: return _POSIX_THREAD_DESTRUCTOR_ITERATIONS, nil case SC_THREAD_KEYS_MAX: return _POSIX_THREAD_KEYS_MAX, nil case SC_THREAD_STACK_MIN: return int64(unix.Getpagesize()), nil case SC_THREAD_THREADS_MAX: return sysctl32("kern.maxproc"), nil case SC_THREAD_ATTR_STACKADDR: return _POSIX_THREAD_ATTR_STACKADDR, nil case SC_THREAD_ATTR_STACKSIZE: return _POSIX_THREAD_ATTR_STACKSIZE, nil case SC_THREAD_SAFE_FUNCTIONS: return _POSIX_THREAD_SAFE_FUNCTIONS, nil case SC_THREAD_PRIO_PROTECT: return _POSIX_THREAD_PRIO_PROTECT, nil case SC_THREAD_PRIORITY_SCHEDULING, SC_THREAD_PRIO_INHERIT, SC_THREAD_PROCESS_SHARED: return -1, nil case SC_TTY_NAME_MAX: return pathconf(_PATH_DEV, _PC_NAME_MAX), nil case SC_TIMER_MAX: return _POSIX_TIMER_MAX, nil case SC_SEM_NSEMS_MAX: return _LONG_MAX, nil case SC_CPUTIME: return _POSIX_CPUTIME, nil case SC_THREAD_CPUTIME: return _POSIX_THREAD_CPUTIME, nil case SC_DELAYTIMER_MAX: return _POSIX_DELAYTIMER_MAX, nil case SC_SIGQUEUE_MAX: return _POSIX_SIGQUEUE_MAX, nil case SC_REALTIME_SIGNALS: return 200112, nil } return sysconfGeneric(name) } ```
```xml import * as React from 'react'; import { NavContextValue } from './NavContext.types'; const navContextDefaultValue: NavContextValue = { reserveSelectedNavItemSpace: true, selectedValue: undefined, selectedCategoryValue: undefined, onRegister: () => { /* noop */ }, onUnregister: () => { /* noop */ }, onSelect: () => { /* noop */ }, getRegisteredNavItems: () => { return { registeredNavItems: {}, }; }, onRequestNavCategoryItemToggle() { /* noop */ }, /** * The list of opened panels by index */ openCategories: [], /** * Indicates if Nav supports multiple open Categories at the same time. */ multiple: true, /** * Indicates the size and density of the Nav. */ size: 'medium', }; const NavContext = React.createContext<NavContextValue | undefined>(undefined); export const NavProvider = NavContext.Provider; export const useNavContext_unstable = () => React.useContext(NavContext) || navContextDefaultValue; ```
The Trade and Industry Bureau () is a former policy bureau of the Hong Kong Government, responsible for promoting Hong Kong's access to the world market, helping Hong Kong manufacturers remain competitive in international markets, enhancing the protection of intellectual property rights, and promoting Hong Kong customers' interests. It was headed by Secretary for Trade and Industry. Established as the Trade and Industry Branch in 1982 from the then (Chinese: 經濟科), along with the defederalisation of the Trade, Industry and Customs Department, it was renamed a bureau on 1 July 1997 upon the transfer of sovereignty over Hong Kong, and lasted until July 1, 2000, when it was renamed and reorganised as the Commerce and Industry Bureau to reflect its expanded responsibilities in Hong Kong's industry and commerce. It was further renamed the Commerce, Industry and Technology Bureau in 2002. See also Government Secretariat (Hong Kong) References Hong Kong government departments and agencies
Qalehcheh (, also Romanized as Qal‘ehcheh; also known as Qal‘echeh) is a village in Takab Rural District, in the Central District of Dargaz County, Razavi Khorasan Province, Iran. At the 2006 census, its population was 97, in 30 families. References Populated places in Dargaz County
Olive Mess is a progressive rock band from Latvia that sings in English. They are one of the most famous Baltic progressive rock bands. History The band was formed in 1998 by Denis Arsenin (bass), Edgars Kempišs (drums) and Alexey Syomin (guitar). In 2001, the group self-released a demo recording made during a rehearsal, Live Without Audience. The main theme of the record was history of Medieval France. Later in 2001 more members joined the group: Ilze Paegle (classical trained soprano singer), Lilija Voronova (keyboards) and Sergey Syomin (Archlute, Baroque guitar). In 2002 the band was signed by the French music label Soleil Zeuhl and released their debut album, Gramercy. The album consisted of 5 tracks with a total length of more than one hour. After the successful debut album, the band was invited to a variety of regional and local prog rock festivals, including InProg 2005, to open the second day of the festival, Proguary 2005 and Proguary 2006 (photo coverage), Latvia's first widely publicised progressive rock festival. They also played at BalticProgFest 2007, the biggest Baltic progressive rock festival, organised in Lithuania. On 6 September 2007 the band released their second album, Cherdak. The album was released on a new record label, the Italian Mellow Records, sometime in 2008 and consists of 4 tracks. In November 2007 the band went on tour to promote their latest album. Discography This list includes only official discography. Gramercy (2002) (Soleil Zeuhl) Cherdak (2008) (Mellow Records) Trivia The band named itself in honour of the 20th-century French composer Olivier Messiaen. External links Official website (English) About the band at Prog Archives (English) A list with quotes from positive reviews on the album Gramercy (English) About the band at the FREE!MUSIC Project (English) On stage at Proguary 2006 (English) About the band+interview with Ilze Paegle (Russian) About the band on another web-site (Latvian) Latvian progressive rock groups Latvian rock music groups
Real-time enterprise (commonly abbreviated to RTE) is a concept in business systems design focused on ensuring organisational responsiveness that was popularised in the first decade of the 21st century. It is also referred to as on-demand enterprise. Such an enterprise must be able to fulfill orders as soon as they are needed, and current information is available within a company at all times. This is achieved through the use of integrated systems including ERP, CRM and SCM. Though not particularly well defined, generally accepted goals of an RTE include: Reduced response times for partners and customers Increased transparency, for example sharing or reporting information across an enterprise instead of keeping it within individual departments Increased automation, including communications, accounting, supply chains and reporting Increased competitiveness Reduced costs See also Business process management (BPM) Complex event processing (CEP) Enterprise resource planning (ERP) Customer relationship management (CRM) Supply chain management (SCM) References External links Gartner Dawn of the real-time enterprise at InfoWorld White Paper on Real Time Enterprises by Vinod Khosla & Murugan Pal Business management
```javascript /** * ShopReactNative * * @author Tony Wong * @date 2016-09-23 * @email 908601756@qq.com */ import React, {Component} from 'react'; import {connect} from 'react-redux'; import PreorderPage from '../pages/PreorderPage'; class PreorderContainer extends Component { render() { return ( <PreorderPage {...this.props} /> ) } } export default connect((state) => { return { preorderReducer, orderReducer, userReducer, commonReducer} = state; })(PreorderContainer); ```
Mokon is a division of Protective Industries, Inc. from Buffalo, New York, United States. It is also the brand name of the circulating liquid temperature control systems delivering fluid temperatures from that are designed and manufactured by this division. Created from the need for "mold control", the company's corporate engineers responsible for the manufacture of a line of proprietary plastic closures used worldwide (Caplugs), originally developed a temperature control system to meet their own exacting need for a compact, safe, and efficient means of maintaining close control over their fast-cycle injection molding machines. In 1955, the corporation opened a new division of the company, MOKON, to further design, manufacture, and market their line of high quality water temperature control systems. A few years later, Mokon's engineering team developed a unique hot oil heat transfer system for higher temperature applications. As the two product lines expanded, so did the need for other products, and they next designed a line of portable chillers and full range systems (combination heating and cooling) in the mid-1980s. 2003, MOKON added central chillers and pump tanks and then blown film coolers in early 2008. Looking to complete its industrial products offering, the thermal engineering team pressed on with the development of: power and process control panels (2009); stationary heat transfer oil systems and outdoor air-cooled chillers (2011); low temperature and modulating portable chillers (2012); and a line of high temperature water systems to (2012). In addition to the release of new products, MOKON expanded the kilowatt and tonnage capacities, and temperature range of the process fluid from resulting in one of the most comprehensive lines of temperature control systems for industrial and commercial applications. Today the MOKON product line includes: water temperature control systems, heat transfer oil systems, portable and central chillers, pumping stations and tanks, inline heating and cooling skid packages, blown film coolers, engineered and pre-engineered control panels, positive and negative pressure systems, filtration maintenance products, and custom designed and engineered systems. See also Control panel References Companies based in Buffalo, New York
```css Hide the scrollbar in webkit browser The `nth-child` Property Combining selectors `:required` and `:optional` pseudo classes Debug with the `*` selector ```
```coffeescript ### Indexes: * db.tags.ensureIndex({team: 1, name: 1}, {unique: true, background: true}) ### {Schema} = require 'mongoose' _ = require 'lodash' module.exports = TagSchema = new Schema creator: type: Schema.Types.ObjectId, ref: 'User' team: type: Schema.Types.ObjectId, ref: 'Team' name: type: String createdAt: type: Date, default: Date.now updatedAt: type: Date, default: Date.now , read: 'secondaryPreferred' toObject: virtuals: true getters: true toJSON: virtuals: true getters: true # ============================== Virtuals ============================== TagSchema.virtual '_teamId' .get -> @team?._id or @team .set (_id) -> @team = _id TagSchema.virtual '_creatorId' .get -> @creator?._id or @creator .set (_id) -> @creator = _id # ============================== methods ============================== ```
```javascript // Array of country objects for the flag dropdown. // Here is the criteria for the plugin to support a given country/territory // - It has an iso2 code: path_to_url // - It has it's own country calling code (it is not a sub-region of another country): path_to_url // - It has a flag in the region-flags project: path_to_url // - It is supported by libphonenumber (it must be listed on this page): path_to_url // Each country array has the following information: // [ // Country name, // iso2 code, // International dial code, // Order (if >1 country with same dial code), // Area codes // ] var allCountries = [ [ "Afghanistan ()", "af", "93" ], [ "Albania (Shqipri)", "al", "355" ], [ "Algeria ()", "dz", "213" ], [ "American Samoa", "as", "1", 5, ["684"] ], [ "Andorra", "ad", "376" ], [ "Angola", "ao", "244" ], [ "Anguilla", "ai", "1", 6, ["264"] ], [ "Antigua and Barbuda", "ag", "1", 7, ["268"] ], [ "Argentina", "ar", "54" ], [ "Armenia ()", "am", "374" ], [ "Aruba", "aw", "297" ], [ "Ascension Island", "ac", "247" ], [ "Australia", "au", "61", 0 ], [ "Austria (sterreich)", "at", "43" ], [ "Azerbaijan (Azrbaycan)", "az", "994" ], [ "Bahamas", "bs", "1", 8, ["242"] ], [ "Bahrain ()", "bh", "973" ], [ "Bangladesh ()", "bd", "880" ], [ "Barbados", "bb", "1", 9, ["246"] ], [ "Belarus ()", "by", "375" ], [ "Belgium (Belgi)", "be", "32" ], [ "Belize", "bz", "501" ], [ "Benin (Bnin)", "bj", "229" ], [ "Bermuda", "bm", "1", 10, ["441"] ], [ "Bhutan ()", "bt", "975" ], [ "Bolivia", "bo", "591" ], [ "Bosnia and Herzegovina ( )", "ba", "387" ], [ "Botswana", "bw", "267" ], [ "Brazil (Brasil)", "br", "55" ], [ "British Indian Ocean Territory", "io", "246" ], [ "British Virgin Islands", "vg", "1", 11, ["284"] ], [ "Brunei", "bn", "673" ], [ "Bulgaria ()", "bg", "359" ], [ "Burkina Faso", "bf", "226" ], [ "Burundi (Uburundi)", "bi", "257" ], [ "Cambodia ()", "kh", "855" ], [ "Cameroon (Cameroun)", "cm", "237" ], [ "Canada", "ca", "1", 1, ["204", "226", "236", "249", "250", "289", "306", "343", "365", "387", "403", "416", "418", "431", "437", "438", "450", "506", "514", "519", "548", "579", "581", "587", "604", "613", "639", "647", "672", "705", "709", "742", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905"] ], [ "Cape Verde (Kabu Verdi)", "cv", "238" ], [ "Caribbean Netherlands", "bq", "599", 1, ["3", "4", "7"] ], [ "Cayman Islands", "ky", "1", 12, ["345"] ], [ "Central African Republic (Rpublique centrafricaine)", "cf", "236" ], [ "Chad (Tchad)", "td", "235" ], [ "Chile", "cl", "56" ], [ "China ()", "cn", "86" ], [ "Christmas Island", "cx", "61", 2, ["89164"] ], [ "Cocos (Keeling) Islands", "cc", "61", 1, ["89162"] ], [ "Colombia", "co", "57" ], [ "Comoros ( )", "km", "269" ], [ "Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)", "cd", "243" ], [ "Congo (Republic) (Congo-Brazzaville)", "cg", "242" ], [ "Cook Islands", "ck", "682" ], [ "Costa Rica", "cr", "506" ], [ "Cte dIvoire", "ci", "225" ], [ "Croatia (Hrvatska)", "hr", "385" ], [ "Cuba", "cu", "53" ], [ "Curaao", "cw", "599", 0 ], [ "Cyprus ()", "cy", "357" ], [ "Czech Republic (esk republika)", "cz", "420" ], [ "Denmark (Danmark)", "dk", "45" ], [ "Djibouti", "dj", "253" ], [ "Dominica", "dm", "1", 13, ["767"] ], [ "Dominican Republic (Repblica Dominicana)", "do", "1", 2, ["809", "829", "849"] ], [ "Ecuador", "ec", "593" ], [ "Egypt ()", "eg", "20" ], [ "El Salvador", "sv", "503" ], [ "Equatorial Guinea (Guinea Ecuatorial)", "gq", "240" ], [ "Eritrea", "er", "291" ], [ "Estonia (Eesti)", "ee", "372" ], [ "Eswatini", "sz", "268" ], [ "Ethiopia", "et", "251" ], [ "Falkland Islands (Islas Malvinas)", "fk", "500" ], [ "Faroe Islands (Froyar)", "fo", "298" ], [ "Fiji", "fj", "679" ], [ "Finland (Suomi)", "fi", "358", 0 ], [ "France", "fr", "33" ], [ "French Guiana (Guyane franaise)", "gf", "594" ], [ "French Polynesia (Polynsie franaise)", "pf", "689" ], [ "Gabon", "ga", "241" ], [ "Gambia", "gm", "220" ], [ "Georgia ()", "ge", "995" ], [ "Germany (Deutschland)", "de", "49" ], [ "Ghana (Gaana)", "gh", "233" ], [ "Gibraltar", "gi", "350" ], [ "Greece ()", "gr", "30" ], [ "Greenland (Kalaallit Nunaat)", "gl", "299" ], [ "Grenada", "gd", "1", 14, ["473"] ], [ "Guadeloupe", "gp", "590", 0 ], [ "Guam", "gu", "1", 15, ["671"] ], [ "Guatemala", "gt", "502" ], [ "Guernsey", "gg", "44", 1, ["1481", "7781", "7839", "7911"] ], [ "Guinea (Guine)", "gn", "224" ], [ "Guinea-Bissau (Guin Bissau)", "gw", "245" ], [ "Guyana", "gy", "592" ], [ "Haiti", "ht", "509" ], [ "Honduras", "hn", "504" ], [ "Hong Kong ()", "hk", "852" ], [ "Hungary (Magyarorszg)", "hu", "36" ], [ "Iceland (sland)", "is", "354" ], [ "India ()", "in", "91" ], [ "Indonesia", "id", "62" ], [ "Iran ()", "ir", "98" ], [ "Iraq ()", "iq", "964" ], [ "Ireland", "ie", "353" ], [ "Isle of Man", "im", "44", 2, ["1624", "74576", "7524", "7924", "7624"] ], [ "Israel ()", "il", "972" ], [ "Italy (Italia)", "it", "39", 0 ], [ "Jamaica", "jm", "1", 4, ["876", "658"] ], [ "Japan ()", "jp", "81" ], [ "Jersey", "je", "44", 3, ["1534", "7509", "7700", "7797", "7829", "7937"] ], [ "Jordan ()", "jo", "962" ], [ "Kazakhstan ()", "kz", "7", 1, ["33", "7"] ], [ "Kenya", "ke", "254" ], [ "Kiribati", "ki", "686" ], [ "Kosovo", "xk", "383" ], [ "Kuwait ()", "kw", "965" ], [ "Kyrgyzstan ()", "kg", "996" ], [ "Laos ()", "la", "856" ], [ "Latvia (Latvija)", "lv", "371" ], [ "Lebanon ()", "lb", "961" ], [ "Lesotho", "ls", "266" ], [ "Liberia", "lr", "231" ], [ "Libya ()", "ly", "218" ], [ "Liechtenstein", "li", "423" ], [ "Lithuania (Lietuva)", "lt", "370" ], [ "Luxembourg", "lu", "352" ], [ "Macau ()", "mo", "853" ], [ "Macedonia (FYROM) ()", "mk", "389" ], [ "Madagascar (Madagasikara)", "mg", "261" ], [ "Malawi", "mw", "265" ], [ "Malaysia", "my", "60" ], [ "Maldives", "mv", "960" ], [ "Mali", "ml", "223" ], [ "Malta", "mt", "356" ], [ "Marshall Islands", "mh", "692" ], [ "Martinique", "mq", "596" ], [ "Mauritania ()", "mr", "222" ], [ "Mauritius (Moris)", "mu", "230" ], [ "Mayotte", "yt", "262", 1, ["269", "639"] ], [ "Mexico (Mxico)", "mx", "52" ], [ "Micronesia", "fm", "691" ], [ "Moldova (Republica Moldova)", "md", "373" ], [ "Monaco", "mc", "377" ], [ "Mongolia ()", "mn", "976" ], [ "Montenegro (Crna Gora)", "me", "382" ], [ "Montserrat", "ms", "1", 16, ["664"] ], [ "Morocco ()", "ma", "212", 0 ], [ "Mozambique (Moambique)", "mz", "258" ], [ "Myanmar (Burma) ()", "mm", "95" ], [ "Namibia (Namibi)", "na", "264" ], [ "Nauru", "nr", "674" ], [ "Nepal ()", "np", "977" ], [ "Netherlands (Nederland)", "nl", "31" ], [ "New Caledonia (Nouvelle-Caldonie)", "nc", "687" ], [ "New Zealand", "nz", "64" ], [ "Nicaragua", "ni", "505" ], [ "Niger (Nijar)", "ne", "227" ], [ "Nigeria", "ng", "234" ], [ "Niue", "nu", "683" ], [ "Norfolk Island", "nf", "672" ], [ "North Korea ( )", "kp", "850" ], [ "Northern Mariana Islands", "mp", "1", 17, ["670"] ], [ "Norway (Norge)", "no", "47", 0 ], [ "Oman ()", "om", "968" ], [ "Pakistan ()", "pk", "92" ], [ "Palau", "pw", "680" ], [ "Palestine ()", "ps", "970" ], [ "Panama (Panam)", "pa", "507" ], [ "Papua New Guinea", "pg", "675" ], [ "Paraguay", "py", "595" ], [ "Peru (Per)", "pe", "51" ], [ "Philippines", "ph", "63" ], [ "Poland (Polska)", "pl", "48" ], [ "Portugal", "pt", "351" ], [ "Puerto Rico", "pr", "1", 3, ["787", "939"] ], [ "Qatar ()", "qa", "974" ], [ "Runion (La Runion)", "re", "262", 0 ], [ "Romania (Romnia)", "ro", "40" ], [ "Russia ()", "ru", "7", 0 ], [ "Rwanda", "rw", "250" ], [ "Saint Barthlemy", "bl", "590", 1 ], [ "Saint Helena", "sh", "290" ], [ "Saint Kitts and Nevis", "kn", "1", 18, ["869"] ], [ "Saint Lucia", "lc", "1", 19, ["758"] ], [ "Saint Martin (Saint-Martin (partie franaise))", "mf", "590", 2 ], [ "Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)", "pm", "508" ], [ "Saint Vincent and the Grenadines", "vc", "1", 20, ["784"] ], [ "Samoa", "ws", "685" ], [ "San Marino", "sm", "378" ], [ "So Tom and Prncipe (So Tom e Prncipe)", "st", "239" ], [ "Saudi Arabia ( )", "sa", "966" ], [ "Senegal (Sngal)", "sn", "221" ], [ "Serbia ()", "rs", "381" ], [ "Seychelles", "sc", "248" ], [ "Sierra Leone", "sl", "232" ], [ "Singapore", "sg", "65" ], [ "Sint Maarten", "sx", "1", 21, ["721"] ], [ "Slovakia (Slovensko)", "sk", "421" ], [ "Slovenia (Slovenija)", "si", "386" ], [ "Solomon Islands", "sb", "677" ], [ "Somalia (Soomaaliya)", "so", "252" ], [ "South Africa", "za", "27" ], [ "South Korea ()", "kr", "82" ], [ "South Sudan ( )", "ss", "211" ], [ "Spain (Espaa)", "es", "34" ], [ "Sri Lanka ( )", "lk", "94" ], [ "Sudan ()", "sd", "249" ], [ "Suriname", "sr", "597" ], [ "Svalbard and Jan Mayen", "sj", "47", 1, ["79"] ], [ "Sweden (Sverige)", "se", "46" ], [ "Switzerland (Schweiz)", "ch", "41" ], [ "Syria ()", "sy", "963" ], [ "Taiwan ()", "tw", "886" ], [ "Tajikistan", "tj", "992" ], [ "Tanzania", "tz", "255" ], [ "Thailand ()", "th", "66" ], [ "Timor-Leste", "tl", "670" ], [ "Togo", "tg", "228" ], [ "Tokelau", "tk", "690" ], [ "Tonga", "to", "676" ], [ "Trinidad and Tobago", "tt", "1", 22, ["868"] ], [ "Tunisia ()", "tn", "216" ], [ "Turkey (Trkiye)", "tr", "90" ], [ "Turkmenistan", "tm", "993" ], [ "Turks and Caicos Islands", "tc", "1", 23, ["649"] ], [ "Tuvalu", "tv", "688" ], [ "U.S. Virgin Islands", "vi", "1", 24, ["340"] ], [ "Uganda", "ug", "256" ], [ "Ukraine ()", "ua", "380" ], [ "United Arab Emirates ( )", "ae", "971" ], [ "United Kingdom", "gb", "44", 0 ], [ "United States", "us", "1", 0 ], [ "Uruguay", "uy", "598" ], [ "Uzbekistan (Ozbekiston)", "uz", "998" ], [ "Vanuatu", "vu", "678" ], [ "Vatican City (Citt del Vaticano)", "va", "39", 1, ["06698"] ], [ "Venezuela", "ve", "58" ], [ "Vietnam (Vit Nam)", "vn", "84" ], [ "Wallis and Futuna (Wallis-et-Futuna)", "wf", "681" ], [ "Western Sahara ( )", "eh", "212", 1, ["5288", "5289"] ], [ "Yemen ()", "ye", "967" ], [ "Zambia", "zm", "260" ], [ "Zimbabwe", "zw", "263" ], [ "land Islands", "ax", "358", 1, ["18"] ] ]; // loop over all of the countries above, restructuring the data to be objects with named keys for (var i = 0; i < allCountries.length; i++) { var c = allCountries[i]; allCountries[i] = { name: c[0], iso2: c[1], dialCode: c[2], priority: c[3] || 0, areaCodes: c[4] || null }; } ```
Dhritarashtra (, ISO-15919: Dhr̥tarāṣṭra) was a Kuru king, and the father of the Kauravas in the Hindu epic Mahabharata. He was the King of the Kuru Kingdom, with its capital at Hastinapura. He was born to Vichitravirya's first wife, Ambika. Dhritarashtra was born blind. He fathered one hundred sons and one daughter, Dushala, by his wife, Gandhari and a son, Yuyutsu, by his wife's maid. These children, including the eldest son Duryodhana, but not including Yuyutsu and Dushala, came to be known as the Kauravas. Etymology and historicity Dhṛtarāṣṭra means "He who supports/bears the nation". A historical Kuru King named Dhritarashtra Vaichitravirya is mentioned in the Kāṭhaka Saṃhitā of the Yajurveda ( 1200–900 BCE) as a descendant of the Rigvedic-era King Sudas of the Bharatas. His cattle was reportedly destroyed as a result of the conflict with the vrātya ascetics; however, this Vedic mention does not provide corroboration for the accuracy of the Mahabharata's account of his reign. Dhritarashtra did not accept the vratyas into his territory, and with the aid of rituals, the vratyas destroyed his cattle. The group of vratyas were led by Vaka Dālbhi of Panchala. Birth and early life With Vichitravirya having died of sickness, Bhishma unable to take the throne because of his vow, and Bahlika's line unwilling to leave the Bahlika Kingdom, there was a succession crisis in Hastinapura. Satyavati invites her son Vyasa to impregnate the queens Ambika and Ambalika under the Niyoga practice. When Vyasa went to impregnate Ambika, his scary appearance frightened her, so she closed her eyes during their union; hence her son was born blind. Dhritarashtra, along with his younger half-brother Pandu, was trained in the military arts by Bhishma and Kripacharya. Hindered by his handicap, Dhritarashtra was unable to wield weapons, but had the strength of one hundred thousand elephants due to boon given by Vyasa, and was said to be so strong that he could crush iron with his bare hands. When it came time to nominate an heir, Vidura suggested that Pandu would be a better fit because he was not blind. Though bitter about losing his birthright, Dhritarashtra willingly conceded the crown, though this act would seep into the obsession he would have over his crown later in life. Dhritarashtra married Gandhari of Hastinapura's weakened and lowly vassal Gandhara; After their marriage, Gandhari covered her eyes with a blindfold in order to truly experience her husband's blindness. Gandhari and he had one hundred sons, called the Kauravas, and one daughter Dushala. He also had a son named Yuyutsu mothered by a maid. Reign After the incident with Rishi Kindama, Pandu retired to the forest. Hence, Dhritarashtra was offered the crown. Through the blessings of Vyasa, he and Gandhari had one hundred sons and a daughter, with his eldest son, Duryodhana, becoming his heir. Upon Duryodhana's birth, ill omens appeared; many sages and priests advised Dhritarashtra and Gandhari to abandon the baby. But they refused to do so; Duryodhana grew up with a princely education and his parents believed that he would be a great heir. However, when Pandu died, Kunti and her sons returned to Hastinapura, living alongside Dhritarashtra's children. Yudhishthira, Pandu's eldest son, was older than Duryodhana. Given that Pandu was the king and that Yudhishthira was born of the god Dharma, he had a strong claim to the throne. A succession crisis began; though recognising Yudhishthira's merits, Dhritarashtra favoured his own son, blinded by affection. Upon much pressure from the Brahmins, Vidura, and Bhishma, Dhritarashtra reluctantly named Yudhishthira as his heir. Bifurcation of the Kuru Kingdom After the House of Lac incident, in which the Pandavas are believed to have been immolated, Dhritarashtra mourns, but was able to finally name Duryodhana as his heir. When the Pandavas are revealed to have survived, Duryodhana refuses to cede his title as heir when the sour relations between the Kauravas and the Pandavas simmer. On Bhishma's advice, Dhritarashtra bifurcates the kingdom, giving Hastinapura to Duryodhana and Khandavaprastha to Yudhishthira. The game of dice Shakuni, Gandhari's brother, was a master of dice as he could load them without his opponents having a clue. He, along with his nephew Duryodhana, conspired in a game of dice and invited the Pandavas to gamble. The Pandavas eventually lost their kingdom, wealth, and prestige and were exiled for thirteen years. Draupadi, the wife of the Pandavas, was humiliated in court after Dushasana tried to disrobe her. The blind king only intervened after counselling with Gandhari when Draupadi was going to curse the Kuru dynasty. Though notables like Vikarna and Vidura objected to the sins of Duryodhana, most of the spectators were helpless due to their obligations to Hastinapura; Dhritarashtra could have spoken out, but did not. The Kurukshetra War Krishna, as a peace emissary of the Pandavas, travelled to Hastinapura to persuade the Kauravas to avoid the bloodshed of their own kin. However, Duryodhana conspired to arrest him, which resulted in the failure of the mission. After Krishna's peace mission failed and a war seemed inevitable, Vyasa approached Dhritarashtra and offered to grant him a divine vision so that Dhritarashtra could see the war. However, not willing to see his kin slaughtered, Dhritarashtra asked that the boon be given to Sanjaya, his charioteer. Sanjaya dutifully narrated the war to his liege, reporting how Bhima killed all his children. Sanjaya would console the blind king while challenging the king with his own viewpoints and morals. When Lord Krishna displayed his Vishvarupa (True form) to Arjuna on the battlefield of Kurukshetra, Dhritarashtra regretted not possessing the divine sight. Dhritarashtra was confident that Bhishma, Drona, Karna and the other invincible warriors would make the Kaurava camp victorious. He rejoiced whenever the tide of war turned against the Pandavas. However, the results of the war devastated him. All of his sons and grandsons but one were killed in the carnage. Dhritarashtra's only daughter Duhsala was widowed. Yuyutsu had defected to Pandava side at the onset of the war, and was the only son of Dhritarashtra who had managed to survive the Kurukshetra War. Crushing of Bhima's metal statue After the war ended, the victorious Pandavas arrived at Hastinapura for the formal transfer of power. The Pandavas set forth to embrace their uncle and offer him their respects. Dhritarashtra hugged Yudhishthira heartily without a grudge. When Dhritarashtra turned to Bhima, Krishna sensed his intentions and asked Bhima to move Duryodhana's iron statue of Bhima (used by the prince for training) in his place. Dhritarashtra crushed the statue into pieces and then broke down crying, his rage leaving him. Broken and defeated, Dhritarashtra apologised for his folly and wholeheartedly embraced Bhima and the other Pandavas. Later years and death After the great war of Mahabharata, the grief-stricken blind king along with his wife Gandhari, sister-in-law Kunti, and half brother Vidura left Hastinapura for penance. It is believed that all of them (except Vidura who predeceased him) perished in a forest fire and attained moksha. Assessment Throughout his reign as King of Hastinapura, Dhritarashtra was torn between the principles of dharma and his love for his son Duryodhana. He often ended up endorsing his son's actions merely out of fatherly love. Dhritarashtra is physically strong, yet psychologically weak, easily manipulated by his brother-in-law, Shakuni. Dhritarashtra appears in Mahabharata sections that have been circulated as separate scriptures, most notably the Bhagavad Gita, whose dialogue was narrated to him. See also Gandhari (character) Kauravas Duryodhana Historicity of the Mahabharata References Mythological kings of Kuru Blind royalty and nobility Characters in the Mahabharata Ancient Indian monarchs Vedic period People related to Krishna
```objective-c #ifndef TACO_MODE_FORMAT_SINGLETON_H #define TACO_MODE_FORMAT_SINGLETON_H #include "taco/lower/mode_format_impl.h" namespace taco { class SingletonModeFormat : public ModeFormatImpl { public: using ModeFormatImpl::getInsertCoord; SingletonModeFormat(); SingletonModeFormat(bool isFull, bool isOrdered, bool isUnique, bool isZeroless, bool isPadded, long long allocSize = DEFAULT_ALLOC_SIZE); ~SingletonModeFormat() override {} ModeFormat copy(std::vector<ModeFormat::Property> properties) const override; ModeFunction posIterBounds(ir::Expr parentPos, Mode mode) const override; ModeFunction posIterAccess(ir::Expr pos, std::vector<ir::Expr> coords, Mode mode) const override; ir::Stmt getAppendCoord(ir::Expr pos, ir::Expr coord, Mode mode) const override; ir::Expr getSize(ir::Expr parentSize, Mode mode) const override; ir::Stmt getAppendInitLevel(ir::Expr parentSize, ir::Expr size, Mode mode) const override; ir::Stmt getAppendFinalizeLevel(ir::Expr parentSize, ir::Expr size, Mode mode) const override; ir::Expr getAssembledSize(ir::Expr prevSize, Mode mode) const override; ir::Stmt getInitCoords(ir::Expr prevSize, std::vector<AttrQueryResult> queries, Mode mode) const override; ModeFunction getYieldPos(ir::Expr parentPos, std::vector<ir::Expr> coords, Mode mode) const override; ir::Stmt getInsertCoord(ir::Expr parentPos, ir::Expr pos, std::vector<ir::Expr> coords, Mode mode) const override; std::vector<ir::Expr> getArrays(ir::Expr tensor, int mode, int level) const override; protected: ir::Expr getCoordArray(ModePack pack) const; ir::Expr getCoordCapacity(Mode mode) const; bool equals(const ModeFormatImpl& other) const override; const long long allocSize; }; } #endif ```
Tulno is a village in the administrative district of Gmina Pasłęk, within Elbląg County, Warmian-Masurian Voivodeship, in northern Poland. It lies approximately south-east of Pasłęk, south-east of Elbląg, and north-west of the regional capital Olsztyn. As of 2021, only one person lives in the village. Before 1945 the area was part of Germany (East Prussia). References Tulno
The American Student Union (ASU) was a national left-wing organization of college students of the 1930s, best remembered for its protest activities against militarism. Founded by a 1935 merger of Communist and Socialist student organizations, the ASU was affiliated with the American Youth Congress. The group was investigated by the Dies Committee of the United States House of Representatives in 1939 over its connections to the Communist Party USA. With the group's Communist-dominated leadership consistently supportive of the twists and turns of Soviet foreign policy, the Socialist minority split from the group in 1939. The organization was terminated in 1941 and reformed in 2022. Organizational history Establishment Following the rise of Adolf Hitler in Germany, the party line of the world communist movement was changed from the ultra-radicalism of the so-called "Third Period", which shrilly condemned Social Democrats as "Social Fascists", to a new phase of broad left wing cooperation known as the Popular Front. Efforts immediately followed on the part of the Communist Party-sponsored National Student League (NSL) to unite with its Socialist Party counterpart, which in the middle 1930s was effectively the Student League for Industrial Democracy (SLID). Initial peace feelers extended by the Communists to the Socialists were rejected in December 1932, but with the European situation worsening two joint conferences of the rival left wing groups were held in 1933 — one in Chicago under Communist auspices and another in New York City headed by the League for Industrial Democracy. The two groups decided to retain their separate existence but to work together on matters of common concern, which paved the way for several joint activities which took place in 1934 and the first half of 1935. In June 1935 Joseph P. Lash of the SLID proposed at a meeting of the organization's governing National Executive Committee that the organization should appoint a committee to negotiate a formal merger with the NSL. The NEC of SLID was divided on the matter, but after extensive debate ultimately resolved to appoint a six-member negotiating committee. Following negotiations between the two participating groups, a Unity Convention of the NSL and SLID was held over the Christmas holidays at the YMCA building in Columbus, Ohio. The American Student Union was thus born. Louis E. Burnham organized the first chapters to appear on black college campuses. Change of line on pacifism In January 1938 the third annual convention of the ASU, held at Vassar College in Poughkeepsie, New York, changed the position of the organization on war. Previously a pacifist organization which endorsed the so-called "Oxford Pledge" against conscription and militarism, the position of the ASU was brought into line with the foreign policy of the administration of Franklin D. Roosevelt, based upon the notion of collective security. Some opponents of this change were livid and charged that the change was made by bloc voting by members of the Communist Party, as exemplified by the following passage from the press of Jay Lovestone's rival Independent Communist Labor League: "At the outset, it was apparent to all that the Young Communist League controlled the convention in the form of a well-disciplined group, docile, responding to the guidance of the Stalinist wire-pullers. Every attempt on the part of the various advocates of the Oxford Pledge to introduce substitute motions or amendments, as is done in all parliamentary procedure, was efficiently squelched by the Stalinist chairman, with the help of his gloating compatriots on the floor." The vote in favor of changing the political line of the organization on the war question was passed by a vote of 382 to 108. Atrophy and dissolution There was discord in the ASU over the organization's changing position to European armament after 1938, with the Socialist-oriented members generally favoring continuation of the organization's historic opposition to militarism and Communist-oriented members arguing in favor of rearmament and collective security in Europe. The break came the following year, however, with the November 1939 Soviet invasion of Finland. The ASU leadership, consisting by that time of a Communist majority, dutifully supported the military action of the Soviet Union, prompting the Socialist minority to split the organization. The ASU continued forward as a more clearly defined Communist youth organization from that date and entered a period of organizational decline. The group held its final convention in 1941. Footnotes Further reading Robert Cohen, When the Old Left was Young: Student Radicals and America's First Mass Student Movement, 1929–1941, New York: Oxford University Press, 1993. Which Road Shall the ASU Take? New York: Independent Communist Labor League, November 1937. Publications Toward a "Closed Shop" on the Campus. New York: American Student Union, 1936. The Campus: A Fortress of Democracy. New York: American Student Union, 1937. The Dismissal of Bob Burke: Heidelberg comes to Columbia. New York: American Student Union, 1938. Keep Democracy Working by Making It Serve Human Needs: Report of Proceedings of Fourth National Convention, American student Union, College of the City of New York, New York City, December 27-30, 1938. New YorK: American Student Union, 1939. The Student in the Post-Munich World. New York: American Student Union, 1939. Oberlin: The War Years. New York: American Student Union, 1940. "Twaddle," A Story in Pictures. New York American Student Union, 1940. ASU: Now We Are 6. New York: American Student Union, 1940. External links American Student Union Memoirs, newdeal.feri.org/ —Twelve memoirs by leading participants collected in 1986. [https://americanstudentunion.org/ —Re-founded organization with the same name and programme Student organizations established in 1935 Organizations disestablished in 1941 Defunct organizations based in the United States Student political organizations in the United States Communist Party USA mass organizations New Deal
```objective-c // // MBProgressHUD.m // Version 1.0.0 // Created by Matej Bukovinski on 2.4.09. // #import "MBProgressHUD.h" #import <tgmath.h> #ifndef kCFCoreFoundationVersionNumber_iOS_7_0 #define kCFCoreFoundationVersionNumber_iOS_7_0 847.20 #endif #ifndef kCFCoreFoundationVersionNumber_iOS_8_0 #define kCFCoreFoundationVersionNumber_iOS_8_0 1129.15 #endif #define MBMainThreadAssert() NSAssert([NSThread isMainThread], @"MBProgressHUD needs to be accessed on the main thread."); CGFloat const MBProgressMaxOffset = 1000000.f; static const CGFloat MBDefaultPadding = 4.f; static const CGFloat MBDefaultLabelFontSize = 16.f; static const CGFloat MBDefaultDetailsLabelFontSize = 12.f; @interface MBProgressHUD () { // Deprecated UIColor *_activityIndicatorColor; CGFloat _opacity; } @property (nonatomic, assign) BOOL useAnimation; @property (nonatomic, assign, getter=hasFinished) BOOL finished; @property (nonatomic, strong) UIView *indicator; @property (nonatomic, strong) NSDate *showStarted; @property (nonatomic, strong) NSArray *paddingConstraints; @property (nonatomic, strong) NSArray *bezelConstraints; @property (nonatomic, strong) UIView *topSpacer; @property (nonatomic, strong) UIView *bottomSpacer; @property (nonatomic, weak) NSTimer *graceTimer; @property (nonatomic, weak) NSTimer *minShowTimer; @property (nonatomic, weak) NSTimer *hideDelayTimer; @property (nonatomic, weak) CADisplayLink *progressObjectDisplayLink; // Deprecated @property (assign) BOOL taskInProgress; @end @interface MBProgressHUDRoundedButton : UIButton @end @implementation MBProgressHUD #pragma mark - Class methods + (instancetype)showHUDAddedTo:(UIView *)view animated:(BOOL)animated { MBProgressHUD *hud = [[self alloc] initWithView:view]; hud.removeFromSuperViewOnHide = YES; [view addSubview:hud]; [hud showAnimated:animated]; return hud; } + (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated { MBProgressHUD *hud = [self HUDForView:view]; if (hud != nil) { hud.removeFromSuperViewOnHide = YES; [hud hideAnimated:animated]; return YES; } return NO; } + (MBProgressHUD *)HUDForView:(UIView *)view { NSEnumerator *subviewsEnum = [view.subviews reverseObjectEnumerator]; for (UIView *subview in subviewsEnum) { if ([subview isKindOfClass:self]) { return (MBProgressHUD *)subview; } } return nil; } #pragma mark - Lifecycle - (void)commonInit { // Set default values for properties _animationType = MBProgressHUDAnimationFade; _mode = MBProgressHUDModeIndeterminate; _margin = 20.0f; _opacity = 1.f; _defaultMotionEffectsEnabled = YES; // Default color, depending on the current iOS version BOOL isLegacy = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0; _contentColor = isLegacy ? [UIColor whiteColor] : [UIColor colorWithWhite:0.f alpha:0.7f]; // Transparent background self.opaque = NO; self.backgroundColor = [UIColor clearColor]; // Make it invisible for now self.alpha = 0.0f; self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; self.layer.allowsGroupOpacity = NO; [self setupViews]; [self updateIndicators]; [self registerForNotifications]; } - (instancetype)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { [self commonInit]; } return self; } - (instancetype)initWithCoder:(NSCoder *)aDecoder { if ((self = [super initWithCoder:aDecoder])) { [self commonInit]; } return self; } - (id)initWithView:(UIView *)view { NSAssert(view, @"View must not be nil."); return [self initWithFrame:view.bounds]; } - (void)dealloc { [self unregisterFromNotifications]; } #pragma mark - Show & hide - (void)showAnimated:(BOOL)animated { MBMainThreadAssert(); [self.minShowTimer invalidate]; self.useAnimation = animated; self.finished = NO; // If the grace time is set, postpone the HUD display if (self.graceTime > 0.0) { NSTimer *timer = [NSTimer timerWithTimeInterval:self.graceTime target:self selector:@selector(handleGraceTimer:) userInfo:nil repeats:NO]; [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; self.graceTimer = timer; } // ... otherwise show the HUD immediately else { [self showUsingAnimation:self.useAnimation]; } } - (void)hideAnimated:(BOOL)animated { MBMainThreadAssert(); [self.graceTimer invalidate]; self.useAnimation = animated; self.finished = YES; // If the minShow time is set, calculate how long the HUD was shown, // and postpone the hiding operation if necessary if (self.minShowTime > 0.0 && self.showStarted) { NSTimeInterval interv = [[NSDate date] timeIntervalSinceDate:self.showStarted]; if (interv < self.minShowTime) { NSTimer *timer = [NSTimer timerWithTimeInterval:(self.minShowTime - interv) target:self selector:@selector(handleMinShowTimer:) userInfo:nil repeats:NO]; [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; self.minShowTimer = timer; return; } } // ... otherwise hide the HUD immediately [self hideUsingAnimation:self.useAnimation]; } - (void)hideAnimated:(BOOL)animated afterDelay:(NSTimeInterval)delay { NSTimer *timer = [NSTimer timerWithTimeInterval:delay target:self selector:@selector(handleHideTimer:) userInfo:@(animated) repeats:NO]; [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; self.hideDelayTimer = timer; } #pragma mark - Timer callbacks - (void)handleGraceTimer:(NSTimer *)theTimer { // Show the HUD only if the task is still running if (!self.hasFinished) { [self showUsingAnimation:self.useAnimation]; } } - (void)handleMinShowTimer:(NSTimer *)theTimer { [self hideUsingAnimation:self.useAnimation]; } - (void)handleHideTimer:(NSTimer *)timer { [self hideAnimated:[timer.userInfo boolValue]]; } #pragma mark - View Hierrarchy - (void)didMoveToSuperview { [self updateForCurrentOrientationAnimated:NO]; } #pragma mark - Internal show & hide operations - (void)showUsingAnimation:(BOOL)animated { // Cancel any previous animations [self.bezelView.layer removeAllAnimations]; [self.backgroundView.layer removeAllAnimations]; // Cancel any scheduled hideDelayed: calls [self.hideDelayTimer invalidate]; self.showStarted = [NSDate date]; self.alpha = 1.f; // Needed in case we hide and re-show with the same NSProgress object attached. [self setNSProgressDisplayLinkEnabled:YES]; if (animated) { [self animateIn:YES withType:self.animationType completion:NULL]; } else { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" self.bezelView.alpha = self.opacity; #pragma clang diagnostic pop self.backgroundView.alpha = 1.f; } } - (void)hideUsingAnimation:(BOOL)animated { if (animated && self.showStarted) { self.showStarted = nil; [self animateIn:NO withType:self.animationType completion:^(BOOL finished) { [self done]; }]; } else { self.showStarted = nil; self.bezelView.alpha = 0.f; self.backgroundView.alpha = 1.f; [self done]; } } - (void)animateIn:(BOOL)animatingIn withType:(MBProgressHUDAnimation)type completion:(void(^)(BOOL finished))completion { // Automatically determine the correct zoom animation type if (type == MBProgressHUDAnimationZoom) { type = animatingIn ? MBProgressHUDAnimationZoomIn : MBProgressHUDAnimationZoomOut; } CGAffineTransform small = CGAffineTransformMakeScale(0.5f, 0.5f); CGAffineTransform large = CGAffineTransformMakeScale(1.5f, 1.5f); // Set starting state UIView *bezelView = self.bezelView; if (animatingIn && bezelView.alpha == 0.f && type == MBProgressHUDAnimationZoomIn) { bezelView.transform = small; } else if (animatingIn && bezelView.alpha == 0.f && type == MBProgressHUDAnimationZoomOut) { bezelView.transform = large; } // Perform animations dispatch_block_t animations = ^{ if (animatingIn) { bezelView.transform = CGAffineTransformIdentity; } else if (!animatingIn && type == MBProgressHUDAnimationZoomIn) { bezelView.transform = large; } else if (!animatingIn && type == MBProgressHUDAnimationZoomOut) { bezelView.transform = small; } #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" bezelView.alpha = animatingIn ? self.opacity : 0.f; #pragma clang diagnostic pop self.backgroundView.alpha = animatingIn ? 1.f : 0.f; }; // Spring animations are nicer, but only available on iOS 7+ #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 || TARGET_OS_TV if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_0) { [UIView animateWithDuration:0.3 delay:0. usingSpringWithDamping:1.f initialSpringVelocity:0.f options:UIViewAnimationOptionBeginFromCurrentState animations:animations completion:completion]; return; } #endif [UIView animateWithDuration:0.3 delay:0. options:UIViewAnimationOptionBeginFromCurrentState animations:animations completion:completion]; } - (void)done { // Cancel any scheduled hideDelayed: calls [self.hideDelayTimer invalidate]; [self setNSProgressDisplayLinkEnabled:NO]; if (self.hasFinished) { self.alpha = 0.0f; if (self.removeFromSuperViewOnHide) { [self removeFromSuperview]; } } MBProgressHUDCompletionBlock completionBlock = self.completionBlock; if (completionBlock) { completionBlock(); } id<MBProgressHUDDelegate> delegate = self.delegate; if ([delegate respondsToSelector:@selector(hudWasHidden:)]) { [delegate performSelector:@selector(hudWasHidden:) withObject:self]; } } #pragma mark - UI - (void)setupViews { UIColor *defaultColor = self.contentColor; MBBackgroundView *backgroundView = [[MBBackgroundView alloc] initWithFrame:self.bounds]; backgroundView.style = MBProgressHUDBackgroundStyleSolidColor; backgroundView.backgroundColor = [UIColor clearColor]; backgroundView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; backgroundView.alpha = 0.f; [self addSubview:backgroundView]; _backgroundView = backgroundView; MBBackgroundView *bezelView = [MBBackgroundView new]; bezelView.translatesAutoresizingMaskIntoConstraints = NO; bezelView.layer.cornerRadius = 5.f; bezelView.alpha = 0.f; [self addSubview:bezelView]; _bezelView = bezelView; [self updateBezelMotionEffects]; UILabel *label = [UILabel new]; label.adjustsFontSizeToFitWidth = NO; label.textAlignment = NSTextAlignmentCenter; label.textColor = defaultColor; label.font = [UIFont boldSystemFontOfSize:MBDefaultLabelFontSize]; label.opaque = NO; label.backgroundColor = [UIColor clearColor]; _label = label; UILabel *detailsLabel = [UILabel new]; detailsLabel.adjustsFontSizeToFitWidth = NO; detailsLabel.textAlignment = NSTextAlignmentCenter; detailsLabel.textColor = defaultColor; detailsLabel.numberOfLines = 0; detailsLabel.font = [UIFont boldSystemFontOfSize:MBDefaultDetailsLabelFontSize]; detailsLabel.opaque = NO; detailsLabel.backgroundColor = [UIColor clearColor]; _detailsLabel = detailsLabel; UIButton *button = [MBProgressHUDRoundedButton buttonWithType:UIButtonTypeCustom]; button.titleLabel.textAlignment = NSTextAlignmentCenter; button.titleLabel.font = [UIFont boldSystemFontOfSize:MBDefaultDetailsLabelFontSize]; [button setTitleColor:defaultColor forState:UIControlStateNormal]; _button = button; for (UIView *view in @[label, detailsLabel, button]) { view.translatesAutoresizingMaskIntoConstraints = NO; [view setContentCompressionResistancePriority:998.f forAxis:UILayoutConstraintAxisHorizontal]; [view setContentCompressionResistancePriority:998.f forAxis:UILayoutConstraintAxisVertical]; [bezelView addSubview:view]; } UIView *topSpacer = [UIView new]; topSpacer.translatesAutoresizingMaskIntoConstraints = NO; topSpacer.hidden = YES; [bezelView addSubview:topSpacer]; _topSpacer = topSpacer; UIView *bottomSpacer = [UIView new]; bottomSpacer.translatesAutoresizingMaskIntoConstraints = NO; bottomSpacer.hidden = YES; [bezelView addSubview:bottomSpacer]; _bottomSpacer = bottomSpacer; } - (void)updateIndicators { UIView *indicator = self.indicator; BOOL isActivityIndicator = [indicator isKindOfClass:[UIActivityIndicatorView class]]; BOOL isRoundIndicator = [indicator isKindOfClass:[MBRoundProgressView class]]; MBProgressHUDMode mode = self.mode; if (mode == MBProgressHUDModeIndeterminate) { if (!isActivityIndicator) { // Update to indeterminate indicator [indicator removeFromSuperview]; indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; [(UIActivityIndicatorView *)indicator startAnimating]; [self.bezelView addSubview:indicator]; } } else if (mode == MBProgressHUDModeDeterminateHorizontalBar) { // Update to bar determinate indicator [indicator removeFromSuperview]; indicator = [[MBBarProgressView alloc] init]; [self.bezelView addSubview:indicator]; } else if (mode == MBProgressHUDModeDeterminate || mode == MBProgressHUDModeAnnularDeterminate) { if (!isRoundIndicator) { // Update to determinante indicator [indicator removeFromSuperview]; indicator = [[MBRoundProgressView alloc] init]; [self.bezelView addSubview:indicator]; } if (mode == MBProgressHUDModeAnnularDeterminate) { [(MBRoundProgressView *)indicator setAnnular:YES]; } } else if (mode == MBProgressHUDModeCustomView && self.customView != indicator) { // Update custom view indicator [indicator removeFromSuperview]; indicator = self.customView; [self.bezelView addSubview:indicator]; } else if (mode == MBProgressHUDModeText) { [indicator removeFromSuperview]; indicator = nil; } indicator.translatesAutoresizingMaskIntoConstraints = NO; self.indicator = indicator; if ([indicator respondsToSelector:@selector(setProgress:)]) { [(id)indicator setValue:@(self.progress) forKey:@"progress"]; } [indicator setContentCompressionResistancePriority:998.f forAxis:UILayoutConstraintAxisHorizontal]; [indicator setContentCompressionResistancePriority:998.f forAxis:UILayoutConstraintAxisVertical]; [self updateViewsForColor:self.contentColor]; [self setNeedsUpdateConstraints]; } - (void)updateViewsForColor:(UIColor *)color { if (!color) return; self.label.textColor = color; self.detailsLabel.textColor = color; [self.button setTitleColor:color forState:UIControlStateNormal]; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" if (self.activityIndicatorColor) { color = self.activityIndicatorColor; } #pragma clang diagnostic pop // UIAppearance settings are prioritized. If they are preset the set color is ignored. UIView *indicator = self.indicator; if ([indicator isKindOfClass:[UIActivityIndicatorView class]]) { UIActivityIndicatorView *appearance = nil; #if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000 appearance = [UIActivityIndicatorView appearanceWhenContainedIn:[MBProgressHUD class], nil]; #else // For iOS 9+ appearance = [UIActivityIndicatorView appearanceWhenContainedInInstancesOfClasses:@[[MBProgressHUD class]]]; #endif if (appearance.color == nil) { ((UIActivityIndicatorView *)indicator).color = color; } } else if ([indicator isKindOfClass:[MBRoundProgressView class]]) { MBRoundProgressView *appearance = nil; #if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000 appearance = [MBRoundProgressView appearanceWhenContainedIn:[MBProgressHUD class], nil]; #else appearance = [MBRoundProgressView appearanceWhenContainedInInstancesOfClasses:@[[MBProgressHUD class]]]; #endif if (appearance.progressTintColor == nil) { ((MBRoundProgressView *)indicator).progressTintColor = color; } if (appearance.backgroundTintColor == nil) { ((MBRoundProgressView *)indicator).backgroundTintColor = [color colorWithAlphaComponent:0.1]; } } else if ([indicator isKindOfClass:[MBBarProgressView class]]) { MBBarProgressView *appearance = nil; #if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000 appearance = [MBBarProgressView appearanceWhenContainedIn:[MBProgressHUD class], nil]; #else appearance = [MBBarProgressView appearanceWhenContainedInInstancesOfClasses:@[[MBProgressHUD class]]]; #endif if (appearance.progressColor == nil) { ((MBBarProgressView *)indicator).progressColor = color; } if (appearance.lineColor == nil) { ((MBBarProgressView *)indicator).lineColor = color; } } else { #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 || TARGET_OS_TV if ([indicator respondsToSelector:@selector(setTintColor:)]) { [indicator setTintColor:color]; } #endif } } - (void)updateBezelMotionEffects { #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 || TARGET_OS_TV MBBackgroundView *bezelView = self.bezelView; if (![bezelView respondsToSelector:@selector(addMotionEffect:)]) return; if (self.defaultMotionEffectsEnabled) { CGFloat effectOffset = 10.f; UIInterpolatingMotionEffect *effectX = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis]; effectX.maximumRelativeValue = @(effectOffset); effectX.minimumRelativeValue = @(-effectOffset); UIInterpolatingMotionEffect *effectY = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.y" type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis]; effectY.maximumRelativeValue = @(effectOffset); effectY.minimumRelativeValue = @(-effectOffset); UIMotionEffectGroup *group = [[UIMotionEffectGroup alloc] init]; group.motionEffects = @[effectX, effectY]; [bezelView addMotionEffect:group]; } else { NSArray *effects = [bezelView motionEffects]; for (UIMotionEffect *effect in effects) { [bezelView removeMotionEffect:effect]; } } #endif } #pragma mark - Layout - (void)updateConstraints { UIView *bezel = self.bezelView; UIView *topSpacer = self.topSpacer; UIView *bottomSpacer = self.bottomSpacer; CGFloat margin = self.margin; NSMutableArray *bezelConstraints = [NSMutableArray array]; NSDictionary *metrics = @{@"margin": @(margin)}; NSMutableArray *subviews = [NSMutableArray arrayWithObjects:self.topSpacer, self.label, self.detailsLabel, self.button, self.bottomSpacer, nil]; if (self.indicator) [subviews insertObject:self.indicator atIndex:1]; // Remove existing constraints [self removeConstraints:self.constraints]; [topSpacer removeConstraints:topSpacer.constraints]; [bottomSpacer removeConstraints:bottomSpacer.constraints]; if (self.bezelConstraints) { [bezel removeConstraints:self.bezelConstraints]; self.bezelConstraints = nil; } // Center bezel in container (self), applying the offset if set CGPoint offset = self.offset; NSMutableArray *centeringConstraints = [NSMutableArray array]; [centeringConstraints addObject:[NSLayoutConstraint constraintWithItem:bezel attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1.f constant:offset.x]]; [centeringConstraints addObject:[NSLayoutConstraint constraintWithItem:bezel attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterY multiplier:1.f constant:offset.y]]; [self applyPriority:998.f toConstraints:centeringConstraints]; [self addConstraints:centeringConstraints]; // Ensure minimum side margin is kept NSMutableArray *sideConstraints = [NSMutableArray array]; [sideConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"|-(>=margin)-[bezel]-(>=margin)-|" options:0 metrics:metrics views:NSDictionaryOfVariableBindings(bezel)]]; [sideConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(>=margin)-[bezel]-(>=margin)-|" options:0 metrics:metrics views:NSDictionaryOfVariableBindings(bezel)]]; [self applyPriority:999.f toConstraints:sideConstraints]; [self addConstraints:sideConstraints]; // Minimum bezel size, if set CGSize minimumSize = self.minSize; if (!CGSizeEqualToSize(minimumSize, CGSizeZero)) { NSMutableArray *minSizeConstraints = [NSMutableArray array]; [minSizeConstraints addObject:[NSLayoutConstraint constraintWithItem:bezel attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.f constant:minimumSize.width]]; [minSizeConstraints addObject:[NSLayoutConstraint constraintWithItem:bezel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.f constant:minimumSize.height]]; [self applyPriority:997.f toConstraints:minSizeConstraints]; [bezelConstraints addObjectsFromArray:minSizeConstraints]; } // Square aspect ratio, if set if (self.square) { NSLayoutConstraint *square = [NSLayoutConstraint constraintWithItem:bezel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:bezel attribute:NSLayoutAttributeWidth multiplier:1.f constant:0]; square.priority = 997.f; [bezelConstraints addObject:square]; } // Top and bottom spacing [topSpacer addConstraint:[NSLayoutConstraint constraintWithItem:topSpacer attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.f constant:margin]]; [bottomSpacer addConstraint:[NSLayoutConstraint constraintWithItem:bottomSpacer attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.f constant:margin]]; // Top and bottom spaces should be equal [bezelConstraints addObject:[NSLayoutConstraint constraintWithItem:topSpacer attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:bottomSpacer attribute:NSLayoutAttributeHeight multiplier:1.f constant:0.f]]; // Layout subviews in bezel NSMutableArray *paddingConstraints = [NSMutableArray new]; [subviews enumerateObjectsUsingBlock:^(UIView *view, NSUInteger idx, BOOL *stop) { // Center in bezel [bezelConstraints addObject:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:bezel attribute:NSLayoutAttributeCenterX multiplier:1.f constant:0.f]]; // Ensure the minimum edge margin is kept [bezelConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"|-(>=margin)-[view]-(>=margin)-|" options:0 metrics:metrics views:NSDictionaryOfVariableBindings(view)]]; // Element spacing if (idx == 0) { // First, ensure spacing to bezel edge [bezelConstraints addObject:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:bezel attribute:NSLayoutAttributeTop multiplier:1.f constant:0.f]]; } else if (idx == subviews.count - 1) { // Last, ensure spacing to bezel edge [bezelConstraints addObject:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:bezel attribute:NSLayoutAttributeBottom multiplier:1.f constant:0.f]]; } if (idx > 0) { // Has previous NSLayoutConstraint *padding = [NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:subviews[idx - 1] attribute:NSLayoutAttributeBottom multiplier:1.f constant:0.f]; [bezelConstraints addObject:padding]; [paddingConstraints addObject:padding]; } }]; [bezel addConstraints:bezelConstraints]; self.bezelConstraints = bezelConstraints; self.paddingConstraints = [paddingConstraints copy]; [self updatePaddingConstraints]; [super updateConstraints]; } - (void)layoutSubviews { // There is no need to update constraints if they are going to // be recreated in [super layoutSubviews] due to needsUpdateConstraints being set. // This also avoids an issue on iOS 8, where updatePaddingConstraints // would trigger a zombie object access. if (!self.needsUpdateConstraints) { [self updatePaddingConstraints]; } [super layoutSubviews]; } - (void)updatePaddingConstraints { // Set padding dynamically, depending on whether the view is visible or not __block BOOL hasVisibleAncestors = NO; [self.paddingConstraints enumerateObjectsUsingBlock:^(NSLayoutConstraint *padding, NSUInteger idx, BOOL *stop) { UIView *firstView = (UIView *)padding.firstItem; UIView *secondView = (UIView *)padding.secondItem; BOOL firstVisible = !firstView.hidden && !CGSizeEqualToSize(firstView.intrinsicContentSize, CGSizeZero); BOOL secondVisible = !secondView.hidden && !CGSizeEqualToSize(secondView.intrinsicContentSize, CGSizeZero); // Set if both views are visible or if there's a visible view on top that doesn't have padding // added relative to the current view yet padding.constant = (firstVisible && (secondVisible || hasVisibleAncestors)) ? MBDefaultPadding : 0.f; hasVisibleAncestors |= secondVisible; }]; } - (void)applyPriority:(UILayoutPriority)priority toConstraints:(NSArray *)constraints { for (NSLayoutConstraint *constraint in constraints) { constraint.priority = priority; } } #pragma mark - Properties - (void)setMode:(MBProgressHUDMode)mode { if (mode != _mode) { _mode = mode; [self updateIndicators]; } } - (void)setCustomView:(UIView *)customView { if (customView != _customView) { _customView = customView; if (self.mode == MBProgressHUDModeCustomView) { [self updateIndicators]; } } } - (void)setOffset:(CGPoint)offset { if (!CGPointEqualToPoint(offset, _offset)) { _offset = offset; [self setNeedsUpdateConstraints]; } } - (void)setMargin:(CGFloat)margin { if (margin != _margin) { _margin = margin; [self setNeedsUpdateConstraints]; } } - (void)setMinSize:(CGSize)minSize { if (!CGSizeEqualToSize(minSize, _minSize)) { _minSize = minSize; [self setNeedsUpdateConstraints]; } } - (void)setSquare:(BOOL)square { if (square != _square) { _square = square; [self setNeedsUpdateConstraints]; } } - (void)setProgressObjectDisplayLink:(CADisplayLink *)progressObjectDisplayLink { if (progressObjectDisplayLink != _progressObjectDisplayLink) { [_progressObjectDisplayLink invalidate]; _progressObjectDisplayLink = progressObjectDisplayLink; [_progressObjectDisplayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; } } - (void)setProgressObject:(NSProgress *)progressObject { if (progressObject != _progressObject) { _progressObject = progressObject; [self setNSProgressDisplayLinkEnabled:YES]; } } - (void)setProgress:(float)progress { if (progress != _progress) { _progress = progress; UIView *indicator = self.indicator; if ([indicator respondsToSelector:@selector(setProgress:)]) { [(id)indicator setValue:@(self.progress) forKey:@"progress"]; } } } - (void)setContentColor:(UIColor *)contentColor { if (contentColor != _contentColor && ![contentColor isEqual:_contentColor]) { _contentColor = contentColor; [self updateViewsForColor:contentColor]; } } - (void)setDefaultMotionEffectsEnabled:(BOOL)defaultMotionEffectsEnabled { if (defaultMotionEffectsEnabled != _defaultMotionEffectsEnabled) { _defaultMotionEffectsEnabled = defaultMotionEffectsEnabled; [self updateBezelMotionEffects]; } } #pragma mark - NSProgress - (void)setNSProgressDisplayLinkEnabled:(BOOL)enabled { // We're using CADisplayLink, because NSProgress can change very quickly and observing it may starve the main thread, // so we're refreshing the progress only every frame draw if (enabled && self.progressObject) { // Only create if not already active. if (!self.progressObjectDisplayLink) { self.progressObjectDisplayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateProgressFromProgressObject)]; } } else { self.progressObjectDisplayLink = nil; } } - (void)updateProgressFromProgressObject { self.progress = self.progressObject.fractionCompleted; } #pragma mark - Notifications - (void)registerForNotifications { #if !TARGET_OS_TV NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc addObserver:self selector:@selector(statusBarOrientationDidChange:) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; #endif } - (void)unregisterFromNotifications { #if !TARGET_OS_TV NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; #endif } #if !TARGET_OS_TV - (void)statusBarOrientationDidChange:(NSNotification *)notification { UIView *superview = self.superview; if (!superview) { return; } else { [self updateForCurrentOrientationAnimated:YES]; } } #endif - (void)updateForCurrentOrientationAnimated:(BOOL)animated { // Stay in sync with the superview in any case if (self.superview) { self.bounds = self.superview.bounds; } // Not needed on iOS 8+, compile out when the deployment target allows, // to avoid sharedApplication problems on extension targets #if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000 // Only needed pre iOS 8 when added to a window BOOL iOS8OrLater = kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0; if (iOS8OrLater || ![self.superview isKindOfClass:[UIWindow class]]) return; // Make extension friendly. Will not get called on extensions (iOS 8+) due to the above check. // This just ensures we don't get a warning about extension-unsafe API. Class UIApplicationClass = NSClassFromString(@"UIApplication"); if (!UIApplicationClass || ![UIApplicationClass respondsToSelector:@selector(sharedApplication)]) return; UIApplication *application = [UIApplication performSelector:@selector(sharedApplication)]; UIInterfaceOrientation orientation = application.statusBarOrientation; CGFloat radians = 0; if (UIInterfaceOrientationIsLandscape(orientation)) { radians = orientation == UIInterfaceOrientationLandscapeLeft ? -(CGFloat)M_PI_2 : (CGFloat)M_PI_2; // Window coordinates differ! self.bounds = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.width); } else { radians = orientation == UIInterfaceOrientationPortraitUpsideDown ? (CGFloat)M_PI : 0.f; } if (animated) { [UIView animateWithDuration:0.3 animations:^{ self.transform = CGAffineTransformMakeRotation(radians); }]; } else { self.transform = CGAffineTransformMakeRotation(radians); } #endif } @end @implementation MBRoundProgressView #pragma mark - Lifecycle - (id)init { return [self initWithFrame:CGRectMake(0.f, 0.f, 37.f, 37.f)]; } - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.backgroundColor = [UIColor clearColor]; self.opaque = NO; _progress = 0.f; _annular = NO; _progressTintColor = [[UIColor alloc] initWithWhite:1.f alpha:1.f]; _backgroundTintColor = [[UIColor alloc] initWithWhite:1.f alpha:.1f]; } return self; } #pragma mark - Layout - (CGSize)intrinsicContentSize { return CGSizeMake(37.f, 37.f); } #pragma mark - Properties - (void)setProgress:(float)progress { if (progress != _progress) { _progress = progress; [self setNeedsDisplay]; } } - (void)setProgressTintColor:(UIColor *)progressTintColor { NSAssert(progressTintColor, @"The color should not be nil."); if (progressTintColor != _progressTintColor && ![progressTintColor isEqual:_progressTintColor]) { _progressTintColor = progressTintColor; [self setNeedsDisplay]; } } - (void)setBackgroundTintColor:(UIColor *)backgroundTintColor { NSAssert(backgroundTintColor, @"The color should not be nil."); if (backgroundTintColor != _backgroundTintColor && ![backgroundTintColor isEqual:_backgroundTintColor]) { _backgroundTintColor = backgroundTintColor; [self setNeedsDisplay]; } } #pragma mark - Drawing - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); BOOL isPreiOS7 = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0; if (_annular) { // Draw background CGFloat lineWidth = isPreiOS7 ? 5.f : 2.f; UIBezierPath *processBackgroundPath = [UIBezierPath bezierPath]; processBackgroundPath.lineWidth = lineWidth; processBackgroundPath.lineCapStyle = kCGLineCapButt; CGPoint center = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds)); CGFloat radius = (self.bounds.size.width - lineWidth)/2; CGFloat startAngle = - ((float)M_PI / 2); // 90 degrees CGFloat endAngle = (2 * (float)M_PI) + startAngle; [processBackgroundPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; [_backgroundTintColor set]; [processBackgroundPath stroke]; // Draw progress UIBezierPath *processPath = [UIBezierPath bezierPath]; processPath.lineCapStyle = isPreiOS7 ? kCGLineCapRound : kCGLineCapSquare; processPath.lineWidth = lineWidth; endAngle = (self.progress * 2 * (float)M_PI) + startAngle; [processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; [_progressTintColor set]; [processPath stroke]; } else { // Draw background CGFloat lineWidth = 2.f; CGRect allRect = self.bounds; CGRect circleRect = CGRectInset(allRect, lineWidth/2.f, lineWidth/2.f); CGPoint center = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds)); [_progressTintColor setStroke]; [_backgroundTintColor setFill]; CGContextSetLineWidth(context, lineWidth); if (isPreiOS7) { CGContextFillEllipseInRect(context, circleRect); } CGContextStrokeEllipseInRect(context, circleRect); // 90 degrees CGFloat startAngle = - ((float)M_PI / 2.f); // Draw progress if (isPreiOS7) { CGFloat radius = (CGRectGetWidth(self.bounds) / 2.f) - lineWidth; CGFloat endAngle = (self.progress * 2.f * (float)M_PI) + startAngle; [_progressTintColor setFill]; CGContextMoveToPoint(context, center.x, center.y); CGContextAddArc(context, center.x, center.y, radius, startAngle, endAngle, 0); CGContextClosePath(context); CGContextFillPath(context); } else { UIBezierPath *processPath = [UIBezierPath bezierPath]; processPath.lineCapStyle = kCGLineCapButt; processPath.lineWidth = lineWidth * 2.f; CGFloat radius = (CGRectGetWidth(self.bounds) / 2.f) - (processPath.lineWidth / 2.f); CGFloat endAngle = (self.progress * 2.f * (float)M_PI) + startAngle; [processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; // Ensure that we don't get color overlaping when _progressTintColor alpha < 1.f. CGContextSetBlendMode(context, kCGBlendModeCopy); [_progressTintColor set]; [processPath stroke]; } } } @end @implementation MBBarProgressView #pragma mark - Lifecycle - (id)init { return [self initWithFrame:CGRectMake(.0f, .0f, 120.0f, 20.0f)]; } - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { _progress = 0.f; _lineColor = [UIColor whiteColor]; _progressColor = [UIColor whiteColor]; _progressRemainingColor = [UIColor clearColor]; self.backgroundColor = [UIColor clearColor]; self.opaque = NO; } return self; } #pragma mark - Layout - (CGSize)intrinsicContentSize { BOOL isPreiOS7 = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0; return CGSizeMake(120.f, isPreiOS7 ? 20.f : 10.f); } #pragma mark - Properties - (void)setProgress:(float)progress { if (progress != _progress) { _progress = progress; [self setNeedsDisplay]; } } - (void)setProgressColor:(UIColor *)progressColor { NSAssert(progressColor, @"The color should not be nil."); if (progressColor != _progressColor && ![progressColor isEqual:_progressColor]) { _progressColor = progressColor; [self setNeedsDisplay]; } } - (void)setProgressRemainingColor:(UIColor *)progressRemainingColor { NSAssert(progressRemainingColor, @"The color should not be nil."); if (progressRemainingColor != _progressRemainingColor && ![progressRemainingColor isEqual:_progressRemainingColor]) { _progressRemainingColor = progressRemainingColor; [self setNeedsDisplay]; } } #pragma mark - Drawing - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 2); CGContextSetStrokeColorWithColor(context,[_lineColor CGColor]); CGContextSetFillColorWithColor(context, [_progressRemainingColor CGColor]); // Draw background CGFloat radius = (rect.size.height / 2) - 2; CGContextMoveToPoint(context, 2, rect.size.height/2); CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius); CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2); CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius); CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2); CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); CGContextFillPath(context); // Draw border CGContextMoveToPoint(context, 2, rect.size.height/2); CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius); CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2); CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius); CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2); CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); CGContextStrokePath(context); CGContextSetFillColorWithColor(context, [_progressColor CGColor]); radius = radius - 2; CGFloat amount = self.progress * rect.size.width; // Progress in the middle area if (amount >= radius + 4 && amount <= (rect.size.width - radius - 4)) { CGContextMoveToPoint(context, 4, rect.size.height/2); CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); CGContextAddLineToPoint(context, amount, 4); CGContextAddLineToPoint(context, amount, radius + 4); CGContextMoveToPoint(context, 4, rect.size.height/2); CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); CGContextAddLineToPoint(context, amount, rect.size.height - 4); CGContextAddLineToPoint(context, amount, radius + 4); CGContextFillPath(context); } // Progress in the right arc else if (amount > radius + 4) { CGFloat x = amount - (rect.size.width - radius - 4); CGContextMoveToPoint(context, 4, rect.size.height/2); CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); CGContextAddLineToPoint(context, rect.size.width - radius - 4, 4); CGFloat angle = -acos(x/radius); if (isnan(angle)) angle = 0; CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, M_PI, angle, 0); CGContextAddLineToPoint(context, amount, rect.size.height/2); CGContextMoveToPoint(context, 4, rect.size.height/2); CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); CGContextAddLineToPoint(context, rect.size.width - radius - 4, rect.size.height - 4); angle = acos(x/radius); if (isnan(angle)) angle = 0; CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, -M_PI, angle, 1); CGContextAddLineToPoint(context, amount, rect.size.height/2); CGContextFillPath(context); } // Progress is in the left arc else if (amount < radius + 4 && amount > 0) { CGContextMoveToPoint(context, 4, rect.size.height/2); CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); CGContextMoveToPoint(context, 4, rect.size.height/2); CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); CGContextFillPath(context); } } @end @interface MBBackgroundView () #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV @property UIVisualEffectView *effectView; #endif #if !TARGET_OS_TV @property UIToolbar *toolbar; #endif @end @implementation MBBackgroundView #pragma mark - Lifecycle - (instancetype)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_0) { _style = MBProgressHUDBackgroundStyleBlur; if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) { _color = [UIColor colorWithWhite:0.8f alpha:0.6f]; } else { _color = [UIColor colorWithWhite:0.95f alpha:0.6f]; } } else { _style = MBProgressHUDBackgroundStyleSolidColor; _color = [[UIColor blackColor] colorWithAlphaComponent:0.8]; } self.clipsToBounds = YES; [self updateForBackgroundStyle]; } return self; } #pragma mark - Layout - (CGSize)intrinsicContentSize { // Smallest size possible. Content pushes against this. return CGSizeZero; } #pragma mark - Appearance - (void)setStyle:(MBProgressHUDBackgroundStyle)style { if (style == MBProgressHUDBackgroundStyleBlur && kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0) { style = MBProgressHUDBackgroundStyleSolidColor; } if (_style != style) { _style = style; [self updateForBackgroundStyle]; } } - (void)setColor:(UIColor *)color { NSAssert(color, @"The color should not be nil."); if (color != _color && ![color isEqual:_color]) { _color = color; [self updateViewsForColor:color]; } } /////////////////////////////////////////////////////////////////////////////////////////// #pragma mark - Views - (void)updateForBackgroundStyle { MBProgressHUDBackgroundStyle style = self.style; if (style == MBProgressHUDBackgroundStyleBlur) { #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) { UIBlurEffect *effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:effect]; [self addSubview:effectView]; effectView.frame = self.bounds; effectView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; self.backgroundColor = self.color; self.layer.allowsGroupOpacity = NO; self.effectView = effectView; } else { #endif #if !TARGET_OS_TV UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectInset(self.bounds, -100.f, -100.f)]; toolbar.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; toolbar.barTintColor = self.color; toolbar.translucent = YES; [self addSubview:toolbar]; self.toolbar = toolbar; #endif #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV } #endif } else { #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) { [self.effectView removeFromSuperview]; self.effectView = nil; } else { #endif #if !TARGET_OS_TV [self.toolbar removeFromSuperview]; self.toolbar = nil; #endif #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV } #endif self.backgroundColor = self.color; } } - (void)updateViewsForColor:(UIColor *)color { if (self.style == MBProgressHUDBackgroundStyleBlur) { if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) { self.backgroundColor = self.color; } else { #if !TARGET_OS_TV self.toolbar.barTintColor = color; #endif } } else { self.backgroundColor = self.color; } } @end @implementation MBProgressHUD (Deprecated) #pragma mark - Class + (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated { NSArray *huds = [MBProgressHUD allHUDsForView:view]; for (MBProgressHUD *hud in huds) { hud.removeFromSuperViewOnHide = YES; [hud hideAnimated:animated]; } return [huds count]; } + (NSArray *)allHUDsForView:(UIView *)view { NSMutableArray *huds = [NSMutableArray array]; NSArray *subviews = view.subviews; for (UIView *aView in subviews) { if ([aView isKindOfClass:self]) { [huds addObject:aView]; } } return [NSArray arrayWithArray:huds]; } #pragma mark - Lifecycle - (id)initWithWindow:(UIWindow *)window { return [self initWithView:window]; } #pragma mark - Show & hide - (void)show:(BOOL)animated { [self showAnimated:animated]; } - (void)hide:(BOOL)animated { [self hideAnimated:animated]; } - (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay { [self hideAnimated:animated afterDelay:delay]; } #pragma mark - Threading - (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated { [self showAnimated:animated whileExecutingBlock:^{ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-performSelector-leaks" // Start executing the requested task [target performSelector:method withObject:object]; #pragma clang diagnostic pop }]; } - (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block { dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL]; } - (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(void (^)())completion { dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:completion]; } - (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue { [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL]; } - (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue completionBlock:(nullable MBProgressHUDCompletionBlock)completion { self.taskInProgress = YES; self.completionBlock = completion; dispatch_async(queue, ^(void) { block(); dispatch_async(dispatch_get_main_queue(), ^(void) { [self cleanUp]; }); }); [self showAnimated:animated]; } - (void)cleanUp { self.taskInProgress = NO; [self hideAnimated:self.useAnimation]; } #pragma mark - Labels - (NSString *)labelText { return self.label.text; } - (void)setLabelText:(NSString *)labelText { MBMainThreadAssert(); self.label.text = labelText; } - (UIFont *)labelFont { return self.label.font; } - (void)setLabelFont:(UIFont *)labelFont { MBMainThreadAssert(); self.label.font = labelFont; } - (UIColor *)labelColor { return self.label.textColor; } - (void)setLabelColor:(UIColor *)labelColor { MBMainThreadAssert(); self.label.textColor = labelColor; } - (NSString *)detailsLabelText { return self.detailsLabel.text; } - (void)setDetailsLabelText:(NSString *)detailsLabelText { MBMainThreadAssert(); self.detailsLabel.text = detailsLabelText; } - (UIFont *)detailsLabelFont { return self.detailsLabel.font; } - (void)setDetailsLabelFont:(UIFont *)detailsLabelFont { MBMainThreadAssert(); self.detailsLabel.font = detailsLabelFont; } - (UIColor *)detailsLabelColor { return self.detailsLabel.textColor; } - (void)setDetailsLabelColor:(UIColor *)detailsLabelColor { MBMainThreadAssert(); self.detailsLabel.textColor = detailsLabelColor; } - (CGFloat)opacity { return _opacity; } - (void)setOpacity:(CGFloat)opacity { MBMainThreadAssert(); _opacity = opacity; } - (UIColor *)color { return self.bezelView.color; } - (void)setColor:(UIColor *)color { MBMainThreadAssert(); self.bezelView.color = color; } - (CGFloat)yOffset { return self.offset.y; } - (void)setYOffset:(CGFloat)yOffset { MBMainThreadAssert(); self.offset = CGPointMake(self.offset.x, yOffset); } - (CGFloat)xOffset { return self.offset.x; } - (void)setXOffset:(CGFloat)xOffset { MBMainThreadAssert(); self.offset = CGPointMake(xOffset, self.offset.y); } - (CGFloat)cornerRadius { return self.bezelView.layer.cornerRadius; } - (void)setCornerRadius:(CGFloat)cornerRadius { MBMainThreadAssert(); self.bezelView.layer.cornerRadius = cornerRadius; } - (BOOL)dimBackground { MBBackgroundView *backgroundView = self.backgroundView; UIColor *dimmedColor = [UIColor colorWithWhite:0.f alpha:.2f]; return backgroundView.style == MBProgressHUDBackgroundStyleSolidColor && [backgroundView.color isEqual:dimmedColor]; } - (void)setDimBackground:(BOOL)dimBackground { MBMainThreadAssert(); self.backgroundView.style = MBProgressHUDBackgroundStyleSolidColor; self.backgroundView.color = dimBackground ? [UIColor colorWithWhite:0.f alpha:.2f] : [UIColor clearColor]; } - (CGSize)size { return self.bezelView.frame.size; } - (UIColor *)activityIndicatorColor { return _activityIndicatorColor; } - (void)setActivityIndicatorColor:(UIColor *)activityIndicatorColor { if (activityIndicatorColor != _activityIndicatorColor) { _activityIndicatorColor = activityIndicatorColor; UIActivityIndicatorView *indicator = (UIActivityIndicatorView *)self.indicator; if ([indicator isKindOfClass:[UIActivityIndicatorView class]]) { [indicator setColor:activityIndicatorColor]; } } } @end @implementation MBProgressHUDRoundedButton #pragma mark - Lifecycle - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { CALayer *layer = self.layer; layer.borderWidth = 1.f; } return self; } #pragma mark - Layout - (void)layoutSubviews { [super layoutSubviews]; // Fully rounded corners CGFloat height = CGRectGetHeight(self.bounds); self.layer.cornerRadius = ceil(height / 2.f); } - (CGSize)intrinsicContentSize { // Only show if we have associated control events if (self.allControlEvents == 0) return CGSizeZero; CGSize size = [super intrinsicContentSize]; // Add some side padding size.width += 20.f; return size; } #pragma mark - Color - (void)setTitleColor:(UIColor *)color forState:(UIControlState)state { [super setTitleColor:color forState:state]; // Update related colors [self setHighlighted:self.highlighted]; self.layer.borderColor = color.CGColor; } - (void)setHighlighted:(BOOL)highlighted { [super setHighlighted:highlighted]; UIColor *baseColor = [self titleColorForState:UIControlStateSelected]; self.backgroundColor = highlighted ? [baseColor colorWithAlphaComponent:0.1f] : [UIColor clearColor]; } @end ```
```objective-c /* xxHash - Fast Hash algorithm Header File Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You can contact the author at : - xxHash source repository : path_to_url */ /* Notice extracted from xxHash homepage : xxHash is an extremely fast Hash algorithm, running at RAM speed limits. It also successfully passes all tests from the SMHasher suite. Comparison (single thread, Windows Seven 32 bits, using SMHasher on a Core 2 Duo @3GHz) Name Speed Q.Score Author xxHash 5.4 GB/s 10 CrapWow 3.2 GB/s 2 Andrew MumurHash 3a 2.7 GB/s 10 Austin Appleby SpookyHash 2.0 GB/s 10 Bob Jenkins SBox 1.4 GB/s 9 Bret Mulvey Lookup3 1.2 GB/s 9 Bob Jenkins SuperFastHash 1.2 GB/s 1 Paul Hsieh CityHash64 1.05 GB/s 10 Pike & Alakuijala FNV 0.55 GB/s 5 Fowler, Noll, Vo CRC32 0.43 GB/s 9 MD5-32 0.33 GB/s 10 Ronald L. Rivest SHA1-32 0.28 GB/s 10 Q.Score is a measure of quality of the hash function. It depends on successfully passing SMHasher test set. 10 is a perfect score. */ #pragma once #if defined (__cplusplus) namespace rocksdb { #endif //**************************** // Type //**************************** typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode; //**************************** // Simple Hash Functions //**************************** unsigned int XXH32 (const void* input, int len, unsigned int seed); /* XXH32() : Calculate the 32-bits hash of sequence of length "len" stored at memory address "input". The memory between input & input+len must be valid (allocated and read-accessible). "seed" can be used to alter the result predictably. This function successfully passes all SMHasher tests. Speed on Core 2 Duo @ 3 GHz (single thread, SMHasher benchmark) : 5.4 GB/s Note that "len" is type "int", which means it is limited to 2^31-1. If your data is larger, use the advanced functions below. */ //**************************** // Advanced Hash Functions //**************************** void* XXH32_init (unsigned int seed); XXH_errorcode XXH32_update (void* state, const void* input, int len); unsigned int XXH32_digest (void* state); /* These functions calculate the xxhash of an input provided in several small packets, as opposed to an input provided as a single block. It must be started with : void* XXH32_init() The function returns a pointer which holds the state of calculation. This pointer must be provided as "void* state" parameter for XXH32_update(). XXH32_update() can be called as many times as necessary. The user must provide a valid (allocated) input. The function returns an error code, with 0 meaning OK, and any other value meaning there is an error. Note that "len" is type "int", which means it is limited to 2^31-1. If your data is larger, it is recommended to chunk your data into blocks of size for example 2^30 (1GB) to avoid any "int" overflow issue. Finally, you can end the calculation anytime, by using XXH32_digest(). This function returns the final 32-bits hash. You must provide the same "void* state" parameter created by XXH32_init(). Memory will be freed by XXH32_digest(). */ int XXH32_sizeofState(); XXH_errorcode XXH32_resetState(void* state, unsigned int seed); #define XXH32_SIZEOFSTATE 48 typedef struct { long long ll[(XXH32_SIZEOFSTATE+(sizeof(long long)-1))/sizeof(long long)]; } XXH32_stateSpace_t; /* These functions allow user application to make its own allocation for state. XXH32_sizeofState() is used to know how much space must be allocated for the xxHash 32-bits state. Note that the state must be aligned to access 'long long' fields. Memory must be allocated and referenced by a pointer. This pointer must then be provided as 'state' into XXH32_resetState(), which initializes the state. For static allocation purposes (such as allocation on stack, or freestanding systems without malloc()), use the structure XXH32_stateSpace_t, which will ensure that memory space is large enough and correctly aligned to access 'long long' fields. */ unsigned int XXH32_intermediateDigest (void* state); /* This function does the same as XXH32_digest(), generating a 32-bit hash, but preserve memory context. This way, it becomes possible to generate intermediate hashes, and then continue feeding data with XXH32_update(). To free memory context, use XXH32_digest(), or free(). */ //**************************** // Deprecated function names //**************************** // The following translations are provided to ease code transition // You are encouraged to no longer this function names #define XXH32_feed XXH32_update #define XXH32_result XXH32_digest #define XXH32_getIntermediateResult XXH32_intermediateDigest #if defined (__cplusplus) } // namespace rocksdb #endif ```
Wallace Sampson (March 29, 1930 – May 25, 2015), also known as Wally, was an American medical doctor and consumer advocate against alternative medicine and other fraud schemes. He was an authority in numerous medical fields, including oncology, hematology, and pathology. He was Emeritus Professor of Clinical Medicine at Stanford University. He was the former Head of Medical Oncology at Santa Clara Valley Medical Center, and a member of the faculty at the Skeptic's Toolbox 1998–2008. Scientific skepticism Wallace Sampson was an international expert in exposing pseudoscience-based fraudulent schemes in medicine and other fields, such as alternative medicine, integrative medicine, traditional Chinese medicine, acupuncture, and chiropractic. He publicized the expression "antiscience" to refer to the basis of belief in alternative medicine in his title for a peer-reviewed paper published by the New York Academy of Sciences – "Antiscience Trends in the Rise of the 'Alternative Medicine' Movement". He taught the Stanford University School of Medicine Alternative Medicine course regarding "unscientific medical systems and aberrant medical claims". The San Francisco Chronicle quotes him as saying "We've looked into most of the practices and, biochemically or physically, their supposed effects lie somewhere between highly improbable and impossible." He was a founding editor of the Scientific Review of Alternative Medicine, former chair of the Board of Directors of the National Council against Health Fraud, former Chair of the State of California Cancer Advisory Council (advisory board on health fraud schemes), and consulted on medical fraud and other fraud schemes for the Medical Board of California, Association of State Medical Boards, California State Attorney General, US Postal Service, multiple district attorneys, and multiple insurance companies. Sampson has published numerous academic papers in various medical fields, as well as popular works including for the Saturday Evening Post. He was also a fellow of the Committee for Skeptical Inquiry (CSI). In April 2011 the executive council of CSI selected Sampson for inclusion in the CSI Pantheon of Skeptics. The Pantheon of Skeptics was created by CSI to remember the legacy of deceased fellows of CSI and their contributions to the cause of scientific skepticism. He was an editor of the scientific skepticism website Science-Based Medicine. In a eulogy for Sampson, friend Harriet Hall wrote that she owes her own career in skepticism to Sampson. He is the person that encouraged her to write about pseudoscience topics, and learn how to evaluate claims. She had met him at the Skeptic's Toolbox where he was a part of the faculty. When he decided to step down from that lecture position she was the person who was asked to replace him. Hall reports that Sampson first became interested in writing about skepticism topics when his patients kept asking about using Laetrile to treat cancer. He researched the topic and found that it was a bogus claim. References 1930 births 2015 deaths American oncologists American skeptics Consumer rights activists Critics of alternative medicine
```css .calloutVisible { padding-top: var(--spacing-2); padding-bottom: var(--spacing-5); } .calloutHidden { padding-bottom: var(--spacing-5); } ```
Tina Romero (born Tina Romero Alcázar, August 14, 1949) is an American actress. A native of New York City, Romero moved to Mexico in her youth, and later established a career there as an actress. Her early film roles included The Divine Caste (1973) and the title character in the horror film Alucarda (1977). She has also appeared in American films, including Missing (1982), opposite Sissy Spacek and Jack Lemmon. Romero has also appeared in numerous Mexican television series, including numerous telenovelas, such as Rosalinda (1999), Mi pecado (2009), Quiero amarte (2014), Early life Romero was born on August 14, 1949, in New York City, the daughter of Mexican parents. She and her family relocated to Mexico in 1958 where she developed her skills in acting school. In 1976, at the age of 27, she made her debut as a protagonist in the movie Lo Mejor de Teresa. The same year she participated in the films Chin Chin el Teporocho and Las Poquianchis, directed by Felipe Cazals. Career In 1977, she starred in her first mexican telenovela Santa, and starred in the film Alucarda, directed by Juan Lopez Moctezuma with Claudio Brook, David Silva, considered a classic horror film. In 1979 she filmed Cuatro mujeres y un Hombre, Bandera Rota and My Horse Cantador, and also appeared in the telenovela Angel Guerra alongside Andrea Palma and Diana Bracho. Romero married in the 1980s to the Mexican film director Gabriel Retes, with whom she had two children. In the 1980s she filmed Estampas de Sor Juana and in 1982 makes her Hollywood debut in the film Missing starring Sissy Spacek. In 1983 Romero returned to Mexico and made film and television appearances as The Castaways of Liguria directed by her then husband Retes. In 1986 she starred in the film Miracles, and in 1988 returned to Hollywood to take part in Clif Ossmond's movie The Penitent. In México, she starred in the telenovelas La Casa al Final de la Calle and Simplemente María. In the 1990s and 2000s she participated in such notable telenovelas as; Cadenas de Amargura (1991), Muchachitas (1991), Alondra (1995), Rosalinda (1999, with Thalía), Abrázame muy fuerte (2000), and most recently Pasión (2007), Mi pecado (2009) and Una Maid en Manhattan (2011), among others. Filmography Film Television Dama y obrero (American telenovela) (2013)- Alfonsina Rosario (2013) - Griselda Amor Bravío (Valiant Love) (2012)- Rosalio Sanchez (Mother of Alonso) Una Maid en Manhattan (Maid In Manhattan) (2011-2012) - Carmen "La Nana" Llena de amor (Fill Me With Love) (2010) - Paula Mi pecado (Burden of Guilt) (2009) - Asuncion Verano de amor (Summer Of Love) (2009) - Pura Guerra El juramento (Secret Lies) (2008) - Silvia Pasión (Passion) (2007) - Criada Amarte así (Looking for Dad) (2005) - Evangelina Lizárraga El juego de la vida (The Game of Life) (2001) - Mercedes Pacheco Abrazame muy fuerte (Embrace Me) (2000) - Jacinta Rosalinda (1999) - Dolores Romero La mentira (Twisted Lies) (1998) - Irma Moguel La culpa (1996) - Lorena Alondra (1995) - Cecilia Buscando el paraíso (1994) - Elsa Mágica juventud (1992) Muchachitas (1991) - Verónica Cadenas de amargura (1991) - Martha Gastelum La hora marcada (episode "Por tu bien") - Carmen (1989) Simplemente María (1989) - Gabriela La Casa al Final de la Calle (1987) - Marina El Rincón de los Prodigios (1987) Aprendiendo a Vivir (1984) - Silvia Bella y Bestia (1979) Parecido al Amor(1979) Ángel Guerra (1979) - Dulcenombre Santa (1978) - Santa References External links Pagina de esmas.com Pagina de Alma-Latina.com 1949 births Living people Mexican telenovela actresses Mexican television actresses Mexican film actresses Actresses from New York City 20th-century Mexican actresses 21st-century Mexican actresses American actresses of Mexican descent American emigrants to Mexico
```xml export * from '../server/web/exports/index' ```
Potassium sulfide is an inorganic compound with the formula K2S. The colourless solid is rarely encountered, because it reacts readily with water, a reaction that affords potassium hydrosulfide (KSH) and potassium hydroxide (KOH). Most commonly, the term potassium sulfide refers loosely to this mixture, not the anhydrous solid. Structure It adopts "antifluorite structure," which means that the small K+ ions occupy the tetrahedral (F−) sites in fluorite, and the larger S2− centers occupy the eight-coordinate sites. Li2S, Na2S, and Rb2S crystallize similarly. Synthesis and reactions It can be produced by heating K2SO4 with carbon (coke): K2SO4 + 4 C → K2S + 4 CO In the laboratory, pure K2S may be prepared by the reaction of potassium and sulfur in anhydrous ammonia. Sulfide is highly basic, consequently K2S completely and irreversibly hydrolyzes in water according to the following equation: K2S + H2O → KOH + KSH For many purposes, this reaction is inconsequential since the mixture of SH− and OH− behaves as a source of S2−. Other alkali metal sulfides behave similarly. Use in fireworks Potassium sulfides are formed when black powder is burned and are important intermediates in many pyrotechnic effects, such as senko hanabi and some glitter formulations. See also Liver of sulfur References Potassium compounds Sulfides Inorganic compounds Fluorite crystal structure
Branding national myths and symbols (BNMS) is a field of research focusing on branding and marketing of a nation's myths and symbols. The research blends the theories of marketing, cultural communications, sociology, public relations, and semiotics. The awareness of a nation's (or a collective group's) internal myths and symbols may result in raising cultural relations between nations, according to this theory. The use dates from before the 1990, and field of study dates from about 2000, but was not given this moniker by a scholar until 2009. The principles of BNMS are related to, but are different from nation branding. The main difference between two principles is that nation branding is primarily concerned with raising the global image of a nation for better economic return, while BNMS is concerned with the revealing and demonstrating the meanings behind a nation's internal myths and symbols. In other words, nation branding is the selling or promotion of the external identity of a nation, while BNMS is the revealing of their internal identity, either for its own citizens to believe in, or to achieve better global relations between nations. According to the theory, each national myth and symbol has its own hidden meanings that may reinforce these misunderstandings between nations. Examples of BNMS include changing the symbols on currency, a national anthem (see, e.g., National Anthem Project by the United States), and advertising in political campaigns. Core concepts A national myth is an inspiring narrative or anecdote about a nation's past. Such myths often serve as an important national symbol and affirm a set of national values. A national myth may sometimes take the form of a national epic, part of the nation's civil religion, a legend or fictionalized narrative, which has been elevated to serious mythological, symbolical and esteemed level so as to be true to the nation. It might simply over-dramatize true incidents, omit important historical details, or add details for which there is no evidence; or it might simply be a fictional story that no one takes to be true literally, but contains a symbolic meaning for the nation. The national folklore of many nations includes a founding myth, which may involve a struggle against colonialism or a war of independence. National myths serve many social and political purposes, such as state-sponsored propaganda, or of inspiring civic virtue and self-sacrifice. In some cases, the meaning of the national myth may become disputed among different parts of the population, such as majority and minority groups, which makes branding and advertising of the national myth necessary. The World Intellectual Property Organization (WIPO) has conducted a number of symposia on the protection of folklore, i.e., "traditional cultural expressions", with the goal of preventing their "misappropriation" by branding, patenting, trademarking, or copyright by other persons. Recent examples A recent, clear example as of 2011 is the use of "Greco-Roman symbols merged into Christianity" on the Euro note. Many nations have put their national ideas on their money "via branding national myths and symbols." The image of the crowning Charlemagne is on a Euro note, because he is "accepted as the Father of Europe and thereby of the EU, with buildings and rooms named after him." The accepted "symbol for EU culture ... symbolises a Doric column ..." but does not necessarily represent Europe's other cultures (Norse, etc.). Ultimately, Europe is based on the myth of the demi-god Europa and many of its symbols are based on ancient Greek art forms. If Turkey joined the EU, the current images could be a source of conflict: Another example from 2011 is that of Japan's self-branding of its scientific expertise, which fell apart after the earthquake and tsunami that March, followed by the nuclear accidents. In The New York Times, Mitsuyoshi Numano wrote, "It even begins to appear that Japan’s vaunted scientific and technical prowess has taken on the character of a kind of myth, and that myth has deluded the nation’s politicians and business leaders." Research in the field Jonathan Rose first wrote about this concept in 2000, in which he claimed that Canada has had "an unholy alliance between advertising agencies and political parties" since the formation of the Confederation in 1867. In a 2003 article, Rose wrote that national myths and symbols reinforce and create a "community and binding [its citizens]. These myths are not judged on their veracity but rather [on] their metaphorical and symbolic meaning." Rose maintained that the messages within these "created" myths are disseminated and ultimately maintained through its "civil society from its institutions, public policies and government". His prototypical study was on the Canadian government's creation of national myths in the 1980s and 1990s. Rose pointed out what was unique (in the 1980s) several major points: "government advertising is used to create and develop national symbols and myths." that government used "advertising [that] centres around the existence of sub-national minorities," particularly to respond to threats from time to time of successionism in the province of Quebec, which could be generalized to other nations with vocal minorities. "advertising has become so pervasive in Canadian politics that issues requiring popular support are more than likely to be brought to the public directly through advertising campaigns." Branding National Myths and Symbols was first coined in 2009 by Turkish-Australian scholar Hatice Sitki, who proposed in Myths, Symbols and Branding: Turkish National Identity and the EU, that these long-existing myths keep us from truly understanding and working with the "other". Sitki proposes that cultural misunderstanding will continue between nations until they understand one another's cultural myths and symbols. Sitki explains in the Cyclical Formula "Us/Other+Other", how Turkey and the European Union can benefit by accepting that they have, and continue, to play a "triple role" to one another. BNMS argues that collective groups such as the EU do not need to be "branded" in order to improve their economic value. Rather, they need to be branded to achieve their cultural goal of moving from a "poly-cultural" society to becoming a "multicultural" society. One way for this to be achieved is for nations to realise and work with the hidden meanings of their myths and symbols. Vijay Prashad proposes that the concept of polyculturalism is a way to combat anti-racism. Prashad defines poly cultures as a "provisional concept grounded in antiracism, rather than in diversity..." Roger Hewitt takes a different approach to how peoples with different languages can understand each other. Hewitt argues that the concept of polyculturalism is "not intrinsically equal." The "national myths" used in Masterpiece Theatre lead to "strengthen[ing] imperial attitudes", according to a 2009 book about the spate of Victorian British novels made in films from the 1980s through the 21st Century, and sources it cited. Elizabeth Hafkin Pleck argues that the "invented tradition ... of Kwanzaa" was equivalent to the American Indian challenge to "the National myth of inclusion of Thanksgiving...." See also Euromyth Fortress Europe Index of public relations-related articles Music and political warfare National Anthem Project National branding National myth Propaganda Public diplomacy References Further reading Holt, D. B., "Jack Daniel's America, Iconic brands as ideological parasites and proselytizers", Journal of Consumer Culture, Sage Publications, London, 2006 Fan, Y., "Nation branding: what is being branded?", Journal of Vacation Marketing, 12:1, 5-14, 2006 Meike, E., and Spiekermann, M., "Nation Branding: San Marino developing into a brand", 2005 Weiner, E., National Public Radio's Day to Day, January 11, 2006 Gumbel, P., Time, May 29, 2005 Risen, C., "Branding Nations", The New York Times, December 11, 2005 Guerrini, S., "Designing Nationality: The production of image and identity by the Argentine State", University of Kent at Canterbury, 2008 Aronczyk, M., "Better Living through Branding: Nation Branding and National Formations", Routledge Companion to Advertising and Promotional Culture, Matt McAllister and Emily West (ed.), New York Routledge, 2010 Aronczyk, M., "Research in Brief. How do things with brands: Uses of National Identity", Canadian Journal of Communication, vol 34:291-296, 2009 Rose, J., "Government advertising and the creation of national myths: The Canadian case", International Journal of Nonprofit and Voluntary Sector Marketing, Vol. 8, No. 2:153-165, Henry Stewart Publishing, 2003 Olins, W., from www.wallyolins.com/includes/branding.pdf Olins, W., "Branding the nation – the historical context". Journal of Brand Management, Vol 9:4-5, 2002 Danser, S., "The Myths of Reality", Alternative Albion, Loughborough (UK), 2005 Endo, R., "Everybody was Kung Fu Fighting: Afro-Asian connections and the myth of racial purity", by Vijay Prashard, International Migration Review, vol. 37, No. 4, The Future of the Second Generation: The Integration of Migrant Youth in Six European Countries (Winter) 1313–1314, 2003 Hewitt, R., "Language, Youth and the destabilisation of ethnicity", published in R Harris and B Rampton (eds.), The Language, Ethnicity and Race Reader, Routledge, London, 2003 Sitki, H., "Myths, Symbols and Branding: Turkish National Identity and the EU", VDM, Dr. Muller Aktiengesellschaft & Co. KG, 2009 External links Nation-branding website Forbes magazine listing of the world's most well-liked countries Human communication Political campaign techniques Public relations Semiotics Diplomacy International relations Brand management National symbols Mythology Propaganda
```go // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package gen import ( "bytes" "encoding/gob" "fmt" "hash" "hash/fnv" "io" "log" "os" "reflect" "strings" "unicode" "unicode/utf8" ) // This file contains utilities for generating code. // TODO: other write methods like: // - slices, maps, types, etc. // CodeWriter is a utility for writing structured code. It computes the content // hash and size of written content. It ensures there are newlines between // written code blocks. type CodeWriter struct { buf bytes.Buffer Size int Hash hash.Hash32 // content hash gob *gob.Encoder // For comments we skip the usual one-line separator if they are followed by // a code block. skipSep bool } func (w *CodeWriter) Write(p []byte) (n int, err error) { return w.buf.Write(p) } // NewCodeWriter returns a new CodeWriter. func NewCodeWriter() *CodeWriter { h := fnv.New32() return &CodeWriter{Hash: h, gob: gob.NewEncoder(h)} } // WriteGoFile appends the buffer with the total size of all created structures // and writes it as a Go file to the the given file with the given package name. func (w *CodeWriter) WriteGoFile(filename, pkg string) { f, err := os.Create(filename) if err != nil { log.Fatalf("Could not create file %s: %v", filename, err) } defer f.Close() if _, err = w.WriteGo(f, pkg); err != nil { log.Fatalf("Error writing file %s: %v", filename, err) } } // WriteGo appends the buffer with the total size of all created structures and // writes it as a Go file to the the given writer with the given package name. func (w *CodeWriter) WriteGo(out io.Writer, pkg string) (n int, err error) { sz := w.Size w.WriteComment("Total table size %d bytes (%dKiB); checksum: %X\n", sz, sz/1024, w.Hash.Sum32()) defer w.buf.Reset() return WriteGo(out, pkg, w.buf.Bytes()) } func (w *CodeWriter) printf(f string, x ...interface{}) { fmt.Fprintf(w, f, x...) } func (w *CodeWriter) insertSep() { if w.skipSep { w.skipSep = false return } // Use at least two newlines to ensure a blank space between the previous // block. WriteGoFile will remove extraneous newlines. w.printf("\n\n") } // WriteComment writes a comment block. All line starts are prefixed with "//". // Initial empty lines are gobbled. The indentation for the first line is // stripped from consecutive lines. func (w *CodeWriter) WriteComment(comment string, args ...interface{}) { s := fmt.Sprintf(comment, args...) s = strings.Trim(s, "\n") // Use at least two newlines to ensure a blank space between the previous // block. WriteGoFile will remove extraneous newlines. w.printf("\n\n// ") w.skipSep = true // strip first indent level. sep := "\n" for ; len(s) > 0 && (s[0] == '\t' || s[0] == ' '); s = s[1:] { sep += s[:1] } strings.NewReplacer(sep, "\n// ", "\n", "\n// ").WriteString(w, s) w.printf("\n") } func (w *CodeWriter) writeSizeInfo(size int) { w.printf("// Size: %d bytes\n", size) } // WriteConst writes a constant of the given name and value. func (w *CodeWriter) WriteConst(name string, x interface{}) { w.insertSep() v := reflect.ValueOf(x) switch v.Type().Kind() { case reflect.String: // See golang.org/issue/13145. const arbitraryCutoff = 16 if v.Len() > arbitraryCutoff { w.printf("var %s %s = ", name, typeName(x)) } else { w.printf("const %s %s = ", name, typeName(x)) } w.WriteString(v.String()) w.printf("\n") default: w.printf("const %s = %#v\n", name, x) } } // WriteVar writes a variable of the given name and value. func (w *CodeWriter) WriteVar(name string, x interface{}) { w.insertSep() v := reflect.ValueOf(x) oldSize := w.Size sz := int(v.Type().Size()) w.Size += sz switch v.Type().Kind() { case reflect.String: w.printf("var %s %s = ", name, typeName(x)) w.WriteString(v.String()) case reflect.Struct: w.gob.Encode(x) fallthrough case reflect.Slice, reflect.Array: w.printf("var %s = ", name) w.writeValue(v) w.writeSizeInfo(w.Size - oldSize) default: w.printf("var %s %s = ", name, typeName(x)) w.gob.Encode(x) w.writeValue(v) w.writeSizeInfo(w.Size - oldSize) } w.printf("\n") } func (w *CodeWriter) writeValue(v reflect.Value) { x := v.Interface() switch v.Kind() { case reflect.String: w.WriteString(v.String()) case reflect.Array: // Don't double count: callers of WriteArray count on the size being // added, so we need to discount it here. w.Size -= int(v.Type().Size()) w.writeSlice(x, true) case reflect.Slice: w.writeSlice(x, false) case reflect.Struct: w.printf("%s{\n", typeName(v.Interface())) t := v.Type() for i := 0; i < v.NumField(); i++ { w.printf("%s: ", t.Field(i).Name) w.writeValue(v.Field(i)) w.printf(",\n") } w.printf("}") default: w.printf("%#v", x) } } // WriteString writes a string literal. func (w *CodeWriter) WriteString(s string) { io.WriteString(w.Hash, s) // content hash w.Size += len(s) const maxInline = 40 if len(s) <= maxInline { w.printf("%q", s) return } // We will render the string as a multi-line string. const maxWidth = 80 - 4 - len(`"`) - len(`" +`) // When starting on its own line, go fmt indents line 2+ an extra level. n, max := maxWidth, maxWidth-4 // Print "" +\n, if a string does not start on its own line. b := w.buf.Bytes() if p := len(bytes.TrimRight(b, " \t")); p > 0 && b[p-1] != '\n' { w.printf("\"\" + // Size: %d bytes\n", len(s)) n, max = maxWidth, maxWidth } w.printf(`"`) for sz, p := 0, 0; p < len(s); { var r rune r, sz = utf8.DecodeRuneInString(s[p:]) out := s[p : p+sz] chars := 1 if !unicode.IsPrint(r) || r == utf8.RuneError { switch sz { case 1: out = fmt.Sprintf("\\x%02x", s[p]) case 2, 3: out = fmt.Sprintf("\\u%04x", r) case 4: out = fmt.Sprintf("\\U%08x", r) } chars = len(out) } if n -= chars; n < 0 { w.printf("\" +\n\"") n = max - len(out) } w.printf("%s", out) p += sz } w.printf(`"`) } // WriteSlice writes a slice value. func (w *CodeWriter) WriteSlice(x interface{}) { w.writeSlice(x, false) } // WriteArray writes an array value. func (w *CodeWriter) WriteArray(x interface{}) { w.writeSlice(x, true) } func (w *CodeWriter) writeSlice(x interface{}, isArray bool) { v := reflect.ValueOf(x) w.gob.Encode(v.Len()) w.Size += v.Len() * int(v.Type().Elem().Size()) name := typeName(x) if isArray { name = fmt.Sprintf("[%d]%s", v.Len(), name[strings.Index(name, "]")+1:]) } if isArray { w.printf("%s{\n", name) } else { w.printf("%s{ // %d elements\n", name, v.Len()) } switch kind := v.Type().Elem().Kind(); kind { case reflect.String: for _, s := range x.([]string) { w.WriteString(s) w.printf(",\n") } case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: // nLine and nBlock are the number of elements per line and block. nLine, nBlock, format := 8, 64, "%d," switch kind { case reflect.Uint8: format = "%#02x," case reflect.Uint16: format = "%#04x," case reflect.Uint32: nLine, nBlock, format = 4, 32, "%#08x," case reflect.Uint, reflect.Uint64: nLine, nBlock, format = 4, 32, "%#016x," case reflect.Int8: nLine = 16 } n := nLine for i := 0; i < v.Len(); i++ { if i%nBlock == 0 && v.Len() > nBlock { w.printf("// Entry %X - %X\n", i, i+nBlock-1) } x := v.Index(i).Interface() w.gob.Encode(x) w.printf(format, x) if n--; n == 0 { n = nLine w.printf("\n") } } w.printf("\n") case reflect.Struct: zero := reflect.Zero(v.Type().Elem()).Interface() for i := 0; i < v.Len(); i++ { x := v.Index(i).Interface() w.gob.EncodeValue(v) if !reflect.DeepEqual(zero, x) { line := fmt.Sprintf("%#v,\n", x) line = line[strings.IndexByte(line, '{'):] w.printf("%d: ", i) w.printf(line) } } case reflect.Array: for i := 0; i < v.Len(); i++ { w.printf("%d: %#v,\n", i, v.Index(i).Interface()) } default: panic("gen: slice elem type not supported") } w.printf("}") } // WriteType writes a definition of the type of the given value and returns the // type name. func (w *CodeWriter) WriteType(x interface{}) string { t := reflect.TypeOf(x) w.printf("type %s struct {\n", t.Name()) for i := 0; i < t.NumField(); i++ { w.printf("\t%s %s\n", t.Field(i).Name, t.Field(i).Type) } w.printf("}\n") return t.Name() } // typeName returns the name of the go type of x. func typeName(x interface{}) string { t := reflect.ValueOf(x).Type() return strings.Replace(fmt.Sprint(t), "main.", "", 1) } ```
```javascript ace.define("ace/theme/nord_dark.css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-nord-dark .ace_gutter {\n color: #616e88;\n}\n\n.ace-nord-dark .ace_print-margin {\n width: 1px;\n background: #4c566a;\n}\n\n.ace-nord-dark {\n background-color: #2e3440;\n color: #d8dee9;\n}\n\n.ace-nord-dark .ace_entity.ace_other.ace_attribute-name,\n.ace-nord-dark .ace_storage {\n color: #d8dee9;\n}\n\n.ace-nord-dark .ace_cursor {\n color: #d8dee9;\n}\n\n.ace-nord-dark .ace_string.ace_regexp {\n color: #bf616a;\n}\n\n.ace-nord-dark .ace_marker-layer .ace_active-line {\n background: #434c5ecc;\n}\n.ace-nord-dark .ace_marker-layer .ace_selection {\n background: #434c5ecc;\n}\n\n.ace-nord-dark.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #2e3440;\n}\n\n.ace-nord-dark .ace_marker-layer .ace_step {\n background: #ebcb8b;\n}\n\n.ace-nord-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #88c0d066;\n}\n\n.ace-nord-dark .ace_gutter-active-line {\n background-color: #434c5ecc;\n}\n\n.ace-nord-dark .ace_marker-layer .ace_selected-word {\n border: 1px solid #88c0d066;\n}\n\n.ace-nord-dark .ace_invisible {\n color: #4c566a;\n}\n\n.ace-nord-dark .ace_keyword,\n.ace-nord-dark .ace_meta,\n.ace-nord-dark .ace_support.ace_class,\n.ace-nord-dark .ace_support.ace_type {\n color: #81a1c1;\n}\n\n.ace-nord-dark .ace_constant.ace_character,\n.ace-nord-dark .ace_constant.ace_other {\n color: #d8dee9;\n}\n\n.ace-nord-dark .ace_constant.ace_language {\n color: #5e81ac;\n}\n\n.ace-nord-dark .ace_constant.ace_escape {\n color: #ebcB8b;\n}\n\n.ace-nord-dark .ace_constant.ace_numeric {\n color: #b48ead;\n}\n\n.ace-nord-dark .ace_fold {\n background-color: #4c566a;\n border-color: #d8dee9;\n}\n\n.ace-nord-dark .ace_entity.ace_name.ace_function,\n.ace-nord-dark .ace_entity.ace_name.ace_tag,\n.ace-nord-dark .ace_support.ace_function,\n.ace-nord-dark .ace_variable,\n.ace-nord-dark .ace_variable.ace_language {\n color: #8fbcbb;\n}\n\n.ace-nord-dark .ace_string {\n color: #a3be8c;\n}\n\n.ace-nord-dark .ace_comment {\n color: #616e88;\n}\n\n.ace-nord-dark .ace_indent-guide {\n box-shadow: inset -1px 0 0 0 #434c5eb3;\n}\n\n.ace-nord-dark .ace_indent-guide-active {\n box-shadow: inset -1px 0 0 0 #8395b8b3;\n}\n"; }); ace.define("ace/theme/nord_dark",["require","exports","module","ace/theme/nord_dark.css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; exports.cssClass = "ace-nord-dark"; exports.cssText = require("./nord_dark.css"); exports.$selectionColorConflict = true; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass, false); }); (function() { ace.require(["ace/theme/nord_dark"], function(m) { if (typeof module == "object" && typeof exports == "object" && module) { module.exports = m; } }); })(); ```
```go package event import ( "testing" "time" ) func TestNew(t *testing.T) { bus := New() if bus == nil { t.Log("New EventBus not created!") t.Fail() } } func TestHasCallback(t *testing.T) { bus := New() bus.Subscribe("topic", func() {}) if bus.HasCallback("topic_topic") { t.Fail() } if !bus.HasCallback("topic") { t.Fail() } } func TestSubscribe(t *testing.T) { bus := New() if bus.Subscribe("topic", func() {}) != nil { t.Fail() } if bus.Subscribe("topic", "String") == nil { t.Fail() } } func TestSubscribeOnce(t *testing.T) { bus := New() if bus.SubscribeOnce("topic", func() {}) != nil { t.Fail() } if bus.SubscribeOnce("topic", "String") == nil { t.Fail() } } func TestSubscribeOnceAndManySubscribe(t *testing.T) { bus := New() event := "topic" flag := 0 fn := func() { flag += 1 } bus.SubscribeOnce(event, fn) bus.Subscribe(event, fn) bus.Subscribe(event, fn) bus.Publish(event) if flag != 3 { t.Fail() } } func TestUnsubscribe(t *testing.T) { bus := New() handler := func() {} bus.Subscribe("topic", handler) if bus.Unsubscribe("topic", handler) != nil { t.Fail() } if bus.Unsubscribe("topic", handler) == nil { t.Fail() } } func TestPublish(t *testing.T) { bus := New() bus.Subscribe("topic", func(a int, b int) { if a != b { t.Fail() } }) bus.Publish("topic", 10, 10) } func TestSubcribeOnceAsync(t *testing.T) { results := make([]int, 0) bus := New() bus.SubscribeOnceAsync("topic", func(a int, out *[]int) { *out = append(*out, a) }) bus.Publish("topic", 10, &results) bus.Publish("topic", 10, &results) bus.WaitAsync() if len(results) != 1 { t.Fail() } if bus.HasCallback("topic") { t.Fail() } } func TestSubscribeAsyncTransactional(t *testing.T) { results := make([]int, 0) bus := New() bus.SubscribeAsync("topic", func(a int, out *[]int, dur string) { sleep, _ := time.ParseDuration(dur) time.Sleep(sleep) *out = append(*out, a) }, true) bus.Publish("topic", 1, &results, "1s") bus.Publish("topic", 2, &results, "0s") bus.WaitAsync() if len(results) != 2 { t.Fail() } if results[0] != 1 || results[1] != 2 { t.Fail() } } func TestSubscribeAsync(t *testing.T) { results := make(chan int) bus := New() bus.SubscribeAsync("topic", func(a int, out chan<- int) { out <- a }, false) bus.Publish("topic", 1, results) bus.Publish("topic", 2, results) numResults := 0 go func() { for _ = range results { numResults++ } }() bus.WaitAsync() time.Sleep(10 * time.Millisecond) if numResults != 2 { t.Fail() } } ```
```smalltalk using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Ombi.Helpers; using TraktSharp; using TraktSharp.Entities; using TraktSharp.Enums; namespace Ombi.Api.Trakt { public class TraktApi : ITraktApi { private TraktClient Client { get; } private static readonly string Encrypted = "your_sha512_hash=="; private readonly string _apiKey = StringCipher.DecryptString(Encrypted, "ApiKey"); public TraktApi() { Client = new TraktClient { Authentication = { ClientId = _apiKey, ClientSecret = your_sha256_hash } }; } public async Task<IEnumerable<TraktShow>> GetPopularShows(int? page = null, int? limitPerPage = null) { var popular = await Client.Shows.GetPopularShowsAsync(TraktExtendedOption.Full, page, limitPerPage); return popular; } public async Task<IEnumerable<TraktShow>> GetTrendingShows(int? page = null, int? limitPerPage = null) { var trendingShowsTop10 = await Client.Shows.GetTrendingShowsAsync(TraktExtendedOption.Full, page, limitPerPage); return trendingShowsTop10.Select(x => x.Show); } public async Task<IEnumerable<TraktShow>> GetAnticipatedShows(int? page = null, int? limitPerPage = null) { var anticipatedShows = await Client.Shows.GetAnticipatedShowsAsync(TraktExtendedOption.Full, page, limitPerPage); return anticipatedShows.Select(x => x.Show); } public async Task<TraktShow> GetTvExtendedInfo(string imdbId) { try { return await Client.Shows.GetShowAsync(imdbId, TraktExtendedOption.Full); } catch (Exception e) { // Ignore the exception since the information returned from this API is optional. Console.WriteLine($"Failed to retrieve extended tv information from Trakt. IMDbId: '{imdbId}'."); Console.WriteLine(e); } return null; } } } ```
Admiral of the Blue Edward Boscawen, PC (19 August 171110 January 1761) was a British admiral in the Royal Navy and Member of Parliament for the borough of Truro, Cornwall, England. He is known principally for his various naval commands during the 18th century and the engagements that he won, including the siege of Louisburg in 1758 and Battle of Lagos in 1759. He is also remembered as the officer who signed the warrant authorising the execution of Admiral John Byng in 1757, for failing to engage the enemy at the Battle of Minorca (1756). In his political role, he served as a Member of Parliament for Truro from 1742 until his death although due to almost constant naval employment he seems not to have been particularly active. He also served as one of the Lords Commissioners of the Admiralty on the Board of Admiralty from 1751 and as a member of the Privy Council from 1758 until his death in 1761. Early life The Honourable Edward Boscawen was born in Tregothnan, Cornwall, England, on 19 August 1711, the third son of Hugh Boscawen, 1st Viscount Falmouth (1680–1734) by his wife Charlotte Godfrey (died 1754) elder daughter and co-heiress of Colonel Charles Godfrey, master of the jewel office by his wife Arabella Churchill, the King's mistress, and sister of John Churchill, 1st Duke of Marlborough. The young Edward joined the navy at the age of 12 aboard of 60 guns. Superb was sent to the West Indies with Admiral Francis Hosier. Boscawen stayed with Superb for three years during the Anglo-Spanish War. He was subsequently reassigned to , , and under Admiral Sir Charles Wager and was aboard Namur when she sailed into Cadiz and Livorno following the Treaty of Seville that ended hostilities between Britain and Spain. On 25 May 1732 Boscawen was promoted lieutenant and in the August of the same year rejoined his old ship the 44-gun fourth-rate Hector in the Mediterranean. He remained with her until 16 October 1735 when he was promoted to the 70-gun . On 12 March 1736 Boscawen was promoted by Admiral Sir John Norris to the temporary command of the 50-gun . His promotion was confirmed by the Board of Admiralty. In June 1738 Boscawen was given command of , a small sixth-rate of 20 guns. He was ordered to accompany Admiral Edward Vernon to the West Indies in preparation for the oncoming war with Spain. War of Jenkins' Ear Porto Bello The War of Jenkins' Ear proved to be Boscawen's first opportunity for action and when Shoreham was declared unfit for service he volunteered to accompany Vernon and the fleet sent to attack Porto Bello. During the siege, Boscawen was ordered with Sir Charles Knowles to destroy the forts. The task took three weeks and 122 barrels of gunpowder to accomplish but the British levelled the forts surrounding the town. Vernon's achievement was hailed in Britain as an outstanding feat of arms and in the furore that surrounded the announcement the patriotic song "Rule, Britannia" was played for the first time. Streets were named after Porto Bello throughout Britain and its colonies. When the fleet returned to Port Royal, Jamaica Shoreham had been refitted and Boscawen resumed command of her. Cartagena In 1741 Boscawen was part of the fleet sent to attack another Caribbean port, Cartagena de Indias. Large reinforcements had been sent from Britain, including 8,000 soldiers who were landed to attack the chain of fortresses surrounding the Spanish colonial city. The Spanish had roughly 6,000 troops made up of regular soldiers, sailors and local loyalist natives. The siege lasted for over two months during which period the British troops suffered over 18,000 casualties, the vast majority from disease. Vernon's fleet suffered from dysentery, scurvy, yellow fever and other illnesses that were widespread throughout the Caribbean during the period. As a result of the battle Prime Minister Robert Walpole's government collapsed and George II removed his promise of support to the Austrians if the Prussians advanced into Silesia. The defeat of Vernon was a contributing factor to the increased hostilities of the War of the Austrian Succession. Boscawen had however distinguished himself once more. The land forces that he commanded had been instrumental in capturing Fort San Luis and Boca Chica Castle, and together with Knowles he destroyed the captured forts when the siege was abandoned. For his services he was promoted in May 1742 to the rank of captain and appointed to command the 70-gun Prince Frederick to replace Lord Aubrey Beauclerk who had died during the siege. War of the Austrian Succession In 1742 Boscawen returned in Prince Frederick to England, where she was paid off and Boscawen joined the fleet commanded by Admiral Norris in the newly built 60-gun . In the same year he was returned as a Member of Parliament for Truro, a position he held until his death. At the 1747 general election he was also returned for Saltash, but chose to continue to sit for Truro. In 1744 the French attempted an invasion of England and Boscawen was with the fleet under Admiral Norris when the French fleet were sighted. The French under Admiral Rocquefeuil retreated and the British attempts to engage were confounded by a violent storm that swept the English Channel. Whilst cruising the Channel, Boscawen had the good fortune to capture the French frigate . She was the first capture of an enemy ship made during the War of Austrian Succession and was commanded by M. de Hocquart. Médée was sold and became a successful privateer under her new name Boscawen commanded by George Walker. At the end of 1744 Boscawen was given command of , guard ship at the Nore anchorage. He commanded her until 1745 when he was appointed to another of his old ships, HMS Namur, that had been reduced (razéed) from 90 guns to 74 guns. He was appointed to command a small squadron under Vice-Admiral Martin in the Channel. First Battle of Cape Finisterre In 1747 Boscawen was ordered to join Admiral Anson and took an active part in the first Battle of Cape Finisterre. The British fleet sighted the French fleet on 3 May. The French fleet under Admiral de la Jonquière was convoying its merchant fleet to France and the British attacked. The French fleet was almost completely annihilated with all but two of the escorts taken and six merchantmen. Boscawen was injured in the shoulder during the battle by a musket ball. Once more the French captain, M. de Hocquart became Boscawen's prisoner and was taken to England. Command in India Boscawen was promoted rear-admiral of the blue on 15 July 1747 and was appointed to command a joint operation being sent to the East Indies. With his flag in Namur, and with five other line of battle ships, a few smaller men of war, and a number of transports Boscawen sailed from England on 4 November 1747. On the outward voyage Boscawen made an abortive attempt to capture Mauritius by surprise but was driven off by French forces. Boscawen continued on arriving at Fort St. David near the town of Cuddalore on 29 July 1748 and took over command from Admiral Griffin. Boscawen had been ordered to capture and destroy the main French settlement in India at Pondichéry. Factors such as Boscawen's lack of knowledge and experience of land offensives, the failings of the engineers and artillery officers under his command, a lack of secrecy surrounding the operation and the skill of the French governor Joseph François Dupleix combined to thwart the attack. The British forces amounting to some 5,000 men captured and destroyed the outlying fort of Aranciopang. This capture was the only success of the operation and after failing to breach the walls of the city the British forces withdrew. Amongst the combatants were a young ensign Robert Clive, later known as Clive of India and Major Stringer Lawrence, later Commander-in-Chief, India. Lawrence was captured by the French during the retreat and exchanged after the news of the Treaty of Aix-la-Chapelle had reached India. Over the monsoon season Boscawen remained at Fort St David. Fortunately, for the Admiral and his staff, when a storm hit the British outpost Boscawen was ashore but his flagship Namur went down with over 600 men aboard. Boscawen returned to England in 1750. In 1751 Anson became First Lord of the Admiralty and asked Boscawen to serve on the Admiralty Board. Boscawen remained one of the Lord Commissioners of the Admiralty until his death. Seven Years' War On 4 February 1755 Boscawen was promoted vice admiral and given command of a squadron on the North American Station. A squadron of partially disarmed French ships of the line were dispatched to Canada loaded with reinforcements and Boscawen was ordered to intercept them. The French ambassador to London, the Duc de Mirepoix had informed the government of George II that any act of hostility taken by British ships would be considered an act of war. Thick fog both obstructed Boscawen's reconnaissance and scattered the French ships, but on 8 June Boscawen's squadron sighted the Alcide, Lys and Dauphin Royal off Cape Ray off Newfoundland. In the ensuing engagement the British captured the Alcide and Lys but the Dauphin Royal escaped into the fog. Amongst the 1,500 men made prisoner was the captain of the Alcide. For M. de Hocquart it was the third time that Boscawen had fought him and taken his ship. Pay amounting to £80,000 was captured aboard the Lys. Boscawen, as vice-admiral commanding the squadron, would have been entitled to a sizeable share in the prize money. The British squadron headed for Halifax to regroup but a fever spread through the ships and the Vice-admiral was forced to return to England. Boscawen returned to the Channel Fleet and was commander-in-chief Portsmouth during the trial of Admiral John Byng. Boscawen signed the order of execution after the King had refused to grant the unfortunate admiral a pardon. Boscawen was advanced to Senior Naval Lord on the Admiralty Board in November 1756 but then stood down (as Senior Naval Lord although he remained on the Board) in April 1757, during the caretaker ministry, before being advanced to Senior Naval Lord again in July 1757. Siege of Louisburg In October 1757 Boscawen was second in command under Admiral Edward Hawke. On 7 February 1758 Boscawen was promoted to Admiral of the blue squadron. and ordered to take a fleet to North America. Once there, he took naval command at the siege of Louisburg during June and July 1758. On this occasion rather than entrust the land assault to a naval commander, the army was placed under the command of General Jeffrey Amherst and Brigadier James Wolfe. The siege of Louisburg was one of the key contributors to the capture of French possessions in Canada. Wolfe later would use Louisburg as a staging point for the siege of Quebec. The capture of the town took away from the French the only effective naval base that they had in Canada, as well as leading to the destruction of four of their ships of the line and the capture of another. On his return from North America Boscawen was awarded the Thanks of both Houses of Parliament for his service. The King made Boscawen a Privy Counsellor in recognition for his continued service both as a member of the Board of Admiralty and commander-in-chief. Battle of Lagos In April 1759 Boscawen took command of a fleet bound for the Mediterranean. His aim was to prevent another planned invasion of Britain by the French. With his flag aboard the newly constructed of 90 guns he blockaded Toulon and kept the fleet of Admiral de le Clue-Sabran in port. In order to tempt the French out of port, Boscawen sent three of his ships to bombard the port. The guns of the batteries surrounding the town drove off the British ships. Having sustained damage in the action and due to the constant weathering of ships on blockade duty Boscawen took his fleet to Gibraltar to refit and resupply. On 17 August a frigate that had been ordered to watch the Straits of Gibraltar signalled that the French fleet were in sight. Boscawen took his available ships to sea to engage de la Clue. During the night the British chased the French fleet and five of de la Clue's ships managed to separate from the fleet and escape. The others were driven in to a bay near Lagos, Portugal. The British overhauled the remaining seven ships of the French fleet and engaged. The French line of battle ship began a duel with Namur but was outgunned and struck her colours. The damage aboard Namur forced Boscawen to shift his flag to of 80 guns. Whilst transferring between ships, the small boat that Boscawen was in was hit by an enemy cannonball. Boscawen took off his wig and plugged the hole. Two more French ships, and escaped during the second night and on the morning of 19 August the British captured and and drove the French flagship and ashore where they foundered and were set on fire by their crews to stop the British from taking them off and repairing them. The five French ships that avoided the battle made their way to Cadiz where Boscawen ordered Admiral Thomas Broderick to blockade the port. Final years, death, and legacy Boscawen returned to England, where he was promoted General of Marines in recognition of his service. He was given the Freedom of the City of Edinburgh. Admiral Boscawen returned to sea for the final time and took his station off the west coast of France around Quiberon Bay. After a violent attack of what was later diagnosed as Typhoid fever, the Admiral came ashore, where, on 10 January 1761, he died at his home in Hatchlands Park in Surrey. His body was taken to St. Michael's Church in St Michael Penkevil, Cornwall, where he was buried. The monument was designed by Robert Adam and sculpted by John Michael Rysbrack. The monument at the church begins: Here lies the Right HonourableEdward Boscawen,Admiral of the Blue, General of Marines,Lord of the Admiralty, and one of hisMajesty's most Honourable Privy Council.His birth, though noble,His titles, though illustrious,Were but incidental additions to his greatness. William Pitt, 1st Earl of Chatham and Prime Minister once said to Boscawen: "When I apply to other Officers respecting any expedition I may chance to project, they always raise difficulties, you always find expedients." Legacy The town of Boscawen, New Hampshire is named after him. Two ships and a stone frigate of the Royal Navy have borne the name HMS Boscawen, after Admiral Boscawen, whilst another ship was planned but the plans were shelved before she was commissioned. The stone frigate was a training base for naval cadets and in consequence three ships were renamed HMS Boscawen whilst being used as the home base for the training establishment. Quotes Boscawen was quoted as saying "To be sure I lose the fruits of the earth, but then, I am gathering the flowers of the Sea" (1756) and "Never fire, my lads, till you see the whites of the Frenchmen's eyes." Frances Evelyn Boscawen In 1742 Boscawen married Frances Evelyn Glanville (1719–1805), with whom he had three sons and two daughters, and who became an important hostess of Bluestocking meetings after his death. The older daughter Frances married John Leveson-Gower, and the younger, Elizabeth married Henry Somerset, 5th Duke of Beaufort. References Sources External links History of War – Siege of Louisburg 1758 History of War – Battle of Lagos National Trust – Hatchlands Park Oxford Dictionary of National Biography entry for Edward Boscawen Tregothnan Estate, Cornwall Biography at the Dictionary of Canadian Biography Online |- |- 1711 births 1761 deaths Younger sons of viscounts Royal Navy admirals Lords of the Admiralty British military personnel of the French and Indian War Royal Navy personnel of the War of the Austrian Succession Members of the Privy Council of Great Britain Members of the Parliament of Great Britain for Truro British MPs 1741–1747 British MPs 1747–1754 British MPs 1754–1761 Burials in Cornwall Edward 18th-century English politicians Sailors from Cornwall British military personnel of the Anglo-Spanish War (1727–1729) Royal Navy personnel of the Seven Years' War People of Father Le Loutre's War
```shell #!/usr/bin/env bats # vim: set syntax=sh: load helpers function setup() { if is_cgroup_v2; then skip "not yet supported on cgroup2" fi export activation="cpu-load-balancing.crio.io" export prefix="io.openshift.workload.management" setup_test sboxconfig="$TESTDIR/sbox.json" ctrconfig="$TESTDIR/ctr.json" shares="1024" export cpuset="0-1" create_workload "$shares" "$cpuset" } function teardown() { cleanup_test } function create_workload() { local cpushares="$1" local cpuset="$2" cat << EOF > "$CRIO_CONFIG_DIR/01-workload.conf" [crio.runtime.workloads.management] activation_annotation = "$activation" annotation_prefix = "$prefix" allowed_annotations = ["$activation"] [crio.runtime.workloads.management.resources] cpushares = $cpushares cpuset = "$cpuset" EOF } function check_sched_load_balance() { local ctr_id="$1" local is_enabled="$2" set_container_pod_cgroup_root "cpuset" "$ctr_id" cgroup_file="cpuset.sched_load_balance" [[ $(cat "$CTR_CGROUP"/"$cgroup_file") == "$is_enabled" ]] if [[ "$CONTAINER_DEFAULT_RUNTIME" == "crun" ]]; then [[ $(cat "$CTR_CGROUP"/container/"$cgroup_file") == "$is_enabled" ]] fi } # Verify the pre start runtime handler hooks run when triggered by annotation and workload. @test "test cpu load balancing" { start_crio # first, create a container with load balancing disabled jq --arg act "$activation" --arg set "$cpuset" \ ' .annotations[$act] = "true" | .linux.resources.cpuset_cpus= $set' \ "$TESTDATA"/sandbox_config.json > "$sboxconfig" jq --arg act "$activation" --arg set "$cpuset" \ ' .annotations[$act] = "true" | .linux.resources.cpuset_cpus = $set' \ "$TESTDATA"/container_sleep.json > "$ctrconfig" ctr_id=$(crictl run "$ctrconfig" "$sboxconfig") # check for sched_load_balance check_sched_load_balance "$ctr_id" 0 # disabled } # Verify the post stop runtime handler hooks run when a container is stopped manually. @test "test cpu load balance disabled on manual stop" { start_crio ctr_id=$(crictl run "$TESTDATA"/container_sleep.json "$TESTDATA"/sandbox_config.json) # check for sched_load_balance check_sched_load_balance "$ctr_id" 1 # enabled # check sched_load_balance is disabled after container stopped crictl stop "$ctr_id" check_sched_load_balance "$ctr_id" 0 # disabled } # Verify the post stop runtime handler hooks run when a container exits on its own. @test "test cpu load balance disabled on container exit" { start_crio jq ' .command = ["/bin/sh", "-c", "sleep 5 && exit 0"]' \ "$TESTDATA"/container_config.json > "$ctrconfig" ctr_id=$(crictl run "$ctrconfig" "$TESTDATA"/sandbox_config.json) # wait until container exits naturally sleep 10 # check for sched_load_balance check_sched_load_balance "$ctr_id" 0 # disabled } ```
Francis J. Gorman (November 19, 1924 — July 8, 1987) was an American Democratic Party politician who served seven terms in the New Jersey General Assembly. Born on November 19, 1924, in Gloucester City, New Jersey, Gorman graduated from Gloucester Catholic High School in 1942. Gorman served in the United States Navy during World War II and the Korean War. Gorman graduated from La Salle College in 1949. From 1953 to 1957, Gorman served on the Gloucester City Council. Then he served as the Gloucester City treasurer and as the custodian of funds for the Gloucester City Public Schools. Gorman served with Kenneth A. Gewertz from 1972 to 1974 representing District 3B in the New Jersey General Assembly. When the New Jersey Legislature was reorganized into its current structure of 40 districts, Gorman and Gewertz were elected to three terms representing the 4th Legislative District from 1974 to 1980. In 1979, James Florio, then a Congressman, encouraged Daniel Dalton and Dennis L. Riley to run in the June primary under the label of the "Florio Democratic Team" against incumbents Gewertz and Gorman, who had the support of Angelo Errichetti and the Camden County Democratic Organization. Dalton (with 31.3% of the vote) and Riley (with 28.3%) won the two ballot spots in the primary balloting. Dalton and Riley were elected in the November 1979 general election. He was elected together with Wayne R. Bryant and represented the 5th Legislative District from 1982 until March 16, 1987, when Gorman resigned from the New Jersey General Assembly because of poor health. In a July 1987 special election, Joseph J. Roberts was chosen to fill Gorman's vacant seat. He died at a hospital in Gloucester City, New Jersey. References 1924 births 1987 deaths People from Gloucester City, New Jersey Politicians from Camden County, New Jersey La Salle University alumni Businesspeople from New Jersey Gloucester Catholic High School alumni Democratic Party members of the New Jersey General Assembly New Jersey city council members School board members in New Jersey 20th-century American politicians 20th-century American businesspeople
Club de Futbol Peralada is a Spanish football team based in Peralada, in Province of Girona of the autonomous community of Catalonia. Founded in 1915, it plays in , holding home matches at Municipal de Peralada with a capacity of 1,500 seats. The club has acted as a reserve team of Girona FC from 2016 to 2019, with the name of Peralada-Girona B. History Peralada was founded in 1915 as a local community team, assembled simply to play friendly matches against other village teams in the area. The club eventually took the name Club Deportiu Peralada (Sports Club Peralada) in 1936, under the leadership of their first President, Martí Roca. At the time, their shirt was blue and they played games in a field owned by one Miquel Pujol, a site which has now been partially converted into a cafe. During the upheaval of the Spanish Civil War the club took the decision to cease operations, only resuming sporting activities in 1950. The following year, the team moved to the Camp de Cal Músic, on land rented from the municipal government. In 1981, the city council purchased the land which was to become their present stadium. Lack of funds prevented the site from being fully completed until 1992, however, when the Suqué-Mateu family - owners of Peralada Castle - turned the club's financial situation around with a generous sponsorship. The increased budget available and improved facilities were rewarded over the following several seasons, as CF Peralada steadily climbed to a level in the Catalan regional league system higher than it had ever previously reached in its history. By 2002/03, the club for the first time ascended from the Catalan regional divisions to enter the Tercera División, the lowest of the fully nation-wide leagues in Spain. Two seasons after this promotion, the club reached the semi-finals of the Copa Catalunya for the first time, where they were knocked out by no less than FC Barcelona. Peralada's drive up the league pyramid ended as they levelled off their ascent by spending five seasons in the Tercera División before they were relegated back to the first tier of Catalan regional football in 2007. It would take a further seven seasons before the club was able to return to the Tercera, which they did in 2014. Association with Girona FC Paralleling Peralada's rise through the leagues a decade earlier, nearby side Girona FC had themselves risen from the Tercera División (the fourth tier of Spanish football) from the middle of the first decade of the new century to reach the Segunda División (the second tier), unsuccessfully contesting the play-offs for promotion to the summit of the league system, La Liga, three times in four seasons by 2016. Having set their sights on football at the highest level, it had become clear to Girona's management that the gap in footballing standards between their first team and their reserve team - a former village side only purchased in 2012 and sat three tiers below Girona FC itself - was too large for practical development of young players by transfer between the two teams. As a result, they began a search for a nearby team playing at a level in between the two, to act as an intermediary reserve side. Quickly identifying Peralada as a candidate for an affiliation relationship, the two clubs came to an understanding whereby they would affiliate for a fixed term of five years starting from 2016. In 2017, Peralada played for the first time the play-offs to Segunda División B, but was eliminated in the last round by Rápido de Bouzas. However, on 7 July 2017, the club confirmed that it would promote to Segunda División B by paying the €133,000 the Royal Spanish Football Federation established for paying the debts of CF Gavà and CD Boiro players. On 23 July 2017, the club's members voted in favour of renaming the club to CF Peralada-Girona B in recognition of the extension of the club's affiliation with Girona FC after their promotion to Segunda División B. The vinculation of Peralada with Girona finished in 2019, after the relegation of both clubs, of Peralada to Tercera and Girona to Segunda. In that 2018–19 season CF Peralada won just 8 of 28 games and finished 19th in the Segunda División B, Group 3. Season to season 2 seasons in Segunda División B 10 seasons in Tercera División 3 seasons in Tercera Federación/Tercera División RFEF Notes Current squad Former players Alberto Edjogo Rubén Epitié References External links Official blog Schedule & Standings Estadios de España Football clubs in Catalonia Association football clubs established in 1915 1915 establishments in Spain Girona FC
```yaml sample: description: MAX17262 sensor sample name: MAX17262 sample tests: sample.sensor.max17262: build_only: true depends_on: arduino_i2c harness: console tags: sensors platform_allow: nrf52840dk/nrf52840 harness_config: type: one_line regex: - "V: (.*) V; I: (.*) mA; T: (.*) C" fixture: fixture_i2c_max17262 ```
Nanda Chaur is a village in Hoshiarpur district, Punjab, India. Nanda Chaur village is also known as Nanda Chaur Dham due to the Shri Om Darbar temple situated at Nanda Chaur. There are many school and colleges in Nanda Chaur village and a hospital. The village is situated at Bullowal to Bhogpur road and approximately 20 kilometres from its belonging district Hoshiarpur. Nanda Chaur village's mostly people are well educated, well behaved and helping people. All people from different religions are living peacefully here. Demographics According to Census 2011 Nanda Chaur village has population of 3478 of which 1780 are males while 1698 are females as per Population Census 2011. And total number of families residing here are 723. Education Colleges There is one degree college Shri Om Narayan Dutt Girls degree college Nanda Chaur. Schools Govt High School. Govt Primary School. Sant Shardha Ram ji Girls school. Hrakrishan Public school. Distance from other cities Hoshiarpur = 18 km, Chandigarh = 157 km, Jalandhar = 38 km, New Delhi = 420 km, Dharmshala = 135 km. References Villages in Hoshiarpur district
```ocaml open Import type t = | Byte | Native | Best (** [Native] if available and [Byte] if not *) val decode : t Dune_lang.Decoder.t val compare : t -> t -> Ordering.t val to_dyn : t -> Dyn.t val encode : t Dune_lang.Encoder.t module Kind : sig type t = | Inherited | Requested of Loc.t end module Map : sig type nonrec 'a t = { byte : 'a ; native : 'a ; best : 'a } end type mode_conf := t module Set : sig type nonrec t = Kind.t option Map.t val of_list : (mode_conf * Kind.t) list -> t val decode : t Dune_lang.Decoder.t module Details : sig type t = Kind.t option end val eval_detailed : t -> has_native:bool -> Details.t Mode.Dict.t val eval : t -> has_native:bool -> Mode.Dict.Set.t end module Lib : sig type t = | Ocaml of mode_conf | Melange val to_dyn : t -> Dyn.t module Map : sig type nonrec 'a t = { ocaml : 'a Map.t ; melange : 'a } end module Set : sig type mode_conf := t type nonrec t = Kind.t option Map.t val of_list : (mode_conf * Kind.t) list -> t val decode : t Dune_lang.Decoder.t module Details : sig type t = Kind.t option end val default : Loc.t -> t val eval_detailed : t -> has_native:bool -> Details.t Lib_mode.Map.t val eval : t -> has_native:bool -> Lib_mode.Map.Set.t val decode_osl : stanza_loc:Loc.t -> Dune_project.t -> t Dune_lang.Decoder.t end end ```
Michael John Brown (born 11 July 1939) is an English retired football player and coach. Career Brown was born in Walsall. A full-back, he began his career as a for Hull City, before moving on to Lincoln City. Soon after, Brown moved on to Cambridge United. Soon after, he was offered a full-time coaching position at Oxford United. After six years as a coach, and following the departure of Gerry Summers to Gillingham, Brown was offered the manager's job at Oxford, a position he held for a further four years. Despite having limited success with the Us, Brown impressed enough to be offered a job at West Bromwich Albion as Ron Atkinson's assistant. When Atkinson was signed by Manchester United in 1981, he was followed by Brown soon after. The two had a successful spell together at Old Trafford, winning two FA Cups in 1983 and 1985, as well as reaching the final of the League Cup in 1983. In addition, the team never finished below fourth in the league in Brown's time there. However, in November 1986, Atkinson was dismissed by United. His replacement, Alex Ferguson, brought his own assistant manager with him, and Brown was no longer required at the club. In 1989, he was signed by Phil Neal as his assistant at Bolton Wanderers. He remained at Bolton for a further three years, until Neal lost his job with the Trotters and Brown followed him out of the exit door. That summer, he took up a coaching post in Pahang, Malaysia, with the Pahang FA. Brown did not stay in Malaysia for very long, and soon returned to England as Coventry City's chief scout. He then took up a similar position at Blackburn Rovers in 1997, but only stayed for one season before moving back to Manchester United as Chief Scout. He stayed at United for eight years, before he was forcibly retired by the club, whose policy at the time required all staff over the age of 65 to retire. West Brom re-signed Brown in the summer of 2005, and he stayed there for almost two years before linking up with the former Manchester United captain, Roy Keane, at Sunderland, joining fellow United old-boys Neil Bailey, Raimond van der Gouw and Michael Clegg. References Living people 1939 births Footballers from Walsall English men's footballers Men's association football fullbacks English Football League players Hull City A.F.C. players Lincoln City F.C. players Cambridge United F.C. players English football managers Oxford United F.C. managers Manchester United F.C. non-playing staff Bolton Wanderers F.C. non-playing staff Sunderland A.F.C. non-playing staff
The Azores Ladies Open was a women's professional golf tournament on the LET Access Series, held between 2011 and 2017 in the Azores, an Autonomous Region of Portugal. The tournament was the first LET Access Series event to be staged in Portugal. Sponsored by the Azores Tourist Board, it was held three times at Campo de Golf de Batalha in Ponta Delgada on São Miguel Island, home to the Azores Senior Open, and three times on Terceira Island. Winners References External links LET Access Series events Golf tournaments in Portugal
Guinagourou is a town and arrondissement in the Borgou Department of Benin. It is an administrative division under the jurisdiction of the commune of Pèrèrè. According to the population census conducted by the Institut National de la Statistique Benin on February 15, 2002, the arrondissement had a total population of 11,411. References Populated places in the Borgou Department Arrondissements of Benin
```powershell $fileNames = Get-ChildItem -Path $PSScriptRoot -Recurse foreach ($file in $fileNames) { if ($file.Name.EndsWith("vert") -Or $file.Name.EndsWith("frag") -Or $file.Name.EndsWith("comp")) { $inPath = $file.FullName $outPath = $inPath + ".spv" $inputLastWrite = (Get-ChildItem $inPath).LastWriteTime if (-not [System.IO.File]::Exists($outPath) -or (Get-ChildItem $outPath).LastWriteTime -le $inputLastWrite) { Write-Host "Compiling $file" -> $outPath glslangvalidator -V $inPath -o $outPath } } } ```
```c /* * */ #include <zephyr/kernel.h> #include <zephyr/arch/x86/mmustructs.h> #include <zephyr/kernel/mm.h> #include <zephyr/sys/__assert.h> #include <zephyr/sys/check.h> #include <zephyr/logging/log.h> #include <errno.h> #include <ctype.h> #include <zephyr/spinlock.h> #include <kernel_arch_func.h> #include <x86_mmu.h> #include <zephyr/init.h> #include <kernel_internal.h> #include <mmu.h> #include <zephyr/drivers/interrupt_controller/loapic.h> #include <mmu.h> #include <zephyr/arch/x86/memmap.h> LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL); /* We will use some ignored bits in the PTE to backup permission settings * when the mapping was made. This is used to un-apply memory domain memory * partitions to page tables when the partitions are removed. */ #define MMU_RW_ORIG MMU_IGNORED0 #define MMU_US_ORIG MMU_IGNORED1 #define MMU_XD_ORIG MMU_IGNORED2 /* Bits in the PTE that form the set of permission bits, when resetting */ #define MASK_PERM (MMU_RW | MMU_US | MMU_XD) /* When we want to set up a new mapping, discarding any previous state */ #define MASK_ALL (~((pentry_t)0U)) /* Bits to set at mapping time for particular permissions. We set the actual * page table bit effecting the policy and also the backup bit. */ #define ENTRY_RW (MMU_RW | MMU_RW_ORIG) #define ENTRY_US (MMU_US | MMU_US_ORIG) #define ENTRY_XD (MMU_XD | MMU_XD_ORIG) /* Bit position which is always zero in a PTE. We'll use the PAT bit. * This helps disambiguate PTEs that do not have the Present bit set (MMU_P): * - If the entire entry is zero, it's an un-mapped virtual page * - If PTE_ZERO is set, we flipped this page due to KPTI * - Otherwise, this was a page-out */ #define PTE_ZERO MMU_PAT /* Protects x86_domain_list and serializes instantiation of intermediate * paging structures. */ __pinned_bss static struct k_spinlock x86_mmu_lock; #if defined(CONFIG_USERSPACE) && !defined(CONFIG_X86_COMMON_PAGE_TABLE) /* List of all active and initialized memory domains. This is used to make * sure all memory mappings are the same across all page tables when invoking * range_map() */ __pinned_bss static sys_slist_t x86_domain_list; #endif /* * Definitions for building an ontology of paging levels and capabilities * at each level */ /* Data structure describing the characteristics of a particular paging * level */ struct paging_level { /* What bits are used to store physical address */ pentry_t mask; /* Number of entries in this paging structure */ size_t entries; /* How many bits to right-shift a virtual address to obtain the * appropriate entry within this table. * * The memory scope of each entry in this table is 1 << shift. */ unsigned int shift; #ifdef CONFIG_EXCEPTION_DEBUG /* Name of this level, for debug purposes */ const char *name; #endif }; /* Flags for all entries in intermediate paging levels. * Fortunately, the same bits are set for all intermediate levels for all * three paging modes. * * Obviously P is set. * * We want RW and US bit always set; actual access control will be * done at the leaf level. * * XD (if supported) always 0. Disabling execution done at leaf level. * * PCD/PWT always 0. Caching properties again done at leaf level. */ #define INT_FLAGS (MMU_P | MMU_RW | MMU_US) /* Paging level ontology for the selected paging mode. * * See Figures 4-4, 4-7, 4-11 in the Intel SDM, vol 3A */ __pinned_rodata static const struct paging_level paging_levels[] = { #ifdef CONFIG_X86_64 /* Page Map Level 4 */ { .mask = 0x7FFFFFFFFFFFF000ULL, .entries = 512U, .shift = 39U, #ifdef CONFIG_EXCEPTION_DEBUG .name = "PML4" #endif }, #endif /* CONFIG_X86_64 */ #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) /* Page Directory Pointer Table */ { .mask = 0x7FFFFFFFFFFFF000ULL, #ifdef CONFIG_X86_64 .entries = 512U, #else /* PAE version */ .entries = 4U, #endif .shift = 30U, #ifdef CONFIG_EXCEPTION_DEBUG .name = "PDPT" #endif }, #endif /* CONFIG_X86_64 || CONFIG_X86_PAE */ /* Page Directory */ { #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) .mask = 0x7FFFFFFFFFFFF000ULL, .entries = 512U, .shift = 21U, #else /* 32-bit */ .mask = 0xFFFFF000U, .entries = 1024U, .shift = 22U, #endif /* CONFIG_X86_64 || CONFIG_X86_PAE */ #ifdef CONFIG_EXCEPTION_DEBUG .name = "PD" #endif }, /* Page Table */ { #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) .mask = 0x07FFFFFFFFFFF000ULL, .entries = 512U, .shift = 12U, #else /* 32-bit */ .mask = 0xFFFFF000U, .entries = 1024U, .shift = 12U, #endif /* CONFIG_X86_64 || CONFIG_X86_PAE */ #ifdef CONFIG_EXCEPTION_DEBUG .name = "PT" #endif } }; #define NUM_LEVELS ARRAY_SIZE(paging_levels) #define PTE_LEVEL (NUM_LEVELS - 1) #define PDE_LEVEL (NUM_LEVELS - 2) /* * Macros for reserving space for page tables * * We need to reserve a block of memory equal in size to the page tables * generated by gen_mmu.py so that memory addresses do not shift between * build phases. These macros ultimately specify INITIAL_PAGETABLE_SIZE. */ #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) #ifdef CONFIG_X86_64 #define NUM_PML4_ENTRIES 512U #define NUM_PDPT_ENTRIES 512U #else #define NUM_PDPT_ENTRIES 4U #endif /* CONFIG_X86_64 */ #define NUM_PD_ENTRIES 512U #define NUM_PT_ENTRIES 512U #else #define NUM_PD_ENTRIES 1024U #define NUM_PT_ENTRIES 1024U #endif /* !CONFIG_X86_64 && !CONFIG_X86_PAE */ /* Memory range covered by an instance of various table types */ #define PT_AREA ((uintptr_t)(CONFIG_MMU_PAGE_SIZE * NUM_PT_ENTRIES)) #define PD_AREA (PT_AREA * NUM_PD_ENTRIES) #ifdef CONFIG_X86_64 #define PDPT_AREA (PD_AREA * NUM_PDPT_ENTRIES) #endif #define VM_ADDR CONFIG_KERNEL_VM_BASE #define VM_SIZE CONFIG_KERNEL_VM_SIZE /* Define a range [PT_START, PT_END) which is the memory range * covered by all the page tables needed for the address space */ #define PT_START ((uintptr_t)ROUND_DOWN(VM_ADDR, PT_AREA)) #define PT_END ((uintptr_t)ROUND_UP(VM_ADDR + VM_SIZE, PT_AREA)) /* Number of page tables needed to cover address space. Depends on the specific * bounds, but roughly 1 page table per 2MB of RAM */ #define NUM_PT ((PT_END - PT_START) / PT_AREA) #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) /* Same semantics as above, but for the page directories needed to cover * system RAM. */ #define PD_START ((uintptr_t)ROUND_DOWN(VM_ADDR, PD_AREA)) #define PD_END ((uintptr_t)ROUND_UP(VM_ADDR + VM_SIZE, PD_AREA)) /* Number of page directories needed to cover the address space. Depends on the * specific bounds, but roughly 1 page directory per 1GB of RAM */ #define NUM_PD ((PD_END - PD_START) / PD_AREA) #else /* 32-bit page tables just have one toplevel page directory */ #define NUM_PD 1 #endif #ifdef CONFIG_X86_64 /* Same semantics as above, but for the page directory pointer tables needed * to cover the address space. On 32-bit there is just one 4-entry PDPT. */ #define PDPT_START ((uintptr_t)ROUND_DOWN(VM_ADDR, PDPT_AREA)) #define PDPT_END ((uintptr_t)ROUND_UP(VM_ADDR + VM_SIZE, PDPT_AREA)) /* Number of PDPTs needed to cover the address space. 1 PDPT per 512GB of VM */ #define NUM_PDPT ((PDPT_END - PDPT_START) / PDPT_AREA) /* All pages needed for page tables, using computed values plus one more for * the top-level PML4 */ #define NUM_TABLE_PAGES (NUM_PT + NUM_PD + NUM_PDPT + 1) #else /* !CONFIG_X86_64 */ /* Number of pages we need to reserve in the stack for per-thread page tables */ #define NUM_TABLE_PAGES (NUM_PT + NUM_PD) #endif /* CONFIG_X86_64 */ #define INITIAL_PTABLE_PAGES \ (NUM_TABLE_PAGES + CONFIG_X86_EXTRA_PAGE_TABLE_PAGES) #ifdef CONFIG_X86_PAE /* Toplevel PDPT wasn't included as it is not a page in size */ #define INITIAL_PTABLE_SIZE \ ((INITIAL_PTABLE_PAGES * CONFIG_MMU_PAGE_SIZE) + 0x20) #else #define INITIAL_PTABLE_SIZE \ (INITIAL_PTABLE_PAGES * CONFIG_MMU_PAGE_SIZE) #endif /* "dummy" pagetables for the first-phase build. The real page tables * are produced by gen-mmu.py based on data read in zephyr-prebuilt.elf, * and this dummy array is discarded. */ Z_GENERIC_SECTION(.dummy_pagetables) static __used char dummy_pagetables[INITIAL_PTABLE_SIZE]; /* * Utility functions */ /* For a table at a particular level, get the entry index that corresponds to * the provided virtual address */ __pinned_func static inline int get_index(void *virt, int level) { return (((uintptr_t)virt >> paging_levels[level].shift) % paging_levels[level].entries); } __pinned_func static inline pentry_t *get_entry_ptr(pentry_t *ptables, void *virt, int level) { return &ptables[get_index(virt, level)]; } __pinned_func static inline pentry_t get_entry(pentry_t *ptables, void *virt, int level) { return ptables[get_index(virt, level)]; } /* Get the physical memory address associated with this table entry */ __pinned_func static inline uintptr_t get_entry_phys(pentry_t entry, int level) { return entry & paging_levels[level].mask; } /* Return the virtual address of a linked table stored in the provided entry */ __pinned_func static inline pentry_t *next_table(pentry_t entry, int level) { return k_mem_virt_addr(get_entry_phys(entry, level)); } /* Number of table entries at this level */ __pinned_func static inline size_t get_num_entries(int level) { return paging_levels[level].entries; } /* 4K for everything except PAE PDPTs */ __pinned_func static inline size_t table_size(int level) { return get_num_entries(level) * sizeof(pentry_t); } /* For a table at a particular level, size of the amount of virtual memory * that an entry within the table covers */ __pinned_func static inline size_t get_entry_scope(int level) { return (1UL << paging_levels[level].shift); } /* For a table at a particular level, size of the amount of virtual memory * that this entire table covers */ __pinned_func static inline size_t get_table_scope(int level) { return get_entry_scope(level) * get_num_entries(level); } /* Must have checked Present bit first! Non-present entries may have OS data * stored in any other bits */ __pinned_func static inline bool is_leaf(int level, pentry_t entry) { if (level == PTE_LEVEL) { /* Always true for PTE */ return true; } return ((entry & MMU_PS) != 0U); } /* This does NOT (by design) un-flip KPTI PTEs, it's just the raw PTE value */ __pinned_func static inline void pentry_get(int *paging_level, pentry_t *val, pentry_t *ptables, void *virt) { pentry_t *table = ptables; for (int level = 0; level < NUM_LEVELS; level++) { pentry_t entry = get_entry(table, virt, level); if ((entry & MMU_P) == 0 || is_leaf(level, entry)) { *val = entry; if (paging_level != NULL) { *paging_level = level; } break; } else { table = next_table(entry, level); } } } __pinned_func static inline void tlb_flush_page(void *addr) { /* Invalidate TLB entries corresponding to the page containing the * specified address */ char *page = (char *)addr; __asm__ ("invlpg %0" :: "m" (*page)); } #ifdef CONFIG_X86_KPTI __pinned_func static inline bool is_flipped_pte(pentry_t pte) { return (pte & MMU_P) == 0 && (pte & PTE_ZERO) != 0; } #endif #if defined(CONFIG_SMP) __pinned_func void z_x86_tlb_ipi(const void *arg) { uintptr_t ptables_phys; ARG_UNUSED(arg); #ifdef CONFIG_X86_KPTI /* We're always on the kernel's set of page tables in this context * if KPTI is turned on */ ptables_phys = z_x86_cr3_get(); __ASSERT(ptables_phys == k_mem_phys_addr(&z_x86_kernel_ptables), ""); #else /* We might have been moved to another memory domain, so always invoke * z_x86_thread_page_tables_get() instead of using current CR3 value. */ ptables_phys = k_mem_phys_addr(z_x86_thread_page_tables_get(_current)); #endif /* * In the future, we can consider making this smarter, such as * propagating which page tables were modified (in case they are * not active on this CPU) or an address range to call * tlb_flush_page() on. */ LOG_DBG("%s on CPU %d\n", __func__, arch_curr_cpu()->id); z_x86_cr3_set(ptables_phys); } /* NOTE: This is not synchronous and the actual flush takes place some short * time after this exits. */ __pinned_func static inline void tlb_shootdown(void) { z_loapic_ipi(0, LOAPIC_ICR_IPI_OTHERS, CONFIG_TLB_IPI_VECTOR); } #endif /* CONFIG_SMP */ __pinned_func static inline void assert_addr_aligned(uintptr_t addr) { #if __ASSERT_ON __ASSERT((addr & (CONFIG_MMU_PAGE_SIZE - 1)) == 0U, "unaligned address 0x%" PRIxPTR, addr); #else ARG_UNUSED(addr); #endif } __pinned_func static inline bool is_addr_aligned(uintptr_t addr) { if ((addr & (CONFIG_MMU_PAGE_SIZE - 1)) == 0U) { return true; } else { return false; } } __pinned_func static inline void assert_virt_addr_aligned(void *addr) { assert_addr_aligned((uintptr_t)addr); } __pinned_func static inline bool is_virt_addr_aligned(void *addr) { return is_addr_aligned((uintptr_t)addr); } __pinned_func static inline void assert_size_aligned(size_t size) { #if __ASSERT_ON __ASSERT((size & (CONFIG_MMU_PAGE_SIZE - 1)) == 0U, "unaligned size %zu", size); #else ARG_UNUSED(size); #endif } __pinned_func static inline bool is_size_aligned(size_t size) { if ((size & (CONFIG_MMU_PAGE_SIZE - 1)) == 0U) { return true; } else { return false; } } __pinned_func static inline void assert_region_page_aligned(void *addr, size_t size) { assert_virt_addr_aligned(addr); assert_size_aligned(size); } __pinned_func static inline bool is_region_page_aligned(void *addr, size_t size) { if (!is_virt_addr_aligned(addr)) { return false; } return is_size_aligned(size); } /* * Debug functions. All conditionally compiled with CONFIG_EXCEPTION_DEBUG. */ #ifdef CONFIG_EXCEPTION_DEBUG /* Add colors to page table dumps to indicate mapping type */ #define COLOR_PAGE_TABLES 1 #if COLOR_PAGE_TABLES #define ANSI_DEFAULT "\x1B" "[0m" #define ANSI_RED "\x1B" "[1;31m" #define ANSI_GREEN "\x1B" "[1;32m" #define ANSI_YELLOW "\x1B" "[1;33m" #define ANSI_BLUE "\x1B" "[1;34m" #define ANSI_MAGENTA "\x1B" "[1;35m" #define ANSI_CYAN "\x1B" "[1;36m" #define ANSI_GREY "\x1B" "[1;90m" #define COLOR(x) printk(_CONCAT(ANSI_, x)) #else #define COLOR(x) do { } while (false) #endif __pinned_func static char get_entry_code(pentry_t value) { char ret; if (value == 0U) { /* Unmapped entry */ ret = '.'; } else { if ((value & MMU_RW) != 0U) { /* Writable page */ if ((value & MMU_XD) != 0U) { /* RW */ ret = 'w'; } else { /* RWX */ ret = 'a'; } } else { if ((value & MMU_XD) != 0U) { /* R */ ret = 'r'; } else { /* RX */ ret = 'x'; } } if ((value & MMU_US) != 0U) { /* Uppercase indicates user mode access */ ret = toupper((unsigned char)ret); } } return ret; } __pinned_func static void print_entries(pentry_t entries_array[], uint8_t *base, int level, size_t count) { int column = 0; for (int i = 0; i < count; i++) { pentry_t entry = entries_array[i]; uintptr_t phys = get_entry_phys(entry, level); uintptr_t virt = (uintptr_t)base + (get_entry_scope(level) * i); if ((entry & MMU_P) != 0U) { if (is_leaf(level, entry)) { if (phys == virt) { /* Identity mappings */ COLOR(YELLOW); } else if (phys + K_MEM_VIRT_OFFSET == virt) { /* Permanent RAM mappings */ COLOR(GREEN); } else { /* General mapped pages */ COLOR(CYAN); } } else { /* Intermediate entry */ COLOR(MAGENTA); } } else { if (is_leaf(level, entry)) { if (entry == 0U) { /* Unmapped */ COLOR(GREY); #ifdef CONFIG_X86_KPTI } else if (is_flipped_pte(entry)) { /* KPTI, un-flip it */ COLOR(BLUE); entry = ~entry; phys = get_entry_phys(entry, level); if (phys == virt) { /* Identity mapped */ COLOR(CYAN); } else { /* Non-identity mapped */ COLOR(BLUE); } #endif } else { /* Paged out */ COLOR(RED); } } else { /* Un-mapped intermediate entry */ COLOR(GREY); } } printk("%c", get_entry_code(entry)); column++; if (column == 64) { column = 0; printk("\n"); } } COLOR(DEFAULT); if (column != 0) { printk("\n"); } } __pinned_func static void dump_ptables(pentry_t *table, uint8_t *base, int level) { const struct paging_level *info = &paging_levels[level]; #ifdef CONFIG_X86_64 /* Account for the virtual memory "hole" with sign-extension */ if (((uintptr_t)base & BITL(47)) != 0) { base = (uint8_t *)((uintptr_t)base | (0xFFFFULL << 48)); } #endif printk("%s at %p (0x%" PRIxPTR "): ", info->name, table, k_mem_phys_addr(table)); if (level == 0) { printk("entire address space\n"); } else { printk("for %p - %p\n", base, base + get_table_scope(level) - 1); } print_entries(table, base, level, info->entries); /* Check if we're a page table */ if (level == PTE_LEVEL) { return; } /* Dump all linked child tables */ for (int j = 0; j < info->entries; j++) { pentry_t entry = table[j]; pentry_t *next; if ((entry & MMU_P) == 0U || (entry & MMU_PS) != 0U) { /* Not present or big page, skip */ continue; } next = next_table(entry, level); dump_ptables(next, base + (j * get_entry_scope(level)), level + 1); } } __pinned_func void z_x86_dump_page_tables(pentry_t *ptables) { dump_ptables(ptables, NULL, 0); } /* Enable to dump out the kernel's page table right before main() starts, * sometimes useful for deep debugging. May overwhelm twister. */ #define DUMP_PAGE_TABLES 0 #if DUMP_PAGE_TABLES __pinned_func static int dump_kernel_tables(void) { z_x86_dump_page_tables(z_x86_kernel_ptables); return 0; } SYS_INIT(dump_kernel_tables, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); #endif __pinned_func static void str_append(char **buf, size_t *size, const char *str) { int ret = snprintk(*buf, *size, "%s", str); if (ret >= *size) { /* Truncated */ *size = 0U; } else { *size -= ret; *buf += ret; } } __pinned_func static void dump_entry(int level, void *virt, pentry_t entry) { const struct paging_level *info = &paging_levels[level]; char buf[24] = { 0 }; char *pos = buf; size_t sz = sizeof(buf); uint8_t *virtmap = (uint8_t *)ROUND_DOWN(virt, get_entry_scope(level)); #define DUMP_BIT(bit) do { \ if ((entry & MMU_##bit) != 0U) { \ str_append(&pos, &sz, #bit " "); \ } \ } while (false) DUMP_BIT(RW); DUMP_BIT(US); DUMP_BIT(PWT); DUMP_BIT(PCD); DUMP_BIT(A); DUMP_BIT(D); DUMP_BIT(G); DUMP_BIT(XD); LOG_ERR("%sE: %p -> " PRI_ENTRY ": %s", info->name, virtmap, entry & info->mask, buf); #undef DUMP_BIT } __pinned_func void z_x86_pentry_get(int *paging_level, pentry_t *val, pentry_t *ptables, void *virt) { pentry_get(paging_level, val, ptables, virt); } /* * Debug function for dumping out MMU table information to the LOG for a * specific virtual address, such as when we get an unexpected page fault. */ __pinned_func void z_x86_dump_mmu_flags(pentry_t *ptables, void *virt) { pentry_t entry = 0; int level = 0; pentry_get(&level, &entry, ptables, virt); if ((entry & MMU_P) == 0) { LOG_ERR("%sE: not present", paging_levels[level].name); } else { dump_entry(level, virt, entry); } } #endif /* CONFIG_EXCEPTION_DEBUG */ /* Reset permissions on a PTE to original state when the mapping was made */ __pinned_func static inline pentry_t reset_pte(pentry_t old_val) { pentry_t new_val; /* Clear any existing state in permission bits */ new_val = old_val & (~K_MEM_PARTITION_PERM_MASK); /* Now set permissions based on the stashed original values */ if ((old_val & MMU_RW_ORIG) != 0) { new_val |= MMU_RW; } if ((old_val & MMU_US_ORIG) != 0) { new_val |= MMU_US; } #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) if ((old_val & MMU_XD_ORIG) != 0) { new_val |= MMU_XD; } #endif return new_val; } /* Wrapper functions for some gross stuff we have to do for Kernel * page table isolation. If these are User mode page tables, the user bit * isn't set, and this is not the shared page, all the bits in the PTE * are flipped. This serves three purposes: * - The page isn't present, implementing page table isolation * - Flipping the physical address bits cheaply mitigates L1TF * - State is preserved; to get original PTE, just complement again */ __pinned_func static inline pentry_t pte_finalize_value(pentry_t val, bool user_table, int level) { #ifdef CONFIG_X86_KPTI static const uintptr_t shared_phys_addr = K_MEM_PHYS_ADDR(POINTER_TO_UINT(&z_shared_kernel_page_start)); if (user_table && (val & MMU_US) == 0 && (val & MMU_P) != 0 && get_entry_phys(val, level) != shared_phys_addr) { val = ~val; } #else ARG_UNUSED(user_table); ARG_UNUSED(level); #endif return val; } /* Atomic functions for modifying PTEs. These don't map nicely to Zephyr's * atomic API since the only types supported are 'int' and 'void *' and * the size of pentry_t depends on other factors like PAE. */ #ifndef CONFIG_X86_PAE /* Non-PAE, pentry_t is same size as void ptr so use atomic_ptr_* APIs */ __pinned_func static inline pentry_t atomic_pte_get(const pentry_t *target) { return (pentry_t)atomic_ptr_get((const atomic_ptr_t *)target); } __pinned_func static inline bool atomic_pte_cas(pentry_t *target, pentry_t old_value, pentry_t new_value) { return atomic_ptr_cas((atomic_ptr_t *)target, (void *)old_value, (void *)new_value); } #else /* Atomic builtins for 64-bit values on 32-bit x86 require floating point. * Don't do this, just lock local interrupts. Needless to say, this * isn't workable if someone ever adds SMP to the 32-bit x86 port. */ BUILD_ASSERT(!IS_ENABLED(CONFIG_SMP)); __pinned_func static inline pentry_t atomic_pte_get(const pentry_t *target) { return *target; } __pinned_func static inline bool atomic_pte_cas(pentry_t *target, pentry_t old_value, pentry_t new_value) { bool ret = false; int key = arch_irq_lock(); if (*target == old_value) { *target = new_value; ret = true; } arch_irq_unlock(key); return ret; } #endif /* CONFIG_X86_PAE */ /* Indicates that the target page tables will be used by user mode threads. * This only has implications for CONFIG_X86_KPTI where user thread facing * page tables need nearly all pages that don't have the US bit to also * not be Present. */ #define OPTION_USER BIT(0) /* Indicates that the operation requires TLBs to be flushed as we are altering * existing mappings. Not needed for establishing new mappings */ #define OPTION_FLUSH BIT(1) /* Indicates that each PTE's permission bits should be restored to their * original state when the memory was mapped. All other bits in the PTE are * preserved. */ #define OPTION_RESET BIT(2) /* Indicates that the mapping will need to be cleared entirely. This is * mainly used for unmapping the memory region. */ #define OPTION_CLEAR BIT(3) /** * Atomically update bits in a page table entry * * This is atomic with respect to modifications by other CPUs or preempted * contexts, which can be very important when making decisions based on * the PTE's prior "dirty" state. * * @param pte Pointer to page table entry to update * @param update_val Updated bits to set/clear in PTE. Ignored with * OPTION_RESET or OPTION_CLEAR. * @param update_mask Which bits to modify in the PTE. Ignored with * OPTION_RESET or OPTION_CLEAR. * @param options Control flags * @retval Old PTE value */ __pinned_func static inline pentry_t pte_atomic_update(pentry_t *pte, pentry_t update_val, pentry_t update_mask, uint32_t options) { bool user_table = (options & OPTION_USER) != 0U; bool reset = (options & OPTION_RESET) != 0U; bool clear = (options & OPTION_CLEAR) != 0U; pentry_t old_val, new_val; do { old_val = atomic_pte_get(pte); new_val = old_val; #ifdef CONFIG_X86_KPTI if (is_flipped_pte(new_val)) { /* Page was flipped for KPTI. Un-flip it */ new_val = ~new_val; } #endif /* CONFIG_X86_KPTI */ if (reset) { new_val = reset_pte(new_val); } else if (clear) { new_val = 0; } else { new_val = ((new_val & ~update_mask) | (update_val & update_mask)); } new_val = pte_finalize_value(new_val, user_table, PTE_LEVEL); } while (atomic_pte_cas(pte, old_val, new_val) == false); #ifdef CONFIG_X86_KPTI if (is_flipped_pte(old_val)) { /* Page was flipped for KPTI. Un-flip it */ old_val = ~old_val; } #endif /* CONFIG_X86_KPTI */ return old_val; } /** * Low level page table update function for a virtual page * * For the provided set of page tables, update the PTE associated with the * virtual address to a new value, using the mask to control what bits * need to be preserved. * * It is permitted to set up mappings without the Present bit set, in which * case all other bits may be used for OS accounting. * * This function is atomic with respect to the page table entries being * modified by another CPU, using atomic operations to update the requested * bits and return the previous PTE value. * * Common mask values: * MASK_ALL - Update all PTE bits. Existing state totally discarded. * MASK_PERM - Only update permission bits. All other bits and physical * mapping preserved. * * @param ptables Page tables to modify * @param virt Virtual page table entry to update * @param entry_val Value to update in the PTE (ignored if OPTION_RESET or * OPTION_CLEAR) * @param [out] old_val_ptr Filled in with previous PTE value. May be NULL. * @param mask What bits to update in the PTE (ignored if OPTION_RESET or * OPTION_CLEAR) * @param options Control options, described above * * @retval 0 if successful * @retval -EFAULT if large page encountered or missing page table level */ __pinned_func static int page_map_set(pentry_t *ptables, void *virt, pentry_t entry_val, pentry_t *old_val_ptr, pentry_t mask, uint32_t options) { pentry_t *table = ptables; bool flush = (options & OPTION_FLUSH) != 0U; int ret = 0; for (int level = 0; level < NUM_LEVELS; level++) { int index; pentry_t *entryp; index = get_index(virt, level); entryp = &table[index]; /* Check if we're a PTE */ if (level == PTE_LEVEL) { pentry_t old_val = pte_atomic_update(entryp, entry_val, mask, options); if (old_val_ptr != NULL) { *old_val_ptr = old_val; } break; } /* We bail out early here due to no support for * splitting existing bigpage mappings. * If the PS bit is not supported at some level (like * in a PML4 entry) it is always reserved and must be 0 */ CHECKIF(!((*entryp & MMU_PS) == 0U)) { /* Cannot continue since we cannot split * bigpage mappings. */ LOG_ERR("large page encountered"); ret = -EFAULT; goto out; } table = next_table(*entryp, level); CHECKIF(!(table != NULL)) { /* Cannot continue since table is NULL, * and it cannot be dereferenced in next loop * iteration. */ LOG_ERR("missing page table level %d when trying to map %p", level + 1, virt); ret = -EFAULT; goto out; } } out: if (flush) { tlb_flush_page(virt); } return ret; } /** * Map a physical region in a specific set of page tables. * * See documentation for page_map_set() for additional notes about masks and * supported options. * * It is vital to remember that all virtual-to-physical mappings must be * the same with respect to supervisor mode regardless of what thread is * scheduled (and therefore, if multiple sets of page tables exist, which one * is active). * * It is permitted to set up mappings without the Present bit set. * * @param ptables Page tables to modify * @param virt Base page-aligned virtual memory address to map the region. * @param phys Base page-aligned physical memory address for the region. * Ignored if OPTION_RESET or OPTION_CLEAR. Also affected by the mask * parameter. This address is not directly examined, it will simply be * programmed into the PTE. * @param size Size of the physical region to map * @param entry_flags Non-address bits to set in every PTE. Ignored if * OPTION_RESET. Also affected by the mask parameter. * @param mask What bits to update in each PTE. Un-set bits will never be * modified. Ignored if OPTION_RESET or OPTION_CLEAR. * @param options Control options, described above * * @retval 0 if successful * @retval -EINVAL if invalid parameters are supplied * @retval -EFAULT if errors encountered when updating page tables */ __pinned_func static int range_map_ptables(pentry_t *ptables, void *virt, uintptr_t phys, size_t size, pentry_t entry_flags, pentry_t mask, uint32_t options) { bool zero_entry = (options & (OPTION_RESET | OPTION_CLEAR)) != 0U; int ret = 0, ret2; CHECKIF(!is_addr_aligned(phys) || !is_size_aligned(size)) { ret = -EINVAL; goto out; } CHECKIF(!((entry_flags & paging_levels[0].mask) == 0U)) { LOG_ERR("entry_flags " PRI_ENTRY " overlaps address area", entry_flags); ret = -EINVAL; goto out; } /* This implementation is stack-efficient but not particularly fast. * We do a full page table walk for every page we are updating. * Recursive approaches are possible, but use much more stack space. */ for (size_t offset = 0; offset < size; offset += CONFIG_MMU_PAGE_SIZE) { uint8_t *dest_virt = (uint8_t *)virt + offset; pentry_t entry_val; if (zero_entry) { entry_val = 0; } else { entry_val = (pentry_t)(phys + offset) | entry_flags; } ret2 = page_map_set(ptables, dest_virt, entry_val, NULL, mask, options); ARG_UNUSED(ret2); CHECKIF(ret2 != 0) { ret = ret2; } } out: return ret; } /** * Establish or update a memory mapping for all page tables * * The physical region noted from phys to phys + size will be mapped to * an equal sized virtual region starting at virt, with the provided flags. * The mask value denotes what bits in PTEs will actually be modified. * * See range_map_ptables() for additional details. * * @param virt Page-aligned starting virtual address * @param phys Page-aligned starting physical address. Ignored if the mask * parameter does not enable address bits or OPTION_RESET used. * This region is not directly examined, it will simply be * programmed into the page tables. * @param size Size of the physical region to map * @param entry_flags Desired state of non-address PTE bits covered by mask, * ignored if OPTION_RESET * @param mask What bits in the PTE to actually modify; unset bits will * be preserved. Ignored if OPTION_RESET. * @param options Control options. Do not set OPTION_USER here. OPTION_FLUSH * will trigger a TLB shootdown after all tables are updated. * * @retval 0 if successful * @retval -EINVAL if invalid parameters are supplied * @retval -EFAULT if errors encountered when updating page tables */ __pinned_func static int range_map(void *virt, uintptr_t phys, size_t size, pentry_t entry_flags, pentry_t mask, uint32_t options) { int ret = 0, ret2; LOG_DBG("%s: 0x%" PRIxPTR " -> %p (%zu) flags " PRI_ENTRY " mask " PRI_ENTRY " opt 0x%x", __func__, phys, virt, size, entry_flags, mask, options); #ifdef CONFIG_X86_64 /* There's a gap in the "64-bit" address space, as 4-level paging * requires bits 48 to 63 to be copies of bit 47. Test this * by treating as a signed value and shifting. */ __ASSERT(((((intptr_t)virt) << 16) >> 16) == (intptr_t)virt, "non-canonical virtual address mapping %p (size %zu)", virt, size); #endif /* CONFIG_X86_64 */ CHECKIF(!((options & OPTION_USER) == 0U)) { LOG_ERR("invalid option for mapping"); ret = -EINVAL; goto out; } /* All virtual-to-physical mappings are the same in all page tables. * What can differ is only access permissions, defined by the memory * domain associated with the page tables, and the threads that are * members of that domain. * * Any new mappings need to be applied to all page tables. */ #if defined(CONFIG_USERSPACE) && !defined(CONFIG_X86_COMMON_PAGE_TABLE) sys_snode_t *node; SYS_SLIST_FOR_EACH_NODE(&x86_domain_list, node) { struct arch_mem_domain *domain = CONTAINER_OF(node, struct arch_mem_domain, node); ret2 = range_map_ptables(domain->ptables, virt, phys, size, entry_flags, mask, options | OPTION_USER); ARG_UNUSED(ret2); CHECKIF(ret2 != 0) { ret = ret2; } } #endif /* CONFIG_USERSPACE */ ret2 = range_map_ptables(z_x86_kernel_ptables, virt, phys, size, entry_flags, mask, options); ARG_UNUSED(ret2); CHECKIF(ret2 != 0) { ret = ret2; } out: #ifdef CONFIG_SMP if ((options & OPTION_FLUSH) != 0U) { tlb_shootdown(); } #endif /* CONFIG_SMP */ return ret; } __pinned_func static inline int range_map_unlocked(void *virt, uintptr_t phys, size_t size, pentry_t entry_flags, pentry_t mask, uint32_t options) { k_spinlock_key_t key; int ret; key = k_spin_lock(&x86_mmu_lock); ret = range_map(virt, phys, size, entry_flags, mask, options); k_spin_unlock(&x86_mmu_lock, key); return ret; } __pinned_func static pentry_t flags_to_entry(uint32_t flags) { pentry_t entry_flags = MMU_P; /* Translate flags argument into HW-recognized entry flags. * * Support for PAT is not implemented yet. Many systems may have * BIOS-populated MTRR values such that these cache settings are * redundant. */ switch (flags & K_MEM_CACHE_MASK) { case K_MEM_CACHE_NONE: entry_flags |= MMU_PCD; break; case K_MEM_CACHE_WT: entry_flags |= MMU_PWT; break; case K_MEM_CACHE_WB: break; default: __ASSERT(false, "bad memory mapping flags 0x%x", flags); } if ((flags & K_MEM_PERM_RW) != 0U) { entry_flags |= ENTRY_RW; } if ((flags & K_MEM_PERM_USER) != 0U) { entry_flags |= ENTRY_US; } if ((flags & K_MEM_PERM_EXEC) == 0U) { entry_flags |= ENTRY_XD; } return entry_flags; } /* map new region virt..virt+size to phys with provided arch-neutral flags */ __pinned_func void arch_mem_map(void *virt, uintptr_t phys, size_t size, uint32_t flags) { int ret; ret = range_map_unlocked(virt, phys, size, flags_to_entry(flags), MASK_ALL, 0); __ASSERT_NO_MSG(ret == 0); ARG_UNUSED(ret); } /* unmap region addr..addr+size, reset entries and flush TLB */ void arch_mem_unmap(void *addr, size_t size) { int ret; ret = range_map_unlocked(addr, 0, size, 0, 0, OPTION_FLUSH | OPTION_CLEAR); __ASSERT_NO_MSG(ret == 0); ARG_UNUSED(ret); } #ifdef K_MEM_IS_VM_KERNEL __boot_func static void identity_map_remove(uint32_t level) { size_t size, scope = get_entry_scope(level); pentry_t *table; uint32_t cur_level; uint8_t *pos; pentry_t entry; pentry_t *entry_ptr; k_mem_region_align((uintptr_t *)&pos, &size, (uintptr_t)CONFIG_SRAM_BASE_ADDRESS, (size_t)CONFIG_SRAM_SIZE * 1024U, scope); while (size != 0U) { /* Need to get to the correct table */ table = z_x86_kernel_ptables; for (cur_level = 0; cur_level < level; cur_level++) { entry = get_entry(table, pos, cur_level); table = next_table(entry, level); } entry_ptr = get_entry_ptr(table, pos, level); /* set_pte */ *entry_ptr = 0; pos += scope; size -= scope; } } #endif /* Invoked to remove the identity mappings in the page tables, * they were only needed to transition the instruction pointer at early boot */ __boot_func void z_x86_mmu_init(void) { #ifdef K_MEM_IS_VM_KERNEL /* We booted with physical address space being identity mapped. * As we are now executing in virtual address space, * the identity map is no longer needed. So remove them. * * Without PAE, only need to remove the entries at the PD level. * With PAE, need to also remove the entry at PDP level. */ identity_map_remove(PDE_LEVEL); #ifdef CONFIG_X86_PAE identity_map_remove(0); #endif #endif } #ifdef CONFIG_X86_STACK_PROTECTION __pinned_func void z_x86_set_stack_guard(k_thread_stack_t *stack) { int ret; /* Applied to all page tables as this affects supervisor mode. * XXX: This never gets reset when the thread exits, which can * cause problems if the memory is later used for something else. * See #29499 * * Guard page is always the first page of the stack object for both * kernel and thread stacks. */ ret = range_map_unlocked(stack, 0, CONFIG_MMU_PAGE_SIZE, MMU_P | ENTRY_XD, MASK_PERM, OPTION_FLUSH); __ASSERT_NO_MSG(ret == 0); ARG_UNUSED(ret); } #endif /* CONFIG_X86_STACK_PROTECTION */ #ifdef CONFIG_USERSPACE __pinned_func static bool page_validate(pentry_t *ptables, uint8_t *addr, bool write) { pentry_t *table = ptables; for (int level = 0; level < NUM_LEVELS; level++) { pentry_t entry = get_entry(table, addr, level); if (is_leaf(level, entry)) { #ifdef CONFIG_X86_KPTI if (is_flipped_pte(entry)) { /* We flipped this to prevent user access * since just clearing US isn't sufficient */ return false; } #endif /* US and RW bits still carry meaning if non-present. * If the data page is paged out, access bits are * preserved. If un-mapped, the whole entry is 0. */ if (((entry & MMU_US) == 0U) || (write && ((entry & MMU_RW) == 0U))) { return false; } } else { if ((entry & MMU_P) == 0U) { /* Missing intermediate table, address is * un-mapped */ return false; } table = next_table(entry, level); } } return true; } __pinned_func static inline void bcb_fence(void) { #ifdef CONFIG_X86_BOUNDS_CHECK_BYPASS_MITIGATION __asm__ volatile ("lfence" : : : "memory"); #endif } __pinned_func int arch_buffer_validate(const void *addr, size_t size, int write) { pentry_t *ptables = z_x86_thread_page_tables_get(_current); uint8_t *virt; size_t aligned_size; int ret = 0; /* addr/size arbitrary, fix this up into an aligned region */ (void)k_mem_region_align((uintptr_t *)&virt, &aligned_size, (uintptr_t)addr, size, CONFIG_MMU_PAGE_SIZE); for (size_t offset = 0; offset < aligned_size; offset += CONFIG_MMU_PAGE_SIZE) { if (!page_validate(ptables, virt + offset, write)) { ret = -1; break; } } bcb_fence(); return ret; } #ifdef CONFIG_X86_COMMON_PAGE_TABLE /* Very low memory configuration. A single set of page tables is used for * all threads. This relies on some assumptions: * * - No KPTI. If that were supported, we would need both a kernel and user * set of page tables. * - No SMP. If that were supported, we would need per-core page tables. * - Memory domains don't affect supervisor mode. * - All threads have the same virtual-to-physical mappings. * - Memory domain APIs can't be called by user mode. * * Because there is no SMP, only one set of page tables, and user threads can't * modify their own memory domains, we don't have to do much when * arch_mem_domain_* APIs are called. We do use a caching scheme to avoid * updating page tables if the last user thread scheduled was in the same * domain. * * We don't set CONFIG_ARCH_MEM_DOMAIN_DATA, since we aren't setting * up any arch-specific memory domain data (per domain page tables.) * * This is all nice and simple and saves a lot of memory. The cost is that * context switching is not trivial CR3 update. We have to reset all partitions * for the current domain configuration and then apply all the partitions for * the incoming thread's domain if they are not the same. We also need to * update permissions similarly on the thread stack region. */ __pinned_func static inline int reset_region(uintptr_t start, size_t size) { return range_map_unlocked((void *)start, 0, size, 0, 0, OPTION_FLUSH | OPTION_RESET); } __pinned_func static inline int apply_region(uintptr_t start, size_t size, pentry_t attr) { return range_map_unlocked((void *)start, 0, size, attr, MASK_PERM, OPTION_FLUSH); } /* Cache of the current memory domain applied to the common page tables and * the stack buffer region that had User access granted. */ static __pinned_bss struct k_mem_domain *current_domain; static __pinned_bss uintptr_t current_stack_start; static __pinned_bss size_t current_stack_size; __pinned_func void z_x86_swap_update_common_page_table(struct k_thread *incoming) { k_spinlock_key_t key; if ((incoming->base.user_options & K_USER) == 0) { /* Incoming thread is not a user thread. Memory domains don't * affect supervisor threads and we don't need to enable User * bits for its stack buffer; do nothing. */ return; } /* Step 1: Make sure the thread stack is set up correctly for the * for the incoming thread */ if (incoming->stack_info.start != current_stack_start || incoming->stack_info.size != current_stack_size) { if (current_stack_size != 0U) { reset_region(current_stack_start, current_stack_size); } /* The incoming thread's stack region needs User permissions */ apply_region(incoming->stack_info.start, incoming->stack_info.size, K_MEM_PARTITION_P_RW_U_RW); /* Update cache */ current_stack_start = incoming->stack_info.start; current_stack_size = incoming->stack_info.size; } /* Step 2: The page tables always have some memory domain applied to * them. If the incoming thread's memory domain is different, * update the page tables */ key = k_spin_lock(&z_mem_domain_lock); if (incoming->mem_domain_info.mem_domain == current_domain) { /* The incoming thread's domain is already applied */ goto out_unlock; } /* Reset the current memory domain regions... */ if (current_domain != NULL) { for (int i = 0; i < CONFIG_MAX_DOMAIN_PARTITIONS; i++) { struct k_mem_partition *ptn = &current_domain->partitions[i]; if (ptn->size == 0) { continue; } reset_region(ptn->start, ptn->size); } } /* ...and apply all the incoming domain's regions */ for (int i = 0; i < CONFIG_MAX_DOMAIN_PARTITIONS; i++) { struct k_mem_partition *ptn = &incoming->mem_domain_info.mem_domain->partitions[i]; if (ptn->size == 0) { continue; } apply_region(ptn->start, ptn->size, ptn->attr); } current_domain = incoming->mem_domain_info.mem_domain; out_unlock: k_spin_unlock(&z_mem_domain_lock, key); } /* If a partition was added or removed in the cached domain, update the * page tables. */ __pinned_func int arch_mem_domain_partition_remove(struct k_mem_domain *domain, uint32_t partition_id) { struct k_mem_partition *ptn; if (domain != current_domain) { return 0; } ptn = &domain->partitions[partition_id]; return reset_region(ptn->start, ptn->size); } __pinned_func int arch_mem_domain_partition_add(struct k_mem_domain *domain, uint32_t partition_id) { struct k_mem_partition *ptn; if (domain != current_domain) { return 0; } ptn = &domain->partitions[partition_id]; return apply_region(ptn->start, ptn->size, ptn->attr); } /* Rest of the APIs don't need to do anything */ __pinned_func int arch_mem_domain_thread_add(struct k_thread *thread) { return 0; } __pinned_func int arch_mem_domain_thread_remove(struct k_thread *thread) { return 0; } #else /* Memory domains each have a set of page tables assigned to them */ /* * Pool of free memory pages for copying page tables, as needed. */ #define PTABLE_COPY_SIZE (INITIAL_PTABLE_PAGES * CONFIG_MMU_PAGE_SIZE) static uint8_t __pinned_noinit page_pool[PTABLE_COPY_SIZE * CONFIG_X86_MAX_ADDITIONAL_MEM_DOMAINS] __aligned(CONFIG_MMU_PAGE_SIZE); __pinned_data static uint8_t *page_pos = page_pool + sizeof(page_pool); /* Return a zeroed and suitably aligned memory page for page table data * from the global page pool */ __pinned_func static void *page_pool_get(void) { void *ret; if (page_pos == page_pool) { ret = NULL; } else { page_pos -= CONFIG_MMU_PAGE_SIZE; ret = page_pos; } if (ret != NULL) { memset(ret, 0, CONFIG_MMU_PAGE_SIZE); } return ret; } /* Debugging function to show how many pages are free in the pool */ __pinned_func static inline unsigned int pages_free(void) { return (page_pos - page_pool) / CONFIG_MMU_PAGE_SIZE; } /** * Duplicate an entire set of page tables * * Uses recursion, but depth at any given moment is limited by the number of * paging levels. * * x86_mmu_lock must be held. * * @param dst a zeroed out chunk of memory of sufficient size for the indicated * paging level. * @param src some paging structure from within the source page tables to copy * at the indicated paging level * @param level Current paging level * @retval 0 Success * @retval -ENOMEM Insufficient page pool memory */ __pinned_func static int copy_page_table(pentry_t *dst, pentry_t *src, int level) { if (level == PTE_LEVEL) { /* Base case: leaf page table */ for (int i = 0; i < get_num_entries(level); i++) { dst[i] = pte_finalize_value(reset_pte(src[i]), true, PTE_LEVEL); } } else { /* Recursive case: allocate sub-structures as needed and * make recursive calls on them */ for (int i = 0; i < get_num_entries(level); i++) { pentry_t *child_dst; int ret; if ((src[i] & MMU_P) == 0) { /* Non-present, skip */ continue; } if ((level == PDE_LEVEL) && ((src[i] & MMU_PS) != 0)) { /* large page: no lower level table */ dst[i] = pte_finalize_value(src[i], true, PDE_LEVEL); continue; } __ASSERT((src[i] & MMU_PS) == 0, "large page encountered"); child_dst = page_pool_get(); if (child_dst == NULL) { return -ENOMEM; } /* Page table links are by physical address. RAM * for page tables is identity-mapped, but double- * cast needed for PAE case where sizeof(void *) and * sizeof(pentry_t) are not the same. */ dst[i] = ((pentry_t)k_mem_phys_addr(child_dst) | INT_FLAGS); ret = copy_page_table(child_dst, next_table(src[i], level), level + 1); if (ret != 0) { return ret; } } } return 0; } __pinned_func static int region_map_update(pentry_t *ptables, void *start, size_t size, pentry_t flags, bool reset) { uint32_t options = OPTION_USER; int ret; k_spinlock_key_t key; if (reset) { options |= OPTION_RESET; } if (ptables == z_x86_page_tables_get()) { options |= OPTION_FLUSH; } key = k_spin_lock(&x86_mmu_lock); ret = range_map_ptables(ptables, start, 0, size, flags, MASK_PERM, options); k_spin_unlock(&x86_mmu_lock, key); #ifdef CONFIG_SMP tlb_shootdown(); #endif return ret; } __pinned_func static inline int reset_region(pentry_t *ptables, void *start, size_t size) { LOG_DBG("%s(%p, %p, %zu)", __func__, ptables, start, size); return region_map_update(ptables, start, size, 0, true); } __pinned_func static inline int apply_region(pentry_t *ptables, void *start, size_t size, pentry_t attr) { LOG_DBG("%s(%p, %p, %zu, " PRI_ENTRY ")", __func__, ptables, start, size, attr); return region_map_update(ptables, start, size, attr, false); } __pinned_func static void set_stack_perms(struct k_thread *thread, pentry_t *ptables) { LOG_DBG("update stack for thread %p's ptables at %p: 0x%" PRIxPTR " (size %zu)", thread, ptables, thread->stack_info.start, thread->stack_info.size); apply_region(ptables, (void *)thread->stack_info.start, thread->stack_info.size, MMU_P | MMU_XD | MMU_RW | MMU_US); } /* * Arch interface implementations for memory domains and userspace */ __boot_func int arch_mem_domain_init(struct k_mem_domain *domain) { int ret; k_spinlock_key_t key = k_spin_lock(&x86_mmu_lock); LOG_DBG("%s(%p)", __func__, domain); #if __ASSERT_ON sys_snode_t *node; /* Assert that we have not already initialized this domain */ SYS_SLIST_FOR_EACH_NODE(&x86_domain_list, node) { struct arch_mem_domain *list_domain = CONTAINER_OF(node, struct arch_mem_domain, node); __ASSERT(list_domain != &domain->arch, "%s(%p) called multiple times", __func__, domain); } #endif /* __ASSERT_ON */ #ifndef CONFIG_X86_KPTI /* If we're not using KPTI then we can use the build time page tables * (which are mutable) as the set of page tables for the default * memory domain, saving us some memory. * * We skip adding this domain to x86_domain_list since we already * update z_x86_kernel_ptables directly in range_map(). */ if (domain == &k_mem_domain_default) { domain->arch.ptables = z_x86_kernel_ptables; k_spin_unlock(&x86_mmu_lock, key); return 0; } #endif /* CONFIG_X86_KPTI */ #ifdef CONFIG_X86_PAE /* PDPT is stored within the memory domain itself since it is * much smaller than a full page */ (void)memset(domain->arch.pdpt, 0, sizeof(domain->arch.pdpt)); domain->arch.ptables = domain->arch.pdpt; #else /* Allocate a page-sized top-level structure, either a PD or PML4 */ domain->arch.ptables = page_pool_get(); if (domain->arch.ptables == NULL) { k_spin_unlock(&x86_mmu_lock, key); return -ENOMEM; } #endif /* CONFIG_X86_PAE */ LOG_DBG("copy_page_table(%p, %p, 0)", domain->arch.ptables, z_x86_kernel_ptables); /* Make a copy of the boot page tables created by gen_mmu.py */ ret = copy_page_table(domain->arch.ptables, z_x86_kernel_ptables, 0); if (ret == 0) { sys_slist_append(&x86_domain_list, &domain->arch.node); } k_spin_unlock(&x86_mmu_lock, key); return ret; } int arch_mem_domain_partition_remove(struct k_mem_domain *domain, uint32_t partition_id) { struct k_mem_partition *partition = &domain->partitions[partition_id]; /* Reset the partition's region back to defaults */ return reset_region(domain->arch.ptables, (void *)partition->start, partition->size); } /* Called on thread exit or when moving it to a different memory domain */ int arch_mem_domain_thread_remove(struct k_thread *thread) { struct k_mem_domain *domain = thread->mem_domain_info.mem_domain; if ((thread->base.user_options & K_USER) == 0) { return 0; } if ((thread->base.thread_state & _THREAD_DEAD) == 0) { /* Thread is migrating to another memory domain and not * exiting for good; we weren't called from * z_thread_abort(). Resetting the stack region will * take place in the forthcoming thread_add() call. */ return 0; } /* Restore permissions on the thread's stack area since it is no * longer a member of the domain. */ return reset_region(domain->arch.ptables, (void *)thread->stack_info.start, thread->stack_info.size); } __pinned_func int arch_mem_domain_partition_add(struct k_mem_domain *domain, uint32_t partition_id) { struct k_mem_partition *partition = &domain->partitions[partition_id]; /* Update the page tables with the partition info */ return apply_region(domain->arch.ptables, (void *)partition->start, partition->size, partition->attr | MMU_P); } /* Invoked from memory domain API calls, as well as during thread creation */ __pinned_func int arch_mem_domain_thread_add(struct k_thread *thread) { int ret = 0; /* New memory domain we are being added to */ struct k_mem_domain *domain = thread->mem_domain_info.mem_domain; /* This is only set for threads that were migrating from some other * memory domain; new threads this is NULL. * * Note that NULL check on old_ptables must be done before any * address translation or else (NULL + offset) != NULL. */ pentry_t *old_ptables = UINT_TO_POINTER(thread->arch.ptables); bool is_user = (thread->base.user_options & K_USER) != 0; bool is_migration = (old_ptables != NULL) && is_user; /* Allow US access to the thread's stack in its new domain if * we are migrating. If we are not migrating this is done in * z_x86_current_stack_perms() */ if (is_migration) { old_ptables = k_mem_virt_addr(thread->arch.ptables); set_stack_perms(thread, domain->arch.ptables); } thread->arch.ptables = k_mem_phys_addr(domain->arch.ptables); LOG_DBG("set thread %p page tables to 0x%" PRIxPTR, thread, thread->arch.ptables); /* Check if we're doing a migration from a different memory domain * and have to remove permissions from its old domain. * * XXX: The checks we have to do here and in * arch_mem_domain_thread_remove() are clumsy, it may be worth looking * into adding a specific arch_mem_domain_thread_migrate() API. * See #29601 */ if (is_migration) { ret = reset_region(old_ptables, (void *)thread->stack_info.start, thread->stack_info.size); } #if !defined(CONFIG_X86_KPTI) && !defined(CONFIG_X86_COMMON_PAGE_TABLE) /* Need to switch to using these new page tables, in case we drop * to user mode before we are ever context switched out. * IPI takes care of this if the thread is currently running on some * other CPU. */ if (thread == _current && thread->arch.ptables != z_x86_cr3_get()) { z_x86_cr3_set(thread->arch.ptables); } #endif /* CONFIG_X86_KPTI */ return ret; } #endif /* !CONFIG_X86_COMMON_PAGE_TABLE */ __pinned_func int arch_mem_domain_max_partitions_get(void) { return CONFIG_MAX_DOMAIN_PARTITIONS; } /* Invoked from z_x86_userspace_enter */ __pinned_func void z_x86_current_stack_perms(void) { /* Clear any previous context in the stack buffer to prevent * unintentional data leakage. */ (void)memset((void *)_current->stack_info.start, 0xAA, _current->stack_info.size - _current->stack_info.delta); /* Only now is it safe to grant access to the stack buffer since any * previous context has been erased. */ #ifdef CONFIG_X86_COMMON_PAGE_TABLE /* Re run swap page table update logic since we're entering User mode. * This will grant stack and memory domain access if it wasn't set * already (in which case this returns very quickly). */ z_x86_swap_update_common_page_table(_current); #else /* Memory domain access is already programmed into the page tables. * Need to enable access to this new user thread's stack buffer in * its domain-specific page tables. */ set_stack_perms(_current, z_x86_thread_page_tables_get(_current)); #endif } #endif /* CONFIG_USERSPACE */ #ifdef CONFIG_ARCH_HAS_RESERVED_PAGE_FRAMES __boot_func static void mark_addr_page_reserved(uintptr_t addr, size_t len) { uintptr_t pos = ROUND_DOWN(addr, CONFIG_MMU_PAGE_SIZE); uintptr_t end = ROUND_UP(addr + len, CONFIG_MMU_PAGE_SIZE); for (; pos < end; pos += CONFIG_MMU_PAGE_SIZE) { if (!k_mem_is_page_frame(pos)) { continue; } k_mem_page_frame_set(k_mem_phys_to_page_frame(pos), K_MEM_PAGE_FRAME_RESERVED); } } __boot_func void arch_reserved_pages_update(void) { #ifdef CONFIG_X86_PC_COMPATIBLE /* * Best is to do some E820 or similar enumeration to specifically * identify all page frames which are reserved by the hardware or * firmware. Or use x86_memmap[] with Multiboot if available. * * But still, reserve everything in the first megabyte of physical * memory on PC-compatible platforms. */ mark_addr_page_reserved(0, MB(1)); #endif /* CONFIG_X86_PC_COMPATIBLE */ #ifdef CONFIG_X86_MEMMAP for (int i = 0; i < CONFIG_X86_MEMMAP_ENTRIES; i++) { struct x86_memmap_entry *entry = &x86_memmap[i]; switch (entry->type) { case X86_MEMMAP_ENTRY_UNUSED: __fallthrough; case X86_MEMMAP_ENTRY_RAM: continue; case X86_MEMMAP_ENTRY_ACPI: __fallthrough; case X86_MEMMAP_ENTRY_NVS: __fallthrough; case X86_MEMMAP_ENTRY_DEFECTIVE: __fallthrough; default: /* If any of three above cases satisfied, exit switch * and mark page reserved */ break; } mark_addr_page_reserved(entry->base, entry->length); } #endif /* CONFIG_X86_MEMMAP */ } #endif /* CONFIG_ARCH_HAS_RESERVED_PAGE_FRAMES */ int arch_page_phys_get(void *virt, uintptr_t *phys) { pentry_t pte = 0; int level, ret; __ASSERT(POINTER_TO_UINT(virt) % CONFIG_MMU_PAGE_SIZE == 0U, "unaligned address %p to %s", virt, __func__); pentry_get(&level, &pte, z_x86_page_tables_get(), virt); if ((pte & MMU_P) != 0) { if (phys != NULL) { *phys = (uintptr_t)get_entry_phys(pte, PTE_LEVEL); } ret = 0; } else { /* Not mapped */ ret = -EFAULT; } return ret; } #ifdef CONFIG_DEMAND_PAGING #define PTE_MASK (paging_levels[PTE_LEVEL].mask) __pinned_func void arch_mem_page_out(void *addr, uintptr_t location) { int ret; pentry_t mask = PTE_MASK | MMU_P | MMU_A; /* Accessed bit set to guarantee the entry is not completely 0 in * case of location value 0. A totally 0 PTE is un-mapped. */ ret = range_map(addr, location, CONFIG_MMU_PAGE_SIZE, MMU_A, mask, OPTION_FLUSH); __ASSERT_NO_MSG(ret == 0); ARG_UNUSED(ret); } __pinned_func void arch_mem_page_in(void *addr, uintptr_t phys) { int ret; pentry_t mask = PTE_MASK | MMU_P | MMU_D | MMU_A; ret = range_map(addr, phys, CONFIG_MMU_PAGE_SIZE, MMU_P, mask, OPTION_FLUSH); __ASSERT_NO_MSG(ret == 0); ARG_UNUSED(ret); } __pinned_func void arch_mem_scratch(uintptr_t phys) { page_map_set(z_x86_page_tables_get(), K_MEM_SCRATCH_PAGE, phys | MMU_P | MMU_RW | MMU_XD, NULL, MASK_ALL, OPTION_FLUSH); } __pinned_func uintptr_t arch_page_info_get(void *addr, uintptr_t *phys, bool clear_accessed) { pentry_t all_pte, mask; uint32_t options; /* What to change, if anything, in the page_map_set() calls */ if (clear_accessed) { mask = MMU_A; options = OPTION_FLUSH; } else { /* In this configuration page_map_set() just queries the * page table and makes no changes */ mask = 0; options = 0U; } page_map_set(z_x86_kernel_ptables, addr, 0, &all_pte, mask, options); /* Un-mapped PTEs are completely zeroed. No need to report anything * else in this case. */ if (all_pte == 0) { return ARCH_DATA_PAGE_NOT_MAPPED; } #if defined(CONFIG_USERSPACE) && !defined(CONFIG_X86_COMMON_PAGE_TABLE) /* Don't bother looking at other page tables if non-present as we * are not required to report accurate accessed/dirty in this case * and all mappings are otherwise the same. */ if ((all_pte & MMU_P) != 0) { sys_snode_t *node; /* IRQs are locked, safe to do this */ SYS_SLIST_FOR_EACH_NODE(&x86_domain_list, node) { pentry_t cur_pte; struct arch_mem_domain *domain = CONTAINER_OF(node, struct arch_mem_domain, node); page_map_set(domain->ptables, addr, 0, &cur_pte, mask, options | OPTION_USER); /* Logical OR of relevant PTE in all page tables. * addr/location and present state should be identical * among them. */ all_pte |= cur_pte; } } #endif /* USERSPACE && ~X86_COMMON_PAGE_TABLE */ /* NOTE: We are truncating the PTE on PAE systems, whose pentry_t * are larger than a uintptr_t. * * We currently aren't required to report back XD state (bit 63), and * Zephyr just doesn't support large physical memory on 32-bit * systems, PAE was only implemented for XD support. */ if (phys != NULL) { *phys = (uintptr_t)get_entry_phys(all_pte, PTE_LEVEL); } /* We don't filter out any other bits in the PTE and the kernel * ignores them. For the case of ARCH_DATA_PAGE_NOT_MAPPED, * we use a bit which is never set in a real PTE (the PAT bit) in the * current system. * * The other ARCH_DATA_PAGE_* macros are defined to their corresponding * bits in the PTE. */ return (uintptr_t)all_pte; } __pinned_func enum arch_page_location arch_page_location_get(void *addr, uintptr_t *location) { pentry_t pte; int level; /* TODO: since we only have to query the current set of page tables, * could optimize this with recursive page table mapping */ pentry_get(&level, &pte, z_x86_page_tables_get(), addr); if (pte == 0) { /* Not mapped */ return ARCH_PAGE_LOCATION_BAD; } __ASSERT(level == PTE_LEVEL, "bigpage found at %p", addr); *location = (uintptr_t)get_entry_phys(pte, PTE_LEVEL); if ((pte & MMU_P) != 0) { return ARCH_PAGE_LOCATION_PAGED_IN; } else { return ARCH_PAGE_LOCATION_PAGED_OUT; } } #ifdef CONFIG_X86_KPTI __pinned_func bool z_x86_kpti_is_access_ok(void *addr, pentry_t *ptables) { pentry_t pte; int level; pentry_get(&level, &pte, ptables, addr); /* Might as well also check if it's un-mapped, normally we don't * fetch the PTE from the page tables until we are inside * k_mem_page_fault() and call arch_page_fault_status_get() */ if (level != PTE_LEVEL || pte == 0 || is_flipped_pte(pte)) { return false; } return true; } #endif /* CONFIG_X86_KPTI */ #endif /* CONFIG_DEMAND_PAGING */ ```
```objective-c // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_DOUBLE_H_ #define V8_DOUBLE_H_ #include "src/diy-fp.h" namespace v8 { namespace internal { // We assume that doubles and uint64_t have the same endianness. inline uint64_t double_to_uint64(double d) { return bit_cast<uint64_t>(d); } inline double uint64_to_double(uint64_t d64) { return bit_cast<double>(d64); } // Helper functions for doubles. class Double { public: static const uint64_t kSignMask = V8_2PART_UINT64_C(0x80000000, 00000000); static const uint64_t kExponentMask = V8_2PART_UINT64_C(0x7FF00000, 00000000); static const uint64_t kSignificandMask = V8_2PART_UINT64_C(0x000FFFFF, FFFFFFFF); static const uint64_t kHiddenBit = V8_2PART_UINT64_C(0x00100000, 00000000); static const int kPhysicalSignificandSize = 52; // Excludes the hidden bit. static const int kSignificandSize = 53; Double() : d64_(0) {} explicit Double(double d) : d64_(double_to_uint64(d)) {} explicit Double(uint64_t d64) : d64_(d64) {} explicit Double(DiyFp diy_fp) : d64_(DiyFpToUint64(diy_fp)) {} // The value encoded by this Double must be greater or equal to +0.0. // It must not be special (infinity, or NaN). DiyFp AsDiyFp() const { DCHECK(Sign() > 0); DCHECK(!IsSpecial()); return DiyFp(Significand(), Exponent()); } // The value encoded by this Double must be strictly greater than 0. DiyFp AsNormalizedDiyFp() const { DCHECK(value() > 0.0); uint64_t f = Significand(); int e = Exponent(); // The current double could be a denormal. while ((f & kHiddenBit) == 0) { f <<= 1; e--; } // Do the final shifts in one go. f <<= DiyFp::kSignificandSize - kSignificandSize; e -= DiyFp::kSignificandSize - kSignificandSize; return DiyFp(f, e); } // Returns the double's bit as uint64. uint64_t AsUint64() const { return d64_; } // Returns the next greater double. Returns +infinity on input +infinity. double NextDouble() const { if (d64_ == kInfinity) return Double(kInfinity).value(); if (Sign() < 0 && Significand() == 0) { // -0.0 return 0.0; } if (Sign() < 0) { return Double(d64_ - 1).value(); } else { return Double(d64_ + 1).value(); } } int Exponent() const { if (IsDenormal()) return kDenormalExponent; uint64_t d64 = AsUint64(); int biased_e = static_cast<int>((d64 & kExponentMask) >> kPhysicalSignificandSize); return biased_e - kExponentBias; } uint64_t Significand() const { uint64_t d64 = AsUint64(); uint64_t significand = d64 & kSignificandMask; if (!IsDenormal()) { return significand + kHiddenBit; } else { return significand; } } // Returns true if the double is a denormal. bool IsDenormal() const { uint64_t d64 = AsUint64(); return (d64 & kExponentMask) == 0; } // We consider denormals not to be special. // Hence only Infinity and NaN are special. bool IsSpecial() const { uint64_t d64 = AsUint64(); return (d64 & kExponentMask) == kExponentMask; } bool IsInfinite() const { uint64_t d64 = AsUint64(); return ((d64 & kExponentMask) == kExponentMask) && ((d64 & kSignificandMask) == 0); } int Sign() const { uint64_t d64 = AsUint64(); return (d64 & kSignMask) == 0? 1: -1; } // Precondition: the value encoded by this Double must be greater or equal // than +0.0. DiyFp UpperBoundary() const { DCHECK(Sign() > 0); return DiyFp(Significand() * 2 + 1, Exponent() - 1); } // Returns the two boundaries of this. // The bigger boundary (m_plus) is normalized. The lower boundary has the same // exponent as m_plus. // Precondition: the value encoded by this Double must be greater than 0. void NormalizedBoundaries(DiyFp* out_m_minus, DiyFp* out_m_plus) const { DCHECK(value() > 0.0); DiyFp v = this->AsDiyFp(); bool significand_is_zero = (v.f() == kHiddenBit); DiyFp m_plus = DiyFp::Normalize(DiyFp((v.f() << 1) + 1, v.e() - 1)); DiyFp m_minus; if (significand_is_zero && v.e() != kDenormalExponent) { // The boundary is closer. Think of v = 1000e10 and v- = 9999e9. // Then the boundary (== (v - v-)/2) is not just at a distance of 1e9 but // at a distance of 1e8. // The only exception is for the smallest normal: the largest denormal is // at the same distance as its successor. // Note: denormals have the same exponent as the smallest normals. m_minus = DiyFp((v.f() << 2) - 1, v.e() - 2); } else { m_minus = DiyFp((v.f() << 1) - 1, v.e() - 1); } m_minus.set_f(m_minus.f() << (m_minus.e() - m_plus.e())); m_minus.set_e(m_plus.e()); *out_m_plus = m_plus; *out_m_minus = m_minus; } double value() const { return uint64_to_double(d64_); } // Returns the significand size for a given order of magnitude. // If v = f*2^e with 2^p-1 <= f <= 2^p then p+e is v's order of magnitude. // This function returns the number of significant binary digits v will have // once its encoded into a double. In almost all cases this is equal to // kSignificandSize. The only exception are denormals. They start with leading // zeroes and their effective significand-size is hence smaller. static int SignificandSizeForOrderOfMagnitude(int order) { if (order >= (kDenormalExponent + kSignificandSize)) { return kSignificandSize; } if (order <= kDenormalExponent) return 0; return order - kDenormalExponent; } private: static const int kExponentBias = 0x3FF + kPhysicalSignificandSize; static const int kDenormalExponent = -kExponentBias + 1; static const int kMaxExponent = 0x7FF - kExponentBias; static const uint64_t kInfinity = V8_2PART_UINT64_C(0x7FF00000, 00000000); const uint64_t d64_; static uint64_t DiyFpToUint64(DiyFp diy_fp) { uint64_t significand = diy_fp.f(); int exponent = diy_fp.e(); while (significand > kHiddenBit + kSignificandMask) { significand >>= 1; exponent++; } if (exponent >= kMaxExponent) { return kInfinity; } if (exponent < kDenormalExponent) { return 0; } while (exponent > kDenormalExponent && (significand & kHiddenBit) == 0) { significand <<= 1; exponent--; } uint64_t biased_exponent; if (exponent == kDenormalExponent && (significand & kHiddenBit) == 0) { biased_exponent = 0; } else { biased_exponent = static_cast<uint64_t>(exponent + kExponentBias); } return (significand & kSignificandMask) | (biased_exponent << kPhysicalSignificandSize); } }; } } // namespace v8::internal #endif // V8_DOUBLE_H_ ```
```xml /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import { OverlayToaster } from "./overlayToaster"; import type { OverlayToasterProps } from "./overlayToasterProps"; import type { ToastProps } from "./toastProps"; export type ToastOptions = ToastProps & { key: string }; /** Instance methods available on a toaster component instance. */ export interface Toaster { /** * Shows a new toast to the user, or updates an existing toast corresponding to the provided key (optional). * * Returns the unique key of the toast. */ show(props: ToastProps, key?: string): string; /** Dismiss the given toast instantly. */ dismiss(key: string): void; /** Dismiss all toasts instantly. */ clear(): void; /** Returns the props for all current toasts. */ getToasts(): ToastOptions[]; } export type ToasterInstance = Toaster; // merges with declaration of `Toaster` type in `toasterTypes.ts` // kept for backwards-compatibility with v4.x // eslint-disable-next-line @typescript-eslint/no-redeclare export const Toaster = { // eslint-disable-next-line deprecation/deprecation create: deprecatedToasterCreate, }; /** @deprecated use OverlayToaster.create() instead */ function deprecatedToasterCreate(props?: OverlayToasterProps, container = document.body): Toaster { return OverlayToaster.create(props, container); } ```
```javascript import { app, dialog, BrowserWindow } from 'electron' import multiline from 'multiline-template' const appName = app.name const detail = multiline` | Created by Jhen-Jie Hong | (path_to_url | This software includes the following projects: | path_to_url | path_to_url | path_to_url ` export const showAboutDialog = (iconPath) => dialog.showMessageBoxSync({ title: 'About', message: `${appName} ${app.getVersion()}`, detail, icon: iconPath, buttons: [], }) export const haveOpenedWindow = () => !!BrowserWindow.getAllWindows().length ```
Pop Mašina (; trans. Pop Machine) was a Yugoslav progressive rock band formed in Belgrade in 1972. Pop Mašina was one of the most notable bands of the Yugoslav rock scene in the 1970s. Pop Mašina was formed by bass guitarist and vocalist Robert Nemeček, guitarist and vocalist Zoran Božinović, drummer Ratislav "Raša" Đelmaš and vocalist Sava Bojić. Đelmaš and Bojić left Pop Mašina soon after its formation, and the band continued as a trio with the new drummer, Mihajlo "Bata" Popović. The lineup featuring Nemeček, Zoran Božinović and Popović is the longest lasting, the most successful and the best known Pop Mašina lineup. Pop Mašina was one of the first bands on the Yugoslav rock scene to move towards heavier rock sound, managing to gain large popularity as a live act with their hard rock sound with blues, psychedelic and acid rock elements. The band released two studio albums and a live album – their debut Kiselina (Acid) today considered one of the most important records in the history of Yugoslav rock – before Nemeček left the band in 1976 for his mandatory army stint. Zoran Božinović continued to lead Pop Mašina, the new lineup featuring his brother Vidoja "Džindžer" Božinović on guitar. New lineups of Pop Mašina had little success, and the band officially disbanded in 1978. In 1980 Nemeček and the Božinović brothers formed the short-lasting hard rock and heavy metal band Rok Mašina (Rock Machine). Band history 1972–1978 The band was formed in Belgrade in 1972 by Robert Nemeček (a former member of the bands Dogovor iz 1804., Džentlmeni, and Intro, bass guitar and vocals), Zoran Božinović (a former member of Excellent, Rokeri, Džentlmeni, and Intro, guitar and vocals), Ratislav "Raša" Đelmaš (drums) and Sava Bojić (vocals). Very soon, Bojić left the band (in 1974 he would join the progressive rock band Tako), and soon after Đelmaš also left, joining YU Grupa. Đelmaš was replaced by a former Intro and Siluete member Mihajlo "Bata" Popović, Pop Mašina continuing as a power trio. Pop Mašina was one of the first bands on the Yugoslav rock scene to move towards heavier rock sound. They often held free concerts, and in 1972 they organized a free open-air concert at Hajdučka česma in Belgrade which featured, alongside Pop Mašina, performances by S Vremena Na Vreme, Porodična Manufaktura Crnog Hleba and other bands. The following year, on 25 May, which was celebrated as Youth Day in Yugoslavia, Pop Mašina organized another free concert at Hajdučka česma, which featured the bands Jutro, Grupa 220, Vlada i Bajka and others. In 1973 Pop Mašina released their debut album, Kiselina (Acid), through PGP-RTB record label. The album featured hard rock sound with psychedelic and acid rock elements, but also featured acoustic sections in the tracks like "Mir" ("Peace") and "Povratak zvezdama" ("Return to the Stars"). The album's main theme was a psychedelic experience; originally, the opening track should have been "Tražim put" ("I'm Searching for a Road"), allegorically describing narrator's attempts to find a drug dealer. In a 2011 interview Nemeček stated that he wrote the original lyrics for the album after some notes he made while being under the influence of LSD. However, the band realized the censors in the state-owned PGP-RTB might refuse to approve the release of the album and decided to cover up the album concept. They made numerous changes to the songs and altered the original track listing. The original album cover, designed by cartoonist and graphic designer Jugoslav Vlahović, who was aware of the album concept, featured psychedelic artwork inspired by the psychedelic portraits of The Beatles. However, realizing that the artwork might reveal the album's theme to PGP-RTB censors and editors, band members and Vlahović decided to put a simple photograph of the band on the cover. The photograph was made only several days before printing of the cover and the album release. Kiselina featured numerous guest musicians: Pop Mašina former member Raša Đelmaš on drums, a former Porodična Manufaktura Crnog Hleba member Branimir Malkoč on flute, Sloba Marković on keyboards, SOS member Miša Aleksić on bass guitar, and singer-songwriter Drago Mlinarec, S Vremena Na Vreme members Ljuba Ninković and Vojislav Đukić and the members of the trio DAG on backing vocals. Pop Mašina and S Vremena Na Vreme continued to cooperate in studio and on live appearances, and in 1975 Nemeček would appear as a guest on S Vremena Na Vreme self-titled debut album. Despite the band's efforts to cover up the album theme, after its release a journalist for the Ilustrovana Politika magazine who spent some time in the United States revealed the true meaning of the album title to the PGP-RTB editors. After the release of Kiselina, the band held a large number of concerts across Yugoslavia. They had numerous performances in Belgrade Sports Hall. These concerts were organized with the help of Aleksandar Tijanić, at the time a journalism student, and other Yugoslav progressive rock bands were often invited to perform. Pop Mašina had an attractive on-stage appearance: Božinović was one of the first former Yugoslav guitarists that played long guitar solos and used to play guitar with a bow and behind his back. On one of these concerts Nemeček smashed his bass guitar and threw it into the audience; it was caught by young musician Miroslav Cvetković, who fixed it and started playing it. Cvetković would later himself become a member of Pop Mašina. At the beginning of 1975, in Akademik Studio in Ljubljana, the band recorded their second studio album, Na izvoru svetlosti (At the Spring of Light). The album was produced by Ivo Umek and Nemeček. It featured Ljuba Ninković and Sloba Marković as guest musicians. The album featured one live track, the blues song "Negde daleko" ("Somewhere Far Away"), recorded on the band's concert held in Belgrade Sports Hall on 2 January 1974. The song "Rekvijem za prijatelja" ("Requiem for a Friend"), with lyrics written by Ljuba Ninković, was dedicated to Predrag Jovičić, the vocalist of the band San, who earlier that year died from an electric shock on a concert in Čair Sports Center in Niš. The album also featured a new version of the song "Zemlja svetlosti" ("Land of Light"), previously released on a 7-inch single. After the album release, the band was joined by the keyboardist Oliver Mandić. However, he left the band after only several performances, later gaining fame as a solo artist. In 1976, the band released the live album Put ka Suncu (Road to Sun), recorded on three different performances in Belgrade Sports Hall, thus becoming the first Yugoslav band to release a solo live album (as prior to Put ka Suncu only various artists live albums were released). At the end of 1976, Nemeček left the band to serve his mandatory stint in the Yugoslav army, Mihajlović leaving the band soon after. Zoran Božinović was joined by his brother, guitarist Vidoja "Džindžer" Božinović (a former Dim Bez Vatre member), bass guitarist Dušan "Duda" Petrović and drummer Dušan "Đuka" Đukić (a former Innamorata member). The new Pop Mašina lineup started experimenting with jazz rock sound, but soon turned to conventional hard rock. After Nemeček returned from the army, he did not rejoin Pop Mašina; he moved to London, where he started working in the music instruments company Toma & Co. From London he also wrote for Yugoslav magazines RTV revija (Radio and Television Revue) and YU video. The new Pop Mašina lineup recorded only one 7-inch single, with the songs "Moja pesma" ("My Song") and "Uspomena" ("Memory"). They performed, alongside Zdravo, Zlatni Prsti, Drugi Način, Parni Valjak, Time and other bands, on a concert in Belgrade's Pinki Hall, the recordings of their songs "Sećanja" ("Memories") and "Moja pesma" appearing on the various aritsts live labum Pop Parada 1 (Pop Parade 1) recorded on the concert. In 1977, Petrović left the band, joining Generacija 5, and was replaced by Miroslav "Cvele" Cvetković (a former Tilt member). This lineup announced the recording of a new album, but disbanded in 1978. Post-breakup, Rok Mašina and post-Rok Mašina After Pop Mašina disbanded, Vidoja Božinović and Dušan Đukić joined the band Dah. After Dah disbanded in 1979, Božinović joined the band Opus in which he spent only six months. After he returned from London, Nemeček worked in Dadov Theatre as an editor of the theatre's rock program. In 1980 Nemeček, Božinović brothers and drummer Vladan Dokić formed the hard rock and heavy metal band Rok Mašina, which released only one self-title album before disbanding in 1982. Part of the material they recorded for their second album was released in 1983 on the EP Izrod na granici (Bastard on the Border). After Rok Mašina disbanded, Zoran Božinović retired from music. In the 1990s he returned to performing, playing with the blues rock band Zona B. He died in 2004. Vidoja Božinovič dedicated himself to his studies of architecture, performed in blues clubs and with the jazz band Interactive before joining Riblja Čorba in 1984. Nemeček became the film program editor at RTV Politika, and in the 1990s became the editor of film program on Television Pink. In 1994, a remastered version of Kiselina was released on CD by Serbian record label ITVMM. The release featured the songs "Put ka Suncu" and "Sjaj u očima" ("Glowing Eyes"), originally released on Pop Mašina's first 7-inch single, as bonus track. During the same year, the song "Kiselina" was released on Komuna compilation album Plima: Progresivna muzika (Tide: Progressive Music) which featured songs by Yugoslav progressive rock artists. In 2000, Kiselina was reissued on CD by Polish record label Wydawnictwo 21, in a limited number of 500 copies and featuring four bonus tracks. In 2005, the album was reissued on vinyl by Austrian record label Atlantide. In 2007, to celebrate 35 years since the release of Kiselina, Nemeček, in cooperation with Serbian label MCG records, released the CD Originalna Kiselina – 35 godina kasnije (Original Acid – 35 Years Later) in a limited number of 999 copies. The release featured original Kiselina track listing and different song mixes. In 2008, Internut Music and Multimedia Records released the box set Antologija 1972 – 1976 (Anthology 1972 – 1976), which featured all the recordings released by Pop Mašina, 9 unreleased tracks, a recording of a concert in Belgrade Sports Hall, and a book about the band. The band's former bass guitarist Dušan Petrović died on 17 October 2003. The band's forming member Ratislav "Raša" Đelmaš died in Belgrade on 28 October 2021. Legacy The song "Zemlja svetlosti" was covered by Serbian and Yugoslav alternative rock band Disciplina Kičme on their 1991 album Nova iznenađenja za nova pokolenja (New Surprises for New Generations). The song "Sećanja" ("Memories") was covered by Serbian and Yugoslav singer-songwriter Nikola Čuturilo on his 2011 album Tu i sad (Here and Now), Vidoja Božinović making a guest appearance on the track. Songs "Negde daleko" and "Put na suncu" were covered in 2019 by Serbian blues rock band Texas Flood on their cover album Tražim ljude kao ja (I'm Looking for the People like Me). The album Kiselina was polled in 1998 as 60th on the list of 100 greatest Yugoslav popular music albums in the book YU 100: najbolji albumi jugoslovenske rok i pop muzike (YU 100: The Best albums of Yugoslav pop and rock music). The song "Put ka Suncu" was polled in 2000 as 92nd on Rock Express Top 100 Yugoslav Rock Songs of All Times list. On 5 October 2005, in Belgrade's Bard Club, a concert dedicated to Zoran Božinović was held. The musicians performing on the concert included his brother Vidoja, Miroslav Cvetković (of Bajaga i Instruktori, formerly of Pop Mašina), Nebojša Antonijević (of Partibrejkers), Dejan Cukić, Petar Radmilović (of Đorđe Balašević's backing band), Dušan Kojić (of Disciplina Kičme), Branislav Petrović (of Električni Orgazam), Dušan Đukić (formerly of Pop Mašina), Nikola Čuturilo, Manja Đorđević (of Disciplina Kičme), Vladimir Đorđević (of Lira Vega and Sila), Vlada Negovanović, the bands Van Gogh and Zona B, and others. The recording of the concert was released on the DVD Put ka Suncu – Noć posvećena Zoranu Božinoviću (Road to Sun – A Night Dedicated to Zoran Božinović). Band members Robert Nemeček – bass guitar, vocals (1972–1976) Zoran Božinović – guitar, vocals (1972–1978) Ratislav "Raša" Đelmaš – drums (1972) Sava Bojić – guitar, vocals (1972) Mihajlo "Bata" Popović – drums, percussion (1972–1976) Oliver Mandić – keyboards, vocals (1975) Dušan "Duda" Petrović – bass guitar (1976–1977) Dušan "Đuka" Đukić – drums (1976–1978) Vidoja "Džindžer" Božinović – guitar (1976–1978) Miroslav "Cvele" Cvetković – bass guitar, vocals (1977–1978) Discography Studio albums Kiselina (1973) Na izvoru svetlosti (1975) Live albums Put ka Suncu (1976) Box sets Antologija 1972 – 1976 (2008) Compilations Na drumu za haos 1972-2017 (2017) Singles "Put ka Suncu" / "Sjaj u očima" (1972) "Promenićemo svet" / "Svemirska priča" (1973) "Zemlja svetlosti" / "Dugo lutanje kroz noć" (1974) "Sećanja" / "Rekvijem za prijatelja" (1975) "Moja pesma" / "Uspomena" (1977) Other appearances "Sećanje" / "Moja pesma" (Pop Parada 1, 1977) References External links Official website Pop Mašina at Discogs Pop Mašina at Prog Archives See also Rok Mašina Serbian rock music groups Serbian progressive rock groups Serbian hard rock musical groups Serbian psychedelic rock music groups Serbian blues rock musical groups Yugoslav rock music groups Yugoslav progressive rock groups Yugoslav hard rock musical groups Yugoslav psychedelic rock music groups Acid rock music groups Musical groups from Belgrade Musical trios Musical groups established in 1972 Musical groups disestablished in 1978 1972 establishments in Yugoslavia 1978 disestablishments in Yugoslavia
```html <!-- path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <div> <mat-card appearance="outlined" class="auto-commit-settings settings-card"> <mat-card-header> <mat-card-title> <span class="mat-headline-5" translate>admin.auto-commit-settings</span> </mat-card-title> <span fxFlex></span> <div tb-help="autoCommitSettings"></div> </mat-card-header> <mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async"> </mat-progress-bar> <div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> <mat-card-content style="padding-top: 16px;"> <form [formGroup]="autoCommitSettingsForm" #formDirective="ngForm" (ngSubmit)="save()"> <fieldset class="fields-group" [disabled]="(isLoading$ | async) || (isReadOnly | async)"> <legend class="group-title" translate>admin.auto-commit-entities</legend> <div fxLayout="column"> <div *ngFor="let entityTypeFormGroup of entityTypesFormGroupArray(); trackBy: trackByEntityType; let $index = index; last as isLast;" fxLayout="row" fxLayoutAlign="start center" [ngStyle]="!isLast ? {paddingBottom: '8px'} : {}"> <mat-expansion-panel class="entity-type-config" fxFlex [formGroup]="entityTypeFormGroup" [expanded]="entityTypesFormGroupExpanded(entityTypeFormGroup)"> <mat-expansion-panel-header> <div fxFlex fxLayout="row" fxLayoutAlign="start center"> <mat-panel-title> <div fxLayout="row" fxFlex fxLayoutAlign="start center"> <div [innerHTML]="entityTypeText(entityTypeFormGroup)"></div> </div> </mat-panel-title> <span fxFlex></span> <button mat-icon-button style="min-width: 40px;" type="button" (click)="removeEntityType($index)" matTooltip="{{ 'action.remove' | translate }}" matTooltipPosition="above"> <mat-icon>delete</mat-icon> </button> </div> </mat-expansion-panel-header> <ng-template matExpansionPanelContent> <div class="entity-type-config-content" fxLayout="column" fxLayoutGap="0.5em"> <mat-divider></mat-divider> <div fxLayout="column" fxLayout.gt-lg="row" fxLayoutGap.gt-lg="16px"> <div fxLayout="row" fxLayoutGap="16px" fxLayout.xs="column" fxLayoutGap.xs="0px"> <tb-entity-type-select showLabel formControlName="entityType" required [filterAllowedEntityTypes]="false" [allowedEntityTypes]="allowedEntityTypes(entityTypeFormGroup)"> </tb-entity-type-select> <div formGroupName="config"> <tb-branch-autocomplete emptyPlaceholder="{{ 'version-control.default' | translate }}" [selectDefaultBranch]="false" formControlName="branch"> </tb-branch-autocomplete> </div> </div> <div fxFlex fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="16px" fxLayout.xs="column" fxLayoutAlign.xs="start start" fxLayoutGap.xs="0px" formGroupName="config"> <mat-checkbox *ngIf="entityTypeFormGroup.get('entityType').value === entityTypes.DEVICE" formControlName="saveCredentials"> {{ 'version-control.export-credentials' | translate }} </mat-checkbox> <mat-checkbox formControlName="saveAttributes"> {{ 'version-control.export-attributes' | translate }} </mat-checkbox> <mat-checkbox formControlName="saveRelations"> {{ 'version-control.export-relations' | translate }} </mat-checkbox> </div> </div> </div> </ng-template> </mat-expansion-panel> </div> <div *ngIf="!entityTypesFormGroupArray().length"> <span translate fxLayoutAlign="center center" class="tb-prompt">admin.no-auto-commit-entities-prompt</span> </div> <div style="padding-top: 16px;" fxLayout="row"> <button mat-raised-button color="primary" type="button" [disabled]="!addEnabled()" (click)="addEntityType()"> <span translate>version-control.add-entity-type</span> </button> <span fxFlex></span> <button mat-raised-button color="primary" type="button" [disabled]="!entityTypesFormGroupArray().length" (click)="removeAll()"> <span translate>version-control.remove-all</span> </button> </div> </div> </fieldset> <div class="tb-hint" *ngIf="isReadOnly | async" translate>version-control.auto-commit-settings-read-only-hint</div> <div fxLayout="row" fxLayoutAlign="end center" fxLayout.xs="column" fxLayoutAlign.xs="end" fxLayoutGap="16px"> <button mat-raised-button color="warn" type="button" [fxShow]="settings !== null" [disabled]="(isLoading$ | async) || (isReadOnly | async)" (click)="delete(formDirective)"> {{'action.delete' | translate}} </button> <span fxFlex></span> <button mat-raised-button color="primary" [disabled]="(isLoading$ | async) || (isReadOnly | async) || autoCommitSettingsForm.invalid || !autoCommitSettingsForm.dirty" type="submit">{{'action.save' | translate}} </button> </div> </form> </mat-card-content> </mat-card> </div> ```
```xml <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url"> <!-- The definition of the Root Spring Container shared by all Servlets and Filters --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring/root-context.xml</param-value> </context-param> <!-- Creates the Spring Container shared by all Servlets and Filters --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- Processes application requests --> <servlet> <servlet-name>appServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring/spring.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>appServlet</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <error-page> <error-code>404</error-code> <location>/resources/404.jsp</location> </error-page> </web-app> ```
Harry George Matuzak (January 27, 1910 – November 16, 1978) was a professional baseball player. He was a right-handed pitcher over parts of two seasons (1934, 1936) with the Philadelphia Athletics. For his career, he compiled an 0–4 record, with a 5.77 earned run average, and 35 strikeouts in 39 innings pitched. He was born in Omer, Michigan and died in Fairhope, Alabama at the age of 68. External links 1910 births 1978 deaths Philadelphia Athletics players Major League Baseball pitchers Baseball players from Michigan Oklahoma City Indians players Tulsa Oilers (baseball) players Albany Senators players Baltimore Orioles (International League) players Memphis Chickasaws players Montreal Royals players Birmingham Barons players People from Arenac County, Michigan McCook Generals players
```python import urllib.request import tensorflow as tf import itertools URL = 'path_to_url DST_ORIG = 'fsns-00000-of-00001.orig' DST = 'fsns-00000-of-00001' KEEP_NUM_RECORDS = 5 print('Downloading %s ...' % URL) urllib.request.urlretrieve(URL, DST_ORIG) print('Writing %d records from %s to %s ...' % (KEEP_NUM_RECORDS, DST_ORIG, DST)) with tf.io.TFRecordWriter(DST) as writer: for raw_record in itertools.islice(tf.compat.v1.python_io.tf_record_iterator(DST_ORIG), KEEP_NUM_RECORDS): writer.write(raw_record) ```
```python """ Display random animal facts from * path_to_url * path_to_url and random cat images from * path_to_url * path_to_url More free APIs: path_to_url This example shows how to use multiprocessing to run a service in a separate process. The service will run in the background and return data to the main process when it's ready. This is a good way to keep your main game loop running smoothly while waiting for data. This method is acceptable for simpler types of games. Some extra latency may be introduced when using this method. The example also shows that we can send textures between processes. Some of these services may go down or change their API, so this code may not work as expected. If you find a service that is no longer working, please make a pull request! Controls: SPACE: Request a new fact OR wait for the next fact to be displayed F: Toggle fullscreen ESC: Close the window If Python and Arcade are installed, this example can be run from the command line with: python -m arcade.examples.net_process_animal_facts """ import PIL.Image import random import time import json import urllib.request import multiprocessing as mp from queue import Empty import arcade from arcade.math import clamp CHOICES = ["meow", "woof"] # Which facts to display class AnimalFacts(arcade.View): """Display a random cat fact""" def __init__(self): super().__init__() self.loading = False self.text_fact = arcade.Text( "", x=self.window.width / 2, y=self.window.height / 2 + 50, width=1100, font_size=36, anchor_x="center", anchor_y="center", multiline=True, ) self.text_info = arcade.Text( "Press SPACE to request new fact", font_size=20, x=20, y=40, color=arcade.color.LIGHT_BLUE, ) self.angle = 0 # Rotation for the spinning loading initicator # Keep track of time to auto request new facts self.update_interval = 30 # seconds self.last_updated = 0 # Background image self.bg_texture_1 = None self.bg_texture_2 = None # Keep track of when we last updated the background image (for fading) self.bg_updated_time = 0 def on_draw(self): """Draw the next frame""" self.clear() # Draw a background image fading between two images if needed fade = clamp(time.time() - self.bg_updated_time, 0.0, 1.0) self.draw_background(self.bg_texture_1, fade * 0.35) if fade < 1.0: self.draw_background(self.bg_texture_2, 0.35 * (1.0 - fade)) # Draw the fact text self.text_fact.draw() # Draw a spinning circle while we wait for a fact if self.loading: arcade.draw_rect_filled( arcade.XYWH(self.window.width - 50, self.window.height - 50, 50, 50), color=arcade.color.ORANGE, tilt_angle=self.angle, ) # Draw a progress bar to show how long until we request a new fact progress = 1.0 - ((time.time() - self.last_updated) / self.update_interval) if progress > 0: arcade.draw_lrbt_rectangle_filled( left=0, right=self.window.width * progress, bottom=0, top=20, color=arcade.color.LIGHT_KHAKI ) # Draw info text self.text_info.draw() def draw_background(self, texture: arcade.Texture, alpha: int) -> None: """Draw a background image attempting to fill the entire window""" if texture is None: return # Get the highest ratio of width or height to fill the window scale = max(self.window.width / texture.width, self.window.height / texture.height) arcade.draw_texture_rect( texture, arcade.XYWH( self.window.width / 2, self.window.height / 2, texture.width * scale, texture.height * scale, ), blend=True, alpha=int(alpha * 255), ) def on_update(self, delta_time: float): """Update state for the next frame""" # Keep spinning the loading indicator self.angle += delta_time * 400 # Request a new fact if it's time to do so if time.time() - self.last_updated > self.update_interval: self.request_new_fact() # Check if we have some new data from the service # This is a non-blocking call, so it will return immediately (fast) try: # Immediately raises Empty exception if there is no data data = animal_service.out_queue.get(block=False) # If we got a string, it's new fact text if isinstance(data, str): self.text_fact.text = data self.loading = False self.last_updated = time.time() # If we got a texture, it's a new background image elif isinstance(data, arcade.Texture): self.bg_texture_2 = self.bg_texture_1 self.bg_texture_1 = data self.bg_updated_time = time.time() except Empty: pass def on_key_press(self, symbol: int, modifiers: int): """Handle key presses""" if symbol == arcade.key.SPACE: self.request_new_fact() elif symbol == arcade.key.F: self.window.set_fullscreen(not self.window.fullscreen) self.window.set_vsync(True) elif symbol == arcade.key.ESCAPE: self.window.close() def request_new_fact(self): """Request a new fact from the service unless we're already waiting for one""" if not self.loading: self.loading = True animal_service.in_queue.put(random.choice(CHOICES)) def on_resize(self, width: float, height: float): """Handle window resize events""" # Re-position the text to the center of the window # and make sure it fits in the window (width) self.text_fact.x = width / 2 self.text_fact.y = height / 2 + 50 self.text_fact.width = width - 200 class AnimaFactsService: """ A daemon process that will keep running and return random cat facts. The process will die with the main process. """ def __init__(self): # Queue for sending commands to the process self.in_queue = mp.Queue() # Queue for receiving data from the process self.out_queue = mp.Queue() # The process itself. Daemon=True means it will die with the main process. self.process = mp.Process( target=self.do_work, args=(self.in_queue, self.out_queue), daemon=True, ) def do_work(self, in_queue, out_queue): """Keep pulling the in queue forever and do work when something arrives""" fact_types = { "meow": CatFacts(), "woof": DogFacts(), } # Keep looping forever waiting for work while True: # The supported commands are "ready", "meow", and "woof" command = in_queue.get(block=True) if command == "ready": # Signal that the process is ready to receive commands out_queue.put("ready") else: selected_type = fact_types.get(command) try: out_queue.put(selected_type.get_fact()) out_queue.put(selected_type.get_image()) except Exception as e: print("Error:", e) def start(self) -> int: """Start the process and wait for it to be ready""" self.process.start() # Send a ready request and do a blocking get to wait for the response. self.in_queue.put("ready") self.out_queue.get(block=True) return self.process.pid class Facts: """Base class for fact providers""" def get_fact(self) -> str: raise NotImplementedError() def get_image(self) -> arcade.Texture: raise NotImplementedError() class CatFacts(Facts): """Get random cat facts and iamges""" def get_fact(self) -> str: with urllib.request.urlopen("path_to_url") as fd: data = json.loads(fd.read().decode("utf-8")) return data["data"][0] def get_image(self) -> arcade.Texture: """Get a random cat image from path_to_url""" with urllib.request.urlopen("path_to_url") as fd: return arcade.Texture(PIL.Image.open(fd).convert("RGBA")) class DogFacts(Facts): """Get random dog facts and images""" def __init__(self): # Fetch the full image list at creation. This is more practical for this api. with urllib.request.urlopen("path_to_url") as fd: self.images = json.loads(fd.read().decode("utf-8")) # Remove videos self.images = [i for i in self.images if not i.endswith(".mp4")] def get_fact(self) -> str: with urllib.request.urlopen("path_to_url") as fd: data = json.loads(fd.read().decode("utf-8")) return data["facts"][0] def get_image(self) -> arcade.Texture: """Get a random dog image from path_to_url""" name = random.choice(self.images) print("Image:", name) with urllib.request.urlopen(f"path_to_url{name}") as fd: return arcade.Texture(PIL.Image.open(fd).convert("RGBA")) if __name__ == "__main__": animal_service = AnimaFactsService() print("Starting animal fact service...") pid = animal_service.start() print("Service started. pid:", pid) window = arcade.open_window(1280, 720, "Random Animal Facts", resizable=True) window.set_vsync(True) window.show_view(AnimalFacts()) arcade.run() ```
```go // cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build loong64 && linux // +build loong64,linux package unix const ( SizeofPtr = 0x8 SizeofLong = 0x8 ) type ( _C_long int64 ) type Timespec struct { Sec int64 Nsec int64 } type Timeval struct { Sec int64 Usec int64 } type Timex struct { Modes uint32 Offset int64 Freq int64 Maxerror int64 Esterror int64 Status int32 Constant int64 Precision int64 Tolerance int64 Time Timeval Tick int64 Ppsfreq int64 Jitter int64 Shift int32 Stabil int64 Jitcnt int64 Calcnt int64 Errcnt int64 Stbcnt int64 Tai int32 _ [44]byte } type Time_t int64 type Tms struct { Utime int64 Stime int64 Cutime int64 Cstime int64 } type Utimbuf struct { Actime int64 Modtime int64 } type Rusage struct { Utime Timeval Stime Timeval Maxrss int64 Ixrss int64 Idrss int64 Isrss int64 Minflt int64 Majflt int64 Nswap int64 Inblock int64 Oublock int64 Msgsnd int64 Msgrcv int64 Nsignals int64 Nvcsw int64 Nivcsw int64 } type Stat_t struct { Dev uint64 Ino uint64 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint64 _ uint64 Size int64 Blksize int32 _ int32 Blocks int64 Atim Timespec Mtim Timespec Ctim Timespec _ [2]int32 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]int8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint64 } type RawSockaddr struct { Family uint16 Data [14]int8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]int8 } type Iovec struct { Base *byte Len uint64 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen uint64 Control *byte Controllen uint64 Flags int32 _ [4]byte } type Cmsghdr struct { Len uint64 Level int32 Type int32 } type ifreq struct { Ifrn [16]byte Ifru [24]byte } const ( SizeofSockaddrNFCLLCP = 0x60 SizeofIovec = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 ) const ( SizeofSockFprog = 0x10 ) type PtraceRegs struct { Regs [32]uint64 Orig_a0 uint64 Era uint64 Badv uint64 Reserved [10]uint64 } type FdSet struct { Bits [16]int64 } type Sysinfo_t struct { Uptime int64 Loads [3]uint64 Totalram uint64 Freeram uint64 Sharedram uint64 Bufferram uint64 Totalswap uint64 Freeswap uint64 Procs uint16 Pad uint16 Totalhigh uint64 Freehigh uint64 Unit uint32 _ [0]int8 _ [4]byte } type Ustat_t struct { Tfree int32 Tinode uint64 Fname [6]int8 Fpack [6]int8 _ [4]byte } type EpollEvent struct { Events uint32 _ int32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [16]uint64 } const _C__NSIG = 0x41 type Siginfo struct { Signo int32 Errno int32 Code int32 _ int32 _ [112]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [19]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 } type cpuMask uint64 const ( _NCPUBITS = 0x40 ) const ( CBitFieldMaskBit0 = 0x1 CBitFieldMaskBit1 = 0x2 CBitFieldMaskBit2 = 0x4 CBitFieldMaskBit3 = 0x8 CBitFieldMaskBit4 = 0x10 CBitFieldMaskBit5 = 0x20 CBitFieldMaskBit6 = 0x40 CBitFieldMaskBit7 = 0x80 CBitFieldMaskBit8 = 0x100 CBitFieldMaskBit9 = 0x200 CBitFieldMaskBit10 = 0x400 CBitFieldMaskBit11 = 0x800 CBitFieldMaskBit12 = 0x1000 CBitFieldMaskBit13 = 0x2000 CBitFieldMaskBit14 = 0x4000 CBitFieldMaskBit15 = 0x8000 CBitFieldMaskBit16 = 0x10000 CBitFieldMaskBit17 = 0x20000 CBitFieldMaskBit18 = 0x40000 CBitFieldMaskBit19 = 0x80000 CBitFieldMaskBit20 = 0x100000 CBitFieldMaskBit21 = 0x200000 CBitFieldMaskBit22 = 0x400000 CBitFieldMaskBit23 = 0x800000 CBitFieldMaskBit24 = 0x1000000 CBitFieldMaskBit25 = 0x2000000 CBitFieldMaskBit26 = 0x4000000 CBitFieldMaskBit27 = 0x8000000 CBitFieldMaskBit28 = 0x10000000 CBitFieldMaskBit29 = 0x20000000 CBitFieldMaskBit30 = 0x40000000 CBitFieldMaskBit31 = 0x80000000 CBitFieldMaskBit32 = 0x100000000 CBitFieldMaskBit33 = 0x200000000 CBitFieldMaskBit34 = 0x400000000 CBitFieldMaskBit35 = 0x800000000 CBitFieldMaskBit36 = 0x1000000000 CBitFieldMaskBit37 = 0x2000000000 CBitFieldMaskBit38 = 0x4000000000 CBitFieldMaskBit39 = 0x8000000000 CBitFieldMaskBit40 = 0x10000000000 CBitFieldMaskBit41 = 0x20000000000 CBitFieldMaskBit42 = 0x40000000000 CBitFieldMaskBit43 = 0x80000000000 CBitFieldMaskBit44 = 0x100000000000 CBitFieldMaskBit45 = 0x200000000000 CBitFieldMaskBit46 = 0x400000000000 CBitFieldMaskBit47 = 0x800000000000 CBitFieldMaskBit48 = 0x1000000000000 CBitFieldMaskBit49 = 0x2000000000000 CBitFieldMaskBit50 = 0x4000000000000 CBitFieldMaskBit51 = 0x8000000000000 CBitFieldMaskBit52 = 0x10000000000000 CBitFieldMaskBit53 = 0x20000000000000 CBitFieldMaskBit54 = 0x40000000000000 CBitFieldMaskBit55 = 0x80000000000000 CBitFieldMaskBit56 = 0x100000000000000 CBitFieldMaskBit57 = 0x200000000000000 CBitFieldMaskBit58 = 0x400000000000000 CBitFieldMaskBit59 = 0x800000000000000 CBitFieldMaskBit60 = 0x1000000000000000 CBitFieldMaskBit61 = 0x2000000000000000 CBitFieldMaskBit62 = 0x4000000000000000 CBitFieldMaskBit63 = 0x8000000000000000 ) type SockaddrStorage struct { Family uint16 _ [118]int8 _ uint64 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start uint64 } type Statfs_t struct { Type int64 Bsize int64 Blocks uint64 Bfree uint64 Bavail uint64 Files uint64 Ffree uint64 Fsid Fsid Namelen int64 Frsize int64 Flags int64 Spare [4]int64 } type TpacketHdr struct { Status uint64 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 _ [4]byte } const ( SizeofTpacketHdr = 0x20 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int64 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x1269 ) type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 Flags uint32 _ [4]byte } type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 Module_name [64]int8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]int8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]int8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]int8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]int8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]int8 } type CryptoReportLarval struct { Type [64]int8 } type CryptoReportHash struct { Type [64]int8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]int8 } type CryptoReportRNG struct { Type [64]int8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]int8 } type CryptoReportKPP struct { Type [64]int8 } type CryptoReportAcomp struct { Type [64]int8 } type LoopInfo struct { Number int32 Device uint32 Inode uint64 Rdevice uint32 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]int8 Encrypt_key [32]uint8 Init [2]uint64 Reserved [4]int8 _ [4]byte } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]int8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]int8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x800870a1 PPS_SETPARAMS = 0x400870a2 PPS_GETCAP = 0x800870a3 PPS_FETCH = 0xc00870a4 ) const ( PIDFD_NONBLOCK = 0x800 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 _ [0]uint8 Seq uint16 _ uint16 _ uint64 _ uint64 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint64 Atime int64 Dtime int64 Ctime int64 Cpid int32 Lpid int32 Nattch uint64 _ uint64 _ uint64 } ```
Ave Maria University (AMU) is a private Roman Catholic university in Ave Maria, Florida. It shares its history with the former Ave Maria College in Ypsilanti, Michigan, which was founded in 1998 and moved its campus in 2007. The two schools were founded by philanthropist and entrepreneur, Tom Monaghan. In 2021, the enrollment was 1,245 students. In 2016 its student body was 80% Catholic. History Ave Maria College Ave Maria College was founded by Catholic philanthropist and former Domino's Pizza owner and founder Tom Monaghan on March 19, 1998, occupying two former elementary school buildings in Ypsilanti, Michigan, near the campus of Eastern Michigan University. Monaghan's goal was to create a Roman Catholic university faithful to the magisterium of the Catholic Church, providing a liberal arts education in a Catholic environment. He originally intended to construct a full college campus on his property in nearby Ann Arbor, known as Domino's Farms. The plan for the Ann Arbor campus also included a 25-story crucifix, a size about half the height of the Washington Monument. Interim Naples campus After being denied zoning approval by Ann Arbor Township to build a larger campus near Domino's Farms, Monaghan decided to move the college to Florida. Monaghan initiated the founding of the Florida institution Ave Maria University with a donation of $250 million. In August 2003, the university opened an interim campus in The Vineyards in Naples, Florida, enrolling some 100 undergraduate students, 75 of whom were freshmen. While occupying the interim campus, Monaghan focused efforts on constructing a new campus and planned community nearby known as Ave Maria, Florida. The Barron Collier family donated the land in southwest Florida for the campus, joining Monaghan in the enterprise as 50% partner. While the infrastructure of the new campus and town were being completed in early 2007, the Ypsilanti campus was also closing at the end of the 2006–2007 academic year. Monaghan planned to have most of the staff transferred to the Florida location. The Michigan location remained open until students graduated or transferred, leaving just three students for the final year and a number of the remaining staff. Ave Maria campus The university moved from the temporary facility to the new campus in 2007. In its first year at the new campus, the university enrolled about 450 undergraduates and 150 graduate students. Bishop Frank Dewane, the local Catholic ordinary, formally dedicated the university in 2008. In March 2007, the original provost of the university, Fr. Joseph Fessio, S.J., was dismissed by Monaghan for undisclosed reasons. In a formal statement, Monaghan, in his role as chancellor, stated that the dismissal was because of "irreconcilable differences over administrative policies and practices." Immediately, the school's first-ever student protests were mounted in support of Fessio. Outside observers were critical: editor Philip F. Lawler of the conservative Catholic World News said the firing was "institutional suicide", and that if a respected theologian such as Fessio could be fired then no others would want to fill the position. Monaghan reinstated Fessio the next day as theologian-in-residence. He was dismissed from that position in 2009, stating he was fired because of a conversation he had with Academic Vice President Jack Sites about administrative policies harming the university's finances. He said his firing was "another mistake in a long series of unwise decisions" but that he would continue to guide students to AMU. The provost position remains vacant. Monaghan expects to continue expanding the university and hopes to one day have an enrollment over 5,000, Division I athletics and an academic reputation as "a Catholic Ivy". In 2011, James Towey, former Director of the White House Office of Faith-Based and Community Initiatives and former President of Saint Vincent College, was named the president of Ave Maria University after a unanimous vote by the AMU Board of Trustees. He also assumed the role of CEO, in the place of Monaghan, who remains the Chancellor. The 2008 financial crisis took a toll on Ave Maria's finances. Monaghan said in 2012 that Ave Maria's construction cost estimates doubled over three years, requiring the university to cut back on planned buildings. The troubled Florida real estate market also meant that Ave Maria School of Law had to shelve its plans for a building in Ave Maria, as its existing campus was worth less than was paid for it. According to Towey, for a period of time the university survived through Monaghan's funding of a ten million dollar annual deficit. Towey credits his efforts at controlling financing costs, along with increased contributions, with placing the university back on a firm financial footing by 2014. In February 2012, Ave Maria made national news when it filed its lawsuit Ave Maria University v. Sebelius, suing the government over the US Health and Human Services birth control mandate by claiming that it would force the university to forego its religious freedom. It became the second college to do so, and was followed by several others, including the Franciscan University of Steubenville and the University of Notre Dame. The lawsuit is represented by the Becket Fund for Religious Liberty. In June 2012, President Towey wrote that the university would "vigorously prosecute its lawsuit". In 2016, the Supreme Court unanimously sent the case back to federal appeals court to find a solution that would both honor religious organizations objections and provide their employees with birth control. Ave Maria administrators celebrated the decision as a "great victory." The university's growth has fallen short of its stated goal of "growing the University's undergraduate enrollment at its main campus in Florida to approximately 1,700 students by the fall of 2016" and 1,500 by the year 2020. The university ran a satellite campus in Nicaragua called the Ave Maria University-Latin American Campus for 13 years, and then sold it to Keiser University in July 2013. In 2021, it was ranked in the Top 8% (115 of 1472 colleges) in the "Best Colleges for the Money" by CollegeFactual Founder's goals In a May 2004 speech, Monaghan expressed his wish to have the new town and university campus be free from pre-marital sex, contraceptives and pornography. This elicited sharply critical statements from the international press, who saw such proposed restrictions as violations of civil liberties. Howard Simon, executive director of the American Civil Liberties Union branch in Florida, challenged the legality of the restriction of sales of contraceptives. He said, "This is not just about the sale of contraceptives in the local pharmacy, it is about whether in an incorporated town there will be a fusion of religion and government." An opinion column in The Wall Street Journal quoted an Ave Maria faculty member who called it a "Catholic Jonestown". Frances Kissling of Catholics for Choice compared Monaghan's civic vision to Islamic fundamentalism, and called it "un-American". In response, Monaghan announced a milder form of civic planning in which the town could mostly grow on its own, except that it would not have sex shops or strip clubs, and store owners would be asked rather than ordered not to sell contraceptives or porn. Contraception and porn would still be banned from the university. Academics Ave Maria University currently offers 33 undergraduate and three graduate degrees. Graduate programs include M.A. and Ph.D. studies in theology and a Master of Theological Studies for non-traditional students. Undergraduate students must complete a core curriculum of 14 required courses in philosophy, theology, composition, science, math, history, political science, and a foreign language. The Honor Society of Phi Kappa Phi installed Ave Maria University as its 358th chapter on October 17, 2023. In 2023 U.S. News & World Report reported that the university enrolled 1,021 undergraduate students paying an average of $28,224 for the school year 2022-2023. Faculty student ratio was 18:1. Accreditation In June 2010, the Commission on Colleges of the Southern Association of Colleges and Schools (SACS) declared that Ave Maria had obtained "accredited membership" status. This allows the university to award bachelors, masters, and doctoral degrees accredited by the SACS. The university had previously received full accreditation from the American Academy for Liberal Education (AALE) in June 2008. On October 7, 2011, the local ordinary, Bishop Frank Joseph Dewane, formally recognized the institution as a Catholic university pursuant to the code of canon law. In December 2015, The Southern Association of Colleges and Schools reaffirmed Ave Maria University's accreditation. Catholic Theology Show The Catholic Theology Show, a faculty podcast, began on October 22, 2022, hosted by Dr. Michael Dauphinais, chair of the Theology Department and professor of theology. The Catholic Theology Show was launched on the feast day of Saint Pope John Paul II. The pope’s apostolic constitution, Ex Corde Ecclesiae (From the Heart of the Church), set the foundations for the academic and spiritual standards for Ave Maria University. Since its inception there have been fifty-seven podcasts listened to by 31,100 listeners in 86 countries. The Catholic Theology Show is available on Apple Podcasts and Spotify. Study abroad Ave Maria University offered study abroad programs in Gaming, Austria, and in San Marcos, Nicaragua. Instruction was conducted in English. The Austrian program required an additional $1,750 beyond regular tuition, along with the added expense of airfare and ground transportation, while the Nicaraguan program required no additional tuition. Ave Maria's Nicaraguan program was discontinued in mid-2013, with the site transferred to Keiser University to become Keiser University-Latin American Campus. Rankings Ave Maria University was ranked #156-201 in National Liberal Arts Colleges by U.S. News & World Report in 2022-23. Campus The new campus is located in the town of Ave Maria, Florida, east of Naples in rural Collier County. The town site occupies about , of which nearly 20 percent are designated for the campus. The Ave Maria Oratory, a large Gothic-inspired structure located at the center of town, was constructed by the university and currently serves as the parish church. Several more master-planned communities are under construction or planned in the immediately surrounding area, north and south of the campus. Managed wetlands lie north and west of the campus. Wildlife preservation and restoration projects have also been instituted on the site, to preserve a degree of its natural state. Recognition Ave Maria University won the 2007 'Digie Award' (Commercial Real Estate Digital Innovation Award). The $24 million Oratory won the 2008 TCA Achievement Award as well as an award from the American Institute of Steel Construction. Canizaro Library The Canizaro Library holds over 215,000 volumes and over 100 online journals. The Department of Rare Books and Special Collections houses over 10,000 volumes which includes Catholic Americana, leaves from Bibles from the 12th through the 20th century, the Oxford Movement and manuscript letters by John Henry Newman, the Michael Novak collection, and the Terri Schiavo case. The second floor of the Canizaro Library houses the University Archives and the Canizaro Exhibit Gallery. Mother Teresa Museum Ave Maria University is home to a museum about the life and legacy of Mother Teresa, honored in 1979 with the Nobel Peace Prize. Artifacts include a piece of her sari, her crucifix and rosary, and letters from her and former Ave Maria University president, James Towey. The Mother Teresa Museum contains an array of items on loan from the Missionaries of Charity in Calcutta. The Missionaries of Charity also provided storyboards – in Spanish and English – that include rare photographs of Mother Teresa and tell the story of her life. Student life Dormitories are organized into same-sex communities. There are six dorms on campus: Sebastian, Maria Goretti, St. Joseph, Xavier, and the Mega dorm, a building which contains both John Paul II and Mother Teresa dormitories. Not all dormitories are always used to house undergraduates; for example, Xavier has been used as a conference center and guest house. However, it currently serves as a girls dormitory. Opposite-sex visitors are permitted in residential common areas during the day, and in individual dorm rooms on specified evenings. Liturgy Mass is celebrated on-campus in the Our Lady of Guadalupe Chapel and off-campus in the Ave Maria Parish Church. The parish serves both the town and the university. Originally owned by the university and called the Oratory, the building was purchased in January 2017 by the Diocese of Venice, and its status was raised to parish church. Chapels are located in each of the six dorms, each containing a tabernacle housing the Eucharist, and each but the Mega dorm containing an altar for Mass. Members of the clergy, who live on campus, assist in maintaining spiritual life. A perpetual adoration chapel was added to the Library in 2009. Mass on campus is offered in both the Ordinary Form as well as the Extraordinary Form. Student organizations Until 2022, the official news publication of Ave Maria's student body was The Daily Bulletin. Recently, the Marketing department has started sending bi-weekly event reminders to students. Campus organizations include the student activities board, student government, and more than 40 other clubs and organizations. The university also offers intramural and club sport programs. Athletics The Ave Maria athletic teams are called the Gyrenes. The university is a member of the National Association of Intercollegiate Athletics (NAIA), primarily competing in the Sun Conference (formerly known as the Florida Sun Conference (FSC) until after the 2007–08 school year) since the 2009–10 academic year. They are also a member of the United States Collegiate Athletic Association (USCAA). The Gyrenes previously competed as an NAIA Independent within the Association of Independent Institutions (AII) during the 2008–09 school year (when the school joined the NAIA). Ave Maria competes in 24 intercollegiate varsity sports: Men's sports include baseball, basketball, cross country, football, golf, soccer, swimming, tennis, track & field (indoor and outdoor) and ultimate frisbee; basketball, beach volleyball, cross country, dance, golf, lacrosse, soccer, softball, swimming, tennis, track & field (indoor and outdoor) and volleyball. Former sports included men's & women's rugby. Football In 2011, Ave Maria became the first college in southwestern Florida to field a football team. In the spring of 2016, the Gyrenes football team joined the Mid-South Conference (MSC) as an affiliate member. Lacrosse The women's lacrosse team competed in the National Women's Lacrosse League (NWLL) in their first varsity season in the spring of 2015. See also Ave Maria School of Law References External links Official website Official athletics website Mother Teresa Museum Liberal arts colleges in Florida Catholic universities and colleges in Michigan Education in Collier County, Florida Universities and colleges established in 2003 Universities and colleges accredited by the Southern Association of Colleges and Schools Buildings and structures in Collier County, Florida USCAA member institutions Catholic universities and colleges in Florida Association of Catholic Colleges and Universities Roman Catholic Diocese of Venice in Florida 2003 establishments in Florida Mother Teresa
The Short No.2 was an early British aircraft built by Short Brothers for J.T.C. Moore-Brabazon. It was used by him to win the £1,000 prize offered by the Daily Mail newspaper for the first closed-circuit flight of over a mile (1.6 km) to be made in a British aircraft. Design and development The Short No.2 was ordered from Short Brothers in April 1909 with the intention of competing for the £1,000 prize announced by the Daily Mail for the first closed-circuit flight made by a British aircraft. The layout of the aircraft was similar to that of the Wright Model A, which the Short Brothers were building under license. It was a biplane with a forward elevator and rear-mounted tailplane, driven by a pair of pusher propellers, chain-driven by the single centrally-mounted engine, but differed in a number of significant respects. It was designed to take off using a dolly and launching-rail, like the Wright aircraft, but the landing skids were incorporated into a considerably more substantial structure, each forming the lower member of a trussed girder structure resembling a sleigh, the upturned front end serving to support the biplane front elevators, behind which the rudder was mounted. A single fixed fin was mounted behind the wings on a pair of booms. Lateral control was not effected by wing-warping. Instead it used "balancing planes", each consisting of a pair of low aspect ratio surfaces, mounted at either end of a strut which was pivoted from the midpoint of struts connecting the wingtips. Service history A Green engine had been ordered to power the aircraft, but this had not been delivered when the airframe was completed in September, so a Vivinus engine, salvaged from one of Moore-Brabazon's Voisin biplanes, was fitted. Using this engine, a successful flight of nearly a mile was made on 27 September at Shellbeach on the Isle of Sheppey, where both the Short Brother's works and the Royal Aero Club's flying field were located. A second, shorter, flight was made on 4 October, ending in a heavy landing which caused minor damage. While this was being repaired the Green engine was delivered and fitted, but the attempt to win the Daily Mail prize was delayed by poor weather and did not take place until 30 October, when Moore-Babazon succeeded in rounding a marker post set half a mile from the takeoff point and returning to land next to the launch rail. A few days later, he responded to a challenge to disprove the saying "pigs can't fly" by making a 3 1/2-mile (5.6 km) cross-country flight with a piglet in a basket strapped to one of the interplane struts. On 7 January it was flown the 4 1/2 miles from Shellbeach to the Royal Aero Club's new flying field at Eastchurch, by which time a revised tail consisting of elongated fixed horizontal and vertical surfaces carried on four booms had been fitted to improve stability. It was now Moore-Brabazon's intention to make an attempt to win the British Empire Michelin Cup, and on 1 March he made a flight covering in 31 minutes, being forced to land when the engine crankshaft broke. Although a new engine was fitted, the aircraft was due to be exhibited at the Aero Exhibition at Olympia, and was therefore not flown again until 25 March, by which time it was obvious that nobody else was capable of bettering his flight, and the prize was formally awarded to him. By this time Moore-Brabazon had ordered a new aircraft of the Short S.27 type, and made no subsequent flights in the aircraft. Specifications Notes References Barnes, C.H. Shorts Aircraft Since 1900. London: Putnam, 1967 Short No.2 biplane 1900s British experimental aircraft Single-engined twin-prop pusher aircraft Aircraft first flown in 1909
Muhammad Syazwan bin Buhari (born 22 September 1992) is a Singaporean footballer who plays as a goalkeeper for Singapore Premier League club Tampines Rovers and the Singapore national team. Club career Young Lions Syazwan began his professional football career with Garena Young Lions in the S. League in 2010. Geylang International In 2016, Syazwan signed for Geylang International and was the first choice goalkeeper for the club. Tampines Rovers Following the conclusion of the 2017 S.League season, it was announced that Syazwan had signed for local giants Tampines Rovers on a 2-year contract. He is expected to take the place of departing No. 1 Izwan Mahbud, who had sealed a move to Thai League 2 side Nongbua Pitchaya. Syazwan won his first trophy in the 2019 Singapore Cup when he played through the game with a dislocated finger. On 7 July 2021 during matchday 5 of the 2021 AFC Champions League group stage match. He won the Man of the Match award for his outstanding performance against Japan club, Gamba Osaka and also notably saves 2 penalties in 1 game. International career Youth Syazwan was called up to the national Under-23 team for the 2015 Southeast Asian Games and was the first choice goalkeeper. Senior Syazwan spend most of his time being the third choice goalkeeper for Singapore. His impressive performance in the 2016 S.League earns him a called up to the senior squad for the first time in a friendly match against Malaysia on 10 July 2016 by Singapore's head coach V. Sundramoorthy, but did not play. After 29 international games being on the bench, Syazwan made his international debut against Macau at the Macau Olympic Complex Stadium playing the full match and keeping a clean sheet on 26 March 2023. On 18 June 2023, Syazwan made his second international cap against Solomon Islands at the Singapore National Stadium. Others Singapore Selection Squad He was selected as part of the Singapore Selection squad for The Sultan of Selangor's Cup held on 24 August 2019. Personal life Syazwan's elder brother, Syarqawi Buhari, is a FIFA-certified referee who has officiated in the S.League for a number of years. Career statistics Club International caps Honours Club Tampines Rovers Singapore Cup: 2019 Singapore Community Shield: 2020 Individual Singapore Premier League Team of the Year: 2020 References 1992 births Living people Singaporean men's footballers Men's association football goalkeepers Young Lions FC players Geylang International FC players Tampines Rovers FC players SEA Games medalists in football SEA Games bronze medalists for Singapore Competitors at the 2013 SEA Games
Hathat Dekha is a 1967 Bengali drama film directed by Nityananda Datta. The film featured Soumitra Chatterjee, Sandhya Roy, and Jahar Roy in lead roles. Cast Soumitra Chatterjee Sandhya Roy Jahar Roy Bhanu Bannerjee Anup Kumar Pahari Sanyal References External links Bengali-language Indian films 1967 films 1960s Bengali-language films
Erblichia is a monotypic genus of flowering plants belonging to the family Passifloraceae. The only species is Erblichia odorata, common name Butterfly tree or Flor de Mayo. Originally the genera was composed of five species, however, these species are currently classified as heterotypic synonyms. Unlike other members of Turneroideae which exhibit distyly, E. odorata is a homostylous species. Its native range is Mexico to Central America, it is found in the countries of; Belize, Costa Rica, El Salvador, Guatemala, Honduras, Mexico, Nicaragua and Panamá. The genus name is in honour of Ch. Erblich, a German court garden-master in Hannover, it was first described and published in Bot. Voy. Herald on page 130 in 1854. References Passifloraceae Monotypic Malpighiales genera Plants described in 1854 Flora of Southern America Taxa named by Berthold Carl Seemann
The Adolph F. Rupp Trophy was an award given annually to the top player in men's Division I NCAA basketball until 2015. The recipient of the award was selected by an independent panel consisting of national sportswriters, coaches, and sports administrators. The trophy was presented each year at the site of the Final Four of the NCAA Men's Division I Basketball Championship. The Adolph F. Rupp Trophy was administered by the Commonwealth Athletic Club of Kentucky, a non-profit organization with a primary mission of honoring the legacy of University of Kentucky coach Adolph Rupp. Three winners of the award have been freshmen: Kevin Durant of Texas in 2007, John Wall of Kentucky in 2010 and Anthony Davis of Kentucky in 2012. Winners See also List of U.S. men's college basketball national player of the year awards References External links Official site Awards established in 1972 Awards disestablished in 2015 College basketball player of the year awards in the United States College basketball trophies and awards in the United States
José Gordon (born 1953, Mexico) is a Mexican novelist, essayist, translator and cultural journalist. He worked as anchorman in Noticiario Cultural 9:30 and in the literary gazette Luz Verde in Canal 22. He is editor in chief in the gazette La Cultura en México of the magazine Siempre!. He collaborates with the newspapers La Jornada and Reforma. He was acknowledged with the National Journalism Award in 1994. He writes the column of sciences and arts in the Revista de la Universidad de México (Magazine of the University of Mexico). He produces and leads the TV series Imaginantes, which is broadcast by Televisa and was awarded in the New York Film Festival. He directs La Oveja Eléctrica, a publication where he talks with the most notable contemporary scientists. He consults the magazine Muy Interesante, where he publishes about the paradoxes of the scientific and poetic knowledge. Works Tocar lo invisible, Planeta, 1995 El novelista miope y la poeta hindú, UNAM, 2002 El cuaderno verde, Ediciones B, 2007 Revelado instantáneo (en colaboración con Guadalupe Alonso), Joaquín Mortiz, 2004 El libro del destino, Nueva Imagen, 1996. References 1953 births Living people Mexican male novelists Mexican essayists Mexican male writers Male essayists Mexican journalists Male journalists Mexican translators Writers from Mexico City
```xml // eslint-disable-next-line @typescript-eslint/no-explicit-any const cacheProp = Symbol.for('[memoize]') as any /** * @internal */ // eslint-disable-next-line @typescript-eslint/no-explicit-any export function Memoize(keyBuilder?: (...args: any[]) => any) { // eslint-disable-next-line @typescript-eslint/no-explicit-any return (_: Record<string, any>, propertyKey: string, descriptor: TypedPropertyDescriptor<any>): void => { if (descriptor.value != null) { // eslint-disable-next-line @typescript-eslint/no-explicit-any descriptor.value = memoize(propertyKey, descriptor.value, keyBuilder || ((v: any) => v)) } else if (descriptor.get != null) { descriptor.get = memoize(propertyKey, descriptor.get, keyBuilder || (() => propertyKey)) } } } // See path_to_url#issuecomment-579541944 // eslint-disable-next-line @typescript-eslint/no-explicit-any function ensureCache<T extends Record<string, unknown> & { [key: string]: any }>( target: T, reset = false, // eslint-disable-next-line @typescript-eslint/no-explicit-any ): { [key in keyof T]?: Map<any, any> } { if (reset || !target[cacheProp]) { Object.defineProperty(target, cacheProp, { value: Object.create(null), configurable: true, }) } return target[cacheProp] } // See path_to_url#issuecomment-579541944 // eslint-disable-next-line @typescript-eslint/no-explicit-any function ensureChildCache<T extends Record<string, unknown> & { [key: string]: any }>( target: T, key: keyof T, reset = false, // eslint-disable-next-line @typescript-eslint/no-explicit-any ): Map<any, any> { const dict = ensureCache(target) if (reset || !dict[key]) { // eslint-disable-next-line @typescript-eslint/no-explicit-any dict[key] = new Map<any, any>() } // eslint-disable-next-line @typescript-eslint/no-explicit-any return dict[key] as Map<any, any> } function memoize( namespace: string, // eslint-disable-next-line @typescript-eslint/no-explicit-any func: (...args: any[]) => any, // eslint-disable-next-line @typescript-eslint/no-explicit-any keyBuilder: (...args: any[]) => any, // eslint-disable-next-line @typescript-eslint/no-explicit-any ): (...args: any[]) => any { // eslint-disable-next-line @typescript-eslint/no-explicit-any return function (this: any, ...args: any[]): any { const cache = ensureChildCache(this, namespace) const key = keyBuilder.apply(this, args) if (cache.has(key)) return cache.get(key) // eslint-disable-next-line @typescript-eslint/no-explicit-any const res: any = func.apply(this, args) cache.set(key, res) return res } } ```
Tune Hotels.com is a limited service hotel chain operated by Tune Hotels Management Sdn Bhd that provides a claimed "5-star sleeping experience at a 1-star price" accommodation. Tune Hotels is part of the Tune Group, the private investment group of Tan Sri Tony Fernandes, founder and group CEO of low-cost airline AirAsia. Limited service The limited service model used by Tune Hotels is similar to the no frills business model practised by low-cost carriers such as AirAsia and has been adapted to the hospitality industry. Similar concepts includes EasyHotel by easyJet. Properties and locations Tune Hotels have 10 locations in Malaysia and the United Kingdom. See also Red Planet Hotels References External links Hotels in Malaysia Hotel chains Malaysian brands Tune Group
```go // Code generated by protoc-gen-go. DO NOT EDIT. // source: grpc/gcp/altscontext.proto package grpc_gcp // import "google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type AltsContext struct { // The application protocol negotiated for this connection. ApplicationProtocol string `protobuf:"bytes,1,opt,name=application_protocol,json=applicationProtocol,proto3" json:"application_protocol,omitempty"` // The record protocol negotiated for this connection. RecordProtocol string `protobuf:"bytes,2,opt,name=record_protocol,json=recordProtocol,proto3" json:"record_protocol,omitempty"` // The security level of the created secure channel. SecurityLevel SecurityLevel `protobuf:"varint,3,opt,name=security_level,json=securityLevel,proto3,enum=grpc.gcp.SecurityLevel" json:"security_level,omitempty"` // The peer service account. PeerServiceAccount string `protobuf:"bytes,4,opt,name=peer_service_account,json=peerServiceAccount,proto3" json:"peer_service_account,omitempty"` // The local service account. LocalServiceAccount string `protobuf:"bytes,5,opt,name=local_service_account,json=localServiceAccount,proto3" json:"local_service_account,omitempty"` // The RPC protocol versions supported by the peer. PeerRpcVersions *RpcProtocolVersions `protobuf:"bytes,6,opt,name=peer_rpc_versions,json=peerRpcVersions,proto3" json:"peer_rpc_versions,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *AltsContext) Reset() { *m = AltsContext{} } func (m *AltsContext) String() string { return proto.CompactTextString(m) } func (*AltsContext) ProtoMessage() {} func (*AltsContext) Descriptor() ([]byte, []int) { return fileDescriptor_altscontext_4d8d0120fd718d8c, []int{0} } func (m *AltsContext) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AltsContext.Unmarshal(m, b) } func (m *AltsContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_AltsContext.Marshal(b, m, deterministic) } func (dst *AltsContext) XXX_Merge(src proto.Message) { xxx_messageInfo_AltsContext.Merge(dst, src) } func (m *AltsContext) XXX_Size() int { return xxx_messageInfo_AltsContext.Size(m) } func (m *AltsContext) XXX_DiscardUnknown() { xxx_messageInfo_AltsContext.DiscardUnknown(m) } var xxx_messageInfo_AltsContext proto.InternalMessageInfo func (m *AltsContext) GetApplicationProtocol() string { if m != nil { return m.ApplicationProtocol } return "" } func (m *AltsContext) GetRecordProtocol() string { if m != nil { return m.RecordProtocol } return "" } func (m *AltsContext) GetSecurityLevel() SecurityLevel { if m != nil { return m.SecurityLevel } return SecurityLevel_SECURITY_NONE } func (m *AltsContext) GetPeerServiceAccount() string { if m != nil { return m.PeerServiceAccount } return "" } func (m *AltsContext) GetLocalServiceAccount() string { if m != nil { return m.LocalServiceAccount } return "" } func (m *AltsContext) GetPeerRpcVersions() *RpcProtocolVersions { if m != nil { return m.PeerRpcVersions } return nil } func init() { proto.RegisterType((*AltsContext)(nil), "grpc.gcp.AltsContext") } func init() { proto.RegisterFile("grpc/gcp/altscontext.proto", fileDescriptor_altscontext_4d8d0120fd718d8c) } var fileDescriptor_altscontext_4d8d0120fd718d8c = []byte{ // 335 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xcf, 0x4b, 0x2b, 0x31, 0x10, 0xc7, 0xd9, 0xbe, 0xf7, 0xca, 0x33, 0xc5, 0x56, 0xd7, 0x16, 0x97, 0x82, 0x50, 0xbc, 0xb8, 0xa7, 0x5d, 0xad, 0x77, 0xa5, 0xf5, 0x24, 0x78, 0x28, 0x5b, 0xf0, 0xe0, 0x65, 0x89, 0xd3, 0x10, 0x02, 0x69, 0x26, 0x4c, 0xd2, 0xa2, 0xff, 0xaa, 0x7f, 0x8d, 0x6c, 0xd2, 0x6d, 0x8b, 0x1e, 0x67, 0x3e, 0xdf, 0xef, 0xfc, 0x64, 0x63, 0x49, 0x16, 0x4a, 0x09, 0xb6, 0xe4, 0xda, 0x3b, 0x40, 0xe3, 0xc5, 0x87, 0x2f, 0x2c, 0xa1, 0xc7, 0xf4, 0x7f, 0xc3, 0x0a, 0x09, 0x76, 0x9c, 0xef, 0x55, 0x9e, 0xb8, 0x71, 0x16, 0xc9, 0xd7, 0x4e, 0xc0, 0x86, 0x94, 0xff, 0xac, 0x01, 0xd7, 0x6b, 0x34, 0xd1, 0x73, 0xfd, 0xd5, 0x61, 0xbd, 0x99, 0xf6, 0xee, 0x29, 0x56, 0x4a, 0xef, 0xd8, 0x90, 0x5b, 0xab, 0x15, 0x70, 0xaf, 0xd0, 0xd4, 0x41, 0x04, 0xa8, 0xb3, 0x64, 0x92, 0xe4, 0x27, 0xd5, 0xc5, 0x11, 0x5b, 0xec, 0x50, 0x7a, 0xc3, 0x06, 0x24, 0x00, 0x69, 0x75, 0x50, 0x77, 0x82, 0xba, 0x1f, 0xd3, 0x7b, 0xe1, 0x03, 0xeb, 0xef, 0x87, 0xd0, 0x62, 0x2b, 0x74, 0xf6, 0x67, 0x92, 0xe4, 0xfd, 0xe9, 0x65, 0xd1, 0x0e, 0x5e, 0x2c, 0x77, 0xfc, 0xa5, 0xc1, 0xd5, 0xa9, 0x3b, 0x0e, 0xd3, 0x5b, 0x36, 0xb4, 0x42, 0x50, 0xed, 0x04, 0x6d, 0x15, 0x88, 0x9a, 0x03, 0xe0, 0xc6, 0xf8, 0xec, 0x6f, 0xe8, 0x96, 0x36, 0x6c, 0x19, 0xd1, 0x2c, 0x92, 0x74, 0xca, 0x46, 0x1a, 0x81, 0xeb, 0x5f, 0x96, 0x7f, 0x71, 0x9d, 0x00, 0x7f, 0x78, 0x9e, 0xd9, 0x79, 0xe8, 0x42, 0x16, 0xea, 0xad, 0x20, 0xa7, 0xd0, 0xb8, 0xac, 0x3b, 0x49, 0xf2, 0xde, 0xf4, 0xea, 0x30, 0x68, 0x65, 0xa1, 0xdd, 0xeb, 0x75, 0x27, 0xaa, 0x06, 0x8d, 0xaf, 0xb2, 0xd0, 0x26, 0xe6, 0x9a, 0x8d, 0x14, 0x46, 0x4f, 0xf3, 0xad, 0x42, 0x19, 0x2f, 0xc8, 0x70, 0x3d, 0x3f, 0x3b, 0x3a, 0x79, 0x28, 0xb3, 0x48, 0xde, 0x1e, 0x25, 0xa2, 0xd4, 0xa2, 0x90, 0xa8, 0xb9, 0x91, 0x05, 0x92, 0x2c, 0xc3, 0x17, 0x81, 0xc4, 0x4a, 0x18, 0xaf, 0xb8, 0x76, 0xe1, 0xe7, 0x65, 0x5b, 0xa5, 0x0c, 0xe7, 0x0e, 0xa2, 0x5a, 0x82, 0x7d, 0xef, 0x86, 0xf8, 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x15, 0xf8, 0xd5, 0xb6, 0x23, 0x02, 0x00, 0x00, } ```
Adamsville is a village in Muskingum County, Ohio, United States. The population was 140 at the 2020 census. It is part of the Zanesville micropolitan area. History Adamsville was laid out in 1832 and named after John Quincy Adams or according to another source, Mordecai Adams, the proprietor of the village. A post office called Adamsville has been in operation since 1837. The village was incorporated in 1864. Geography According to the United States Census Bureau, the village has a total area of , all land. Demographics 2010 census As of the census of 2010, there were 114 people, 45 households, and 33 families living in the village. The population density was . There were 54 housing units at an average density of . The racial makeup of the village was 99.1% White and 0.9% from two or more races. There were 45 households, of which 37.8% had children under the age of 18 living with them, 55.6% were married couples living together, 6.7% had a female householder with no husband present, 11.1% had a male householder with no wife present, and 26.7% were non-families. 22.2% of all households were made up of individuals, and 8.8% had someone living alone who was 65 years of age or older. The average household size was 2.53 and the average family size was 2.91. The median age in the village was 39.6 years. 27.2% of residents were under the age of 18; 7.9% were between the ages of 18 and 24; 29% were from 25 to 44; 21.9% were from 45 to 64; and 14% were 65 years of age or older. The gender makeup of the village was 50.9% male and 49.1% female. 2000 census As of the census of 2000, there were 127 people, 46 households, and 35 families living in the village. The population density was . There were 49 housing units at an average density of . The racial makeup of the village was 100.00% White. There were 46 households, out of which 39.1% had children under the age of 18 living with them, 56.5% were married couples living together, 8.7% had a female householder with no husband present, and 23.9% were non-families. 19.6% of all households were made up of individuals, and 10.9% had someone living alone who was 65 years of age or older. The average household size was 2.76 and the average family size was 3.17. In the village, the population was spread out, with 29.1% under the age of 18, 11.8% from 18 to 24, 26.8% from 25 to 44, 26.0% from 45 to 64, and 6.3% who were 65 years of age or older. The median age was 30 years. For every 100 females there were 95.4 males. For every 100 females age 18 and over, there were 104.5 males. The median income for a household in the village was $35,000, and the median income for a family was $40,000. Males had a median income of $27,813 versus $16,964 for females. The per capita income for the village was $11,703. There were 7.9% of families and 4.8% of the population living below the poverty line, including 13.3% of under eighteens and none of those over 64. Climate The climate in this area is characterized by hot, humid summers and generally mild to cool winters. According to the Köppen Climate Classification system, Adamsville has a humid subtropical climate, abbreviated "Cfa" on climate maps. References Villages in Muskingum County, Ohio Villages in Ohio 1832 establishments in Ohio Populated places established in 1832
Donald Clay Dohoney (March 4, 1932 – July 4, 1993) was an American football player. He grew up in Ann Arbor, Michigan, and played college football at Michigan State College. He played both on offense and defense at the end position, was captain of Michigan State's 1953 team that won the Big Ten Conference championship and defeated UCLA in the 1954 Rose Bowl. Dohoney was a consensus selection on the 1953 College Football All-America Team. In March 1954, Dohoney signed with the Chicago Cardinals of the National Football League (1954). Chicago coach Joe Stydahar called Dohoney "the best defensive end developed in college ball in a great many years. He rushes the passer real good, plays the running game well and is one of the most rugged players we've seen." In June 1954, he was added to the lineup of college all-stars who played the NFL champion Detroit Lions in the annual Chicago College All-Star Game. According to records of Pro-Football-Reference.com, Dohoney did not appear in any regular season games in the NFL. Dohoney died in 1993 at Meridian, Michigan. References 1932 births 1993 deaths American football ends Michigan State Spartans football players All-American college football players Players of American football from Ann Arbor, Michigan
Asaperda agapanthina is a species of beetle in the family Cerambycidae. It was described by Henry Walter Bates in 1873. References Asaperda Beetles described in 1873
Eduardo Pedro Lombardo (born 13 March 1966), nicknamed Edú and Pitufo (Smurf), is a Uruguayan musician, composer, and singer. He stood out as a teenager as a member of several murgas in his country, in addition to accompanying renowned artists as a percussionist. Since 2007 he has developed a distinguished career as a soloist. Career At age 14, Lombardo was one of the founders of the El Firulete children's murga in 1980, the predecessor of what would become . Being part of this group allowed him to meet various artists, including Jorge Lazaroff, , , , , and . In the mid-1980s he began to study percussion. In 1984 he joined , first as a percussionist and then as a director. With this murga he would earn the first prize of the Montevideo Carnival in 1988 and 1989. Later he would also get the first prize with the murgas La Gran Muñeca, Contrafarsa, and . In 1987 he was part of the last lineup of the group . He has been a member of the accompanying bands of various artists, including Jaime Roos, Rubén Olivera, Mauricio Ubal, Jorge Galemire, and Jorge Drexler. In 2002 the play Murga madre premiered, starring Pinocho Routin and Pitufo. The script was by Pinocho and the direction was by Fernando Toja. The show's music was composed by Pitufo. Murga madre received the for Best Musical Show that year. The soundtrack gave rise to an album, which features the voices of Pinocho and Pitufo, with participation by well-known artists, including Jaime Roos, Hugo and Osvaldo Fattoruso, Luciano Supervielle, , and . The show also gave rise to a DVD, recorded at the Solís Theatre. The title song of the play and the album is, in Edú's own opinion, the best that he ever composed. In 2007 he began his solo career with the release of his first album, Rocanrol. With this he won the Graffiti Awards for Best Composer, Best Uruguayan Popular Music Solo Album, and Theme of the Year (for the song "Rocanrol"). In 2009 his first solo DVD was released, Rocanrol a dos orillas, recorded live in Montevideo and Buenos Aires. In 2010 Pitufo returned to star in a play with Pinocho Routin, under the direction of Toja: Montevideo Amor. It took place at the and starred (besides the two already mentioned) María Mendive and Adriana Da Silva. The soundtrack resulted in a new album. In 2011, the DVD 30 años de música was released, which includes a show recorded at the Solís Theatre in 2010 (with Liliana Herrero, Fernando Cabrera, and Contrafarsa as guests) and interviews with relatives, acquaintances, and friends. In 2012 Lombardo released his second solo studio album, Ilustrados y valientes. He was honored with the Graffiti Awards for Best Popular Music Album and Urban Song and Best Composer of the Year. In Pitufo's solo career, he has accompanied a large number of notable artists in different shows, including Serrat, Lenine, Mercedes Sosa, and León Gieco. In 2014 he launched the tour "Más Solo Que El Uno", which included concerts in Spain and Denmark, as well as various performances in his home country. In 2014, the book Bien de al lado. Vida y música de Edú Pitufo Lombardo, written by the journalist Fabián Cardozo, based on interviews with Pitufo and other musicians, was published by the . In 2017 Pitufo returned to compete at carnival with the murga Don Timoteo, together with his partner Marcel Keoroglián. Discography Solo albums Rocanrol (Montevideo Music Group, 2007) Ilustrados y valientes (Montevideo Music Group, 2012) Musicos Ambulantes (Montevideo Music Group, 2017) DVDs Rocanrol a dos orillas (Montevideo Music Group, 2009) 30 años de música (Montevideo Music Group, 2011) Albums from theatrical plays (with Pinocho Routin) Murga madre (Montevideo Music Group, 2002) Montevideo Amor (Montevideo Music Group, 2010) References 1966 births Living people Uruguayan male singer-songwriters Singers from Montevideo Uruguayan composers Male composers 20th-century Uruguayan male singers 21st-century Uruguayan male singers
```asp <%@ Application Codebehind="Global.asax.cs" Inherits="pnp.api.elevatedprivileges.WebApiApplication" Language="C#" %> ```
The 1897 Walthamstow by-election was a parliamentary by-election held in England on 3 February 1897 for the House of Commons constituency of Walthamstow. The area was then a division of Essex, and is now part of Greater London. The election was won by the Liberal-Labour candidate, after the seat had been held by the Conservative Party for 11 years. Vacancy The seat became vacant when Walthamstow's Conservative Member of Parliament (MP) Edmund Byrne QC was appointed as a judge of the Chancery Division of the High Court of Justice. This appointment disqualified him from sitting in parliament, triggering a by-election in Walthamstow. Electoral history The first Walthamstow constituency election in 1885 was won by the Liberals. In 1886 the seat was gained by the Conservatives and remained in their hands to 1897. Byrne had held the seat since the 1892 general election. The result at the previous general election was a comfortable victory for the Conservatives; Candidates Byrne's appointment was reported in The Times newspaper on 15 January, and on the same day the paper reported that the Scotch whisky magnate Thomas Dewar had "kept himself in touch with the constituency" and might put his name forward as a possible Conservative candidate. The Walthamstow Central Liberal and Radical Association were initially undecided as to whether to contest the election, but were reported to be considering Arthur Pollen, who had been their candidate at the last general election, in 1895. On Monday 18 January, each of the parties held a meeting to consider their approach to the election. As expected, the Conservatives selected the 33-year-old Dewar, who had built his family business John Dewar & Sons into a global brand. The Liberals had not chosen a candidate, but it was reported to be almost certain that they would contest the election. With the writ not expected until 22 January, the Liberals were holding nightly consultations on a choice of candidate and Dewar said that he wanted a contested election. Rumours circulated that the Liberals would ask the conservationist Edward Buxton, who had held the seat from 1885 to 1886, to stand again. Meanwhile, Arnold Hills, chairman of the Thames Ironworks shipbuilding company at Leamouth, announced that he would stand as a Unionist and temperance candidate in opposition to Dewar. Hills was a sportsman, philanthropist, and promoter of vegetarianism as well as a successful businessman. On 22 January he said that he would definitely stand unless the Liberals fielded a candidate, in which case he would withdraw to avoid splitting the Conservative vote and risk handing the seat to the opposition. The High Sheriff of Essex announced on the 22nd that nominations would be taken on Thursday 28 January, and that polling would take place on 3 February. The next day, 23 January, the Executive of the Liberal Three Hundred met and selected Sam Woods as their candidate. Woods was a coal miner from St Helens in Lancashire, and a prominent trade unionist who had been President of the Miners' Federation of Great Britain since its foundation in 1891. He had been elected in 1892 as the MP for the Ince division of Lancashire, but lost his seat in 1895. The Times newspaper reported that Woods was the best possible candidate for the Liberals, because he would have the support of the labour as well as all factions of the Liberals. Hills then stopped his election agent from setting up committee rooms for the campaign, which was taken as a sign that he would indeed stand aside. The selection of Woods was confirmed at a general meeting of the Liberal Three Hundred on 25 January, and Hill's withdrawal was formally announced the following day. Campaign Woods said he was an "ardent radical", but not a socialist, and that he supported extending the general principles of Sir William Harcourt's 1894 budget. Woods wanted no direct or indirect tax for anyone earning under £100 per year, and graduated taxes on higher incomes. He also supported the payment of a salary to MPs, who received no payment until 1911. His taxation proposals were scorned by The Times, whose editorial on 26 January said that his proposal "should be worth a good many votes to his opponent". In a speech at Leyton Town Hall on the 26th, Dewar spoke in favour of trade with the colonies, and excluding alien paupers. He returned to the latter theme on the Friday 29th, when he told a meeting at the Barclay Hall in Leytonstone that "Europe should be told that the East End of London was not the place for the refuse of the continent". The two parties chose different approaches to electioneering. The Conservatives decided to concentrate on canvassing rather than public meetings, but the Liberals planned 28 meetings. Dewar set out canvassing in his coach and speaking in committee rooms, while the Liberals mounted a higher profile campaign. On Saturday 30th Woods took part in a joint meeting at Stratford Railway Works with Herbert Raphael, the Liberal candidate in the Romford by-election which was being held at the same time. Large numbers of workers from both constituencies were employed at Stratford. Woods had been chosen as a strong candidate. Several thousand Labour supporters in the constituency were believed never to have voted, a point which the Liberals had used to encourage him to stand. Sensing the opportunity, many prominent trade union and labour leaders came to Walthamstow to support Woods, including Joseph Havelock Wilson of the National Sailors' & Firemen's Union, as well as leaders of the General Labouers, the Carpenters and Joiner, the Gas Workers, Barge Builders and Marine Engineers unions. Woods opposed what he called the "Government's reactionary legislation", such as the Agricultural Rating Act, its proposals for education, and asking India to contribute to cost of Kitchener's expedition to the Sudan. He supported a range of what were then radical ideas; the abolition of the House of Lords power to veto legislation, one man, one vote in elections, the Irish people to control their own domestic affairs, site value taxation, radical reform of land laws, reform of secondary education, and improved housing. On the temperance issue, which divided Liberals, Woods supported local control over licensing, but objected to tied houses. Fearing constraints on their business, the Essex Licence Holders association decided to support Dewar, and to send a representative into the area to try to organise the licensed trade. No big controversy developed between the candidates. Irish Home Rule, which had split the Liberals in the 1880s, was only a secondary issue in the election addresses. Result Arrangements had been made to count the votes on polling night, rather than wait until the next day. The counting took place in Walthamstow Town Hall, where the results announced shortly after midnight: Woods won, with a majority of 279 votes. His victory came as a surprise, because the Liberals had never expected to win the seat. Aftermath Woods held the seat until the next general election, in October 1900, when he was defeated by the Conservative David Morgan. His health failed in 1904, and he died in 1915. Dewar was elected in 1900 as the MP for St George, Tower Hamlets, and knighted in 1902. He stood down at the 1906 election. He expanded his business to form the Distillers Company, was ennobled in 1919 as Baron Dewar, and died in 1930. See also Walthamstow constituency Walthamstow 1910 Walthamstow by-election List of United Kingdom by-elections (1900–1918) References Walthamstow by-election Walthamstow,1897 Walthamstow by-election Walthamstow,1896 Walthamstow by-election Walthamstow,1897 1890s in Essex Walthamstow Walthamstow by-election
Anoplodesmus stadelmanni, is a species of millipedes in the family Paradoxosomatidae. It is endemic to Sri Lanka. References Polydesmida Animals described in 1930 Endemic fauna of Sri Lanka Millipedes of Asia
```yaml input: pubkeys: - your_sha256_hash0000000000000000000000000000000000' - your_sha256_hash0000000000000000000000000000000000' - your_sha256_hash0000000000000000000000000000000000' message: your_sha256_hash56' signature: your_sha256_hashyour_sha256_hashyour_sha256_hash00' output: false ```
```c++ //file LICENSE_1_0.txt or copy at path_to_url #include <boost/exception/detail/is_output_streamable.hpp> namespace n1 { class c1 { }; } namespace n2 { class c2 { }; std::ostream & operator<<( std::ostream & s, c2 const & ) { s << "c2"; return s; } } template <bool Test> struct test; template <> struct test<true> { }; int main() { test<!boost::is_output_streamable<n1::c1>::value>(); test<boost::is_output_streamable<n2::c2>::value>(); test<boost::is_output_streamable<int>::value>(); return 0; } ```
```css Block element characteristics Make text unselectable Determine the opacity of background-colors using the RGBA declaration Disclose file format of links Debug with `*` selector ```
```objective-c /* * * This library is free software; you can redistribute it and/or modify * published by the Free Software Foundation; either version 2 of the * licence, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * You should have received a copy of the GNU Lesser General Public * * Author: Ryan Lortie <desrt@desrt.ca> */ #ifndef __G_MENU_MODEL_H__ #define __G_MENU_MODEL_H__ #include <glib-object.h> #include <gio/giotypes.h> G_BEGIN_DECLS /** * G_MENU_ATTRIBUTE_ACTION: * * The menu item attribute which holds the action name of the item. Action * names are namespaced with an identifier for the action group in which the * action resides. For example, "win." for window-specific actions and "app." * for application-wide actions. * * See also g_menu_model_get_item_attribute() and g_menu_item_set_attribute(). * * Since: 2.32 **/ #define G_MENU_ATTRIBUTE_ACTION "action" /** * G_MENU_ATTRIBUTE_ACTION_NAMESPACE: * * The menu item attribute that holds the namespace for all action names in * menus that are linked from this item. * * Since: 2.36 **/ #define G_MENU_ATTRIBUTE_ACTION_NAMESPACE "action-namespace" /** * G_MENU_ATTRIBUTE_TARGET: * * The menu item attribute which holds the target with which the item's action * will be activated. * * See also g_menu_item_set_action_and_target() * * Since: 2.32 **/ #define G_MENU_ATTRIBUTE_TARGET "target" /** * G_MENU_ATTRIBUTE_LABEL: * * The menu item attribute which holds the label of the item. * * Since: 2.32 **/ #define G_MENU_ATTRIBUTE_LABEL "label" /** * G_MENU_ATTRIBUTE_ICON: * * The menu item attribute which holds the icon of the item. * * The icon is stored in the format returned by g_icon_serialize(). * * This attribute is intended only to represent 'noun' icons such as * favicons for a webpage, or application icons. It should not be used * for 'verbs' (ie: stock icons). * * Since: 2.38 **/ #define G_MENU_ATTRIBUTE_ICON "icon" /** * G_MENU_LINK_SUBMENU: * * The name of the link that associates a menu item with a submenu. * * See also g_menu_item_set_link(). * * Since: 2.32 **/ #define G_MENU_LINK_SUBMENU "submenu" /** * G_MENU_LINK_SECTION: * * The name of the link that associates a menu item with a section. The linked * menu will usually be shown in place of the menu item, using the item's label * as a header. * * See also g_menu_item_set_link(). * * Since: 2.32 **/ #define G_MENU_LINK_SECTION "section" #define G_TYPE_MENU_MODEL (g_menu_model_get_type ()) #define G_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ G_TYPE_MENU_MODEL, GMenuModel)) #define G_MENU_MODEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ G_TYPE_MENU_MODEL, GMenuModelClass)) #define G_IS_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ G_TYPE_MENU_MODEL)) #define G_IS_MENU_MODEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ G_TYPE_MENU_MODEL)) #define G_MENU_MODEL_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ G_TYPE_MENU_MODEL, GMenuModelClass)) typedef struct _GMenuModelPrivate GMenuModelPrivate; typedef struct _GMenuModelClass GMenuModelClass; typedef struct _GMenuAttributeIterPrivate GMenuAttributeIterPrivate; typedef struct _GMenuAttributeIterClass GMenuAttributeIterClass; typedef struct _GMenuAttributeIter GMenuAttributeIter; typedef struct _GMenuLinkIterPrivate GMenuLinkIterPrivate; typedef struct _GMenuLinkIterClass GMenuLinkIterClass; typedef struct _GMenuLinkIter GMenuLinkIter; struct _GMenuModel { GObject parent_instance; GMenuModelPrivate *priv; }; /** * GMenuModelClass::get_item_attributes: * @model: the #GMenuModel to query * @item_index: The #GMenuItem to query * @attributes: (out) (element-type utf8 GLib.Variant): Attributes on the item * * Gets all the attributes associated with the item in the menu model. */ /** * GMenuModelClass::get_item_links: * @model: the #GMenuModel to query * @item_index: The #GMenuItem to query * @links: (out) (element-type utf8 Gio.MenuModel): Links from the item * * Gets all the links associated with the item in the menu model. */ struct _GMenuModelClass { GObjectClass parent_class; gboolean (*is_mutable) (GMenuModel *model); gint (*get_n_items) (GMenuModel *model); void (*get_item_attributes) (GMenuModel *model, gint item_index, GHashTable **attributes); GMenuAttributeIter * (*iterate_item_attributes) (GMenuModel *model, gint item_index); GVariant * (*get_item_attribute_value) (GMenuModel *model, gint item_index, const gchar *attribute, const GVariantType *expected_type); void (*get_item_links) (GMenuModel *model, gint item_index, GHashTable **links); GMenuLinkIter * (*iterate_item_links) (GMenuModel *model, gint item_index); GMenuModel * (*get_item_link) (GMenuModel *model, gint item_index, const gchar *link); }; GLIB_AVAILABLE_IN_2_32 GType g_menu_model_get_type (void) G_GNUC_CONST; GLIB_AVAILABLE_IN_2_32 gboolean g_menu_model_is_mutable (GMenuModel *model); GLIB_AVAILABLE_IN_2_32 gint g_menu_model_get_n_items (GMenuModel *model); GLIB_AVAILABLE_IN_2_32 GMenuAttributeIter * g_menu_model_iterate_item_attributes (GMenuModel *model, gint item_index); GLIB_AVAILABLE_IN_2_32 GVariant * g_menu_model_get_item_attribute_value (GMenuModel *model, gint item_index, const gchar *attribute, const GVariantType *expected_type); GLIB_AVAILABLE_IN_2_32 gboolean g_menu_model_get_item_attribute (GMenuModel *model, gint item_index, const gchar *attribute, const gchar *format_string, ...); GLIB_AVAILABLE_IN_2_32 GMenuLinkIter * g_menu_model_iterate_item_links (GMenuModel *model, gint item_index); GLIB_AVAILABLE_IN_2_32 GMenuModel * g_menu_model_get_item_link (GMenuModel *model, gint item_index, const gchar *link); GLIB_AVAILABLE_IN_2_32 void g_menu_model_items_changed (GMenuModel *model, gint position, gint removed, gint added); #define G_TYPE_MENU_ATTRIBUTE_ITER (g_menu_attribute_iter_get_type ()) #define G_MENU_ATTRIBUTE_ITER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ G_TYPE_MENU_ATTRIBUTE_ITER, GMenuAttributeIter)) #define G_MENU_ATTRIBUTE_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ G_TYPE_MENU_ATTRIBUTE_ITER, GMenuAttributeIterClass)) #define G_IS_MENU_ATTRIBUTE_ITER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ G_TYPE_MENU_ATTRIBUTE_ITER)) #define G_IS_MENU_ATTRIBUTE_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ G_TYPE_MENU_ATTRIBUTE_ITER)) #define G_MENU_ATTRIBUTE_ITER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ G_TYPE_MENU_ATTRIBUTE_ITER, GMenuAttributeIterClass)) struct _GMenuAttributeIter { GObject parent_instance; GMenuAttributeIterPrivate *priv; }; struct _GMenuAttributeIterClass { GObjectClass parent_class; gboolean (*get_next) (GMenuAttributeIter *iter, const gchar **out_name, GVariant **value); }; GLIB_AVAILABLE_IN_2_32 GType g_menu_attribute_iter_get_type (void) G_GNUC_CONST; GLIB_AVAILABLE_IN_2_32 gboolean g_menu_attribute_iter_get_next (GMenuAttributeIter *iter, const gchar **out_name, GVariant **value); GLIB_AVAILABLE_IN_2_32 gboolean g_menu_attribute_iter_next (GMenuAttributeIter *iter); GLIB_AVAILABLE_IN_2_32 const gchar * g_menu_attribute_iter_get_name (GMenuAttributeIter *iter); GLIB_AVAILABLE_IN_2_32 GVariant * g_menu_attribute_iter_get_value (GMenuAttributeIter *iter); #define G_TYPE_MENU_LINK_ITER (g_menu_link_iter_get_type ()) #define G_MENU_LINK_ITER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ G_TYPE_MENU_LINK_ITER, GMenuLinkIter)) #define G_MENU_LINK_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ G_TYPE_MENU_LINK_ITER, GMenuLinkIterClass)) #define G_IS_MENU_LINK_ITER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ G_TYPE_MENU_LINK_ITER)) #define G_IS_MENU_LINK_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ G_TYPE_MENU_LINK_ITER)) #define G_MENU_LINK_ITER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ G_TYPE_MENU_LINK_ITER, GMenuLinkIterClass)) struct _GMenuLinkIter { GObject parent_instance; GMenuLinkIterPrivate *priv; }; struct _GMenuLinkIterClass { GObjectClass parent_class; gboolean (*get_next) (GMenuLinkIter *iter, const gchar **out_link, GMenuModel **value); }; GLIB_AVAILABLE_IN_2_32 GType g_menu_link_iter_get_type (void) G_GNUC_CONST; GLIB_AVAILABLE_IN_2_32 gboolean g_menu_link_iter_get_next (GMenuLinkIter *iter, const gchar **out_link, GMenuModel **value); GLIB_AVAILABLE_IN_2_32 gboolean g_menu_link_iter_next (GMenuLinkIter *iter); GLIB_AVAILABLE_IN_2_32 const gchar * g_menu_link_iter_get_name (GMenuLinkIter *iter); GLIB_AVAILABLE_IN_2_32 GMenuModel * g_menu_link_iter_get_value (GMenuLinkIter *iter); G_END_DECLS #endif /* __G_MENU_MODEL_H__ */ ```
Red Bull Crashed Ice was a world tour in ice cross downhill, a winter extreme sporting event which involves downhill skating in an urban environment, on a track which includes steep turns and high vertical drops. Racers speed down the course's turns, berms, and jumps. Competitors, having advanced from one of the tryouts in the prior months, race in heats of four skaters, with the top two advancing from each heat. The events were held from 2001 to 2019; the ATSX now oversees ice cross downhill events. The series was created and is managed by energy drinks company Red Bull. It is similar to ski cross and snowboard cross, except with ice skates on an ice track, instead of skis or snowboards on a snow track. Racers are typically athletes with a background in ice hockey, however competitors from the sports of bandy and ringette have also competed with great success, such as Salla Kyhälä from Finland's national ringette team, who also played in Canada's National Ringette League, and Jasper Felder, a bandy player who became an ice cross downhill seven-time single event winner. As a bandy player, Felder represented the United States national bandy team, while in ice cross downhill, represented Sweden while equipped with ice hockey gear. Felder was first in the single-event in 2001, 2002, 2003, 2005, 2009, and twice in 2004. Single event winners World championship era From 2010 onwards a points system was introduced. After the season, the skater with the most points is crowned the world champion. Points are awarded to the top 100 racers. Points are awarded starting with 1000 for the winner, after that 800, 600, 500 and decreasing to 0.5 for place 100. For the 2015 season, the Riders Cup events were instituted. The events were designed to make the sport more accessible to more skaters. For these events, skaters can earn up to 25% of the points that the main events are awarded, with percentages decreasing with each placing. Meaning that the winner receives 250 points, which is 25% of the main event 1000 points and it decreases to 1% of the main event points for the 64th finisher, who receives 2.5 points. Any placings 65th and beyond do not score any points. As well, a new wrinkle was added to the overall championship called the "throw out" rule. If a competitor competes in all of the stops, up to a maximum of 12 events in future years, the lowest main event score and the lowest Riders Cup score will be thrown out. This will give the skater an adjusted score for the overall championship. Thus, meaning that it is in the skater's best interest to compete in all events. Individual Competition 2016 World Championship 2017 World Championship 2018 World Championship 2019 World Championship Men's competition 2010 World Championship 2011 World Championship 2012 World Championship 2013 World Championship 2014 World Championship 2015 World Championship Team Competition 2013 Team Challenge World Championship 2014 Team Challenge World Championship 2015 Team Challenge World Championship Women's competition 2015 Women's World Championship Gallery References Red Bull’s Headlong Frozen Dash Is a Crash Course in Marketing, By Matt Higgins, New York Times, March 3, 2007 Red Bull Crashed Ice returns to Quebec City, by Melissa Halarides, The Concordian, March 7, 2007 A Downhill Ice Course, Full Hockey Gear and the Need for Speed, Market Wire, August 2006 Crashed Ice: Le parcours de l'an dernier gonflé aux stéroïdes, by Ian Bussières, Le Soleil, January 25th 2008, P. 8 & 9 External links Official site Red Bull sports events Ice skating Recurring sporting events established in 2001
```php <?php declare(strict_types=1); /** */ namespace OCA\Settings\WellKnown; use OCP\AppFramework\Http\RedirectResponse; use OCP\Http\WellKnown\GenericResponse; use OCP\Http\WellKnown\IHandler; use OCP\Http\WellKnown\IRequestContext; use OCP\Http\WellKnown\IResponse; use OCP\IURLGenerator; class ChangePasswordHandler implements IHandler { private IURLGenerator $urlGenerator; public function __construct(IURLGenerator $urlGenerator) { $this->urlGenerator = $urlGenerator; } public function handle(string $service, IRequestContext $context, ?IResponse $previousResponse): ?IResponse { if ($service !== 'change-password') { return $previousResponse; } $response = new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('settings.PersonalSettings.index', ['section' => 'security'])); return new GenericResponse($response); } } ```
```html {{ define "content" }} <p> This information is gathered from the Go runtime and represents the ongoing memory consumption of this process. Please refer to the <a href="path_to_url#MemStats">Go documentation on the MemStats type</a> for more information about all of these values. </p> <table> <thead> <tr> <th>Counter</th> <th>Value</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>HeapInuse</td> <td id="HeapInuse">{{.HeapInuse}} bytes</td> <td>Bytes in in-use spans.</td> </tr> <tr> <td>Total Alloc</td> <td id="TotalAlloc">{{.TotalAlloc}} bytes</td> <td>Cumulative bytes allocated for heap objects.</td> </tr> <tr> <td>Sys</td> <td id="Sys">{{.Sys}} bytes</td> <td>Total bytes of memory obtained from the OS.</td> </tr> <tr> <td>Lookups</td> <td id="Lookups">{{.Lookups}} lookups</td> <td>Number of pointer lookups performed by the runtime.</td> </tr> <tr> <td>Mallocs</td> <td id="Mallocs">{{.Mallocs}} objects</td> <td>Cumulative count of heap objects allocated.</td> </tr> <tr> <td>Frees</td> <td id="Frees">{{.Frees}} objects</td> <td>Cumulative count of heap objects freed.</td> </tr> <tr> <td>Live</td> <td id="Live">0 objects</td> <td>Count of live heap objects.</td> </tr> <tr> <td>HeapAlloc</td> <td id="HeapAlloc">{{.HeapAlloc}} bytes</td> <td>Allocated heap objects.</td> </tr> <tr> <td>HeapSys</td> <td id="HeapSys">{{.HeapSys}} bytes</td> <td>Heap memory obtained from the OS.</td> </tr> <tr> <td>HeapIdle</td> <td id="HeapIdle">{{.HeapIdle}} bytes</td> <td>Bytes in idle (unused) spans.</td> </tr> <tr> <td>HeapReleased</td> <td id="HeapReleased">{{.HeapReleased}} bytes</td> <td>Physical memory returned to the OS.</td> </tr> <tr> <td>HeapObjects</td> <td id="HeapObjects">{{.HeapObjects}} objects</td> <td>Number of allocated heap objects.</td> </tr> <tr> <td>StackInuse</td> <td id="StackInuse">{{.StackInuse}} bytes</td> <td>Bytes in stack spans.</td> </tr> <tr> <td>StackSys</td> <td id="StackSys">{{.StackSys}} bytes</td> <td>Stack memory obtained from the OS.</td> </tr> <tr> <td>NextGC</td> <td id="NextGC">{{.NextGC}} bytes</td> <td>Target heap size of the next GC cycle.</td> </tr> <tr> <td>LastGC</td> <td id="LastGC"></td> <td>The time the last garbage collection finished.</td> </tr> <script> // we do this so there's a useful date in the table, which avoids things shifting around during initial paint let d = new Date().toLocaleString(); document.getElementById("LastGC").innerText = d; </script> <tr> <td>PauseTotalNs</td> <td id="PauseTotalNs">{{.PauseTotalNs}} ns</td> <td>Cumulative time spent in GC stop-the-world pauses.</td> </tr> <tr> <td>NumGC</td> <td id="NumGC">{{.NumGC}} GC cycles</td> <td>Completed GC cycles.</td> </tr> <tr> <td>NumForcedGC</td> <td id="NumForcedGC">{{.NumForcedGC}} GC cycles</td> <td>GC cycles that were forced by the application calling the GC function.</td> </tr> <tr> <td>GCCPUFraction</td> <td id="GCCPUFraction"></td> <td>Fraction of this program's available CPU time used by the GC since the program started.</td> </tr> </tbody> </table> <br> <button class="btn btn-istio" onclick="forceCollection()">Force Garbage Collection</button> {{ template "last-refresh" .}} <script> "use strict"; function refreshMemStats() { let url = window.location.protocol + "//" + window.location.host + "/memj/"; let ajax = new XMLHttpRequest(); ajax.onload = onload; ajax.onerror = onerror; ajax.open("GET", url, true); ajax.send(); function onload() { if (this.status === 200) { // request succeeded let ms = JSON.parse(this.responseText); document.getElementById("HeapInuse").innerText = ms.HeapInuse.toLocaleString() + " bytes"; document.getElementById("TotalAlloc").innerText = ms.TotalAlloc.toLocaleString() + " bytes"; document.getElementById("Sys").innerText = ms.Sys.toLocaleString() + " bytes"; document.getElementById("Lookups").innerText = ms.Lookups.toLocaleString() + " lookups"; document.getElementById("Mallocs").innerText = ms.Mallocs.toLocaleString() + " objects"; document.getElementById("Frees").innerText = ms.Frees.toLocaleString() + " objects"; document.getElementById("Live").innerText = (ms.Mallocs - ms.Frees).toLocaleString() + " objects"; document.getElementById("HeapAlloc").innerText = ms.HeapAlloc.toLocaleString() + " bytes"; document.getElementById("HeapSys").innerText = ms.HeapSys.toLocaleString() + " bytes"; document.getElementById("HeapIdle").innerText = ms.HeapIdle.toLocaleString() + " bytes"; document.getElementById("HeapReleased").innerText = ms.HeapReleased.toLocaleString() + " bytes"; document.getElementById("HeapObjects").innerText = ms.HeapObjects.toLocaleString() + " objects"; document.getElementById("StackInuse").innerText = ms.StackInuse.toLocaleString() + " bytes"; document.getElementById("StackSys").innerText = ms.StackSys.toLocaleString() + " bytes"; document.getElementById("NextGC").innerText = ms.NextGC.toLocaleString() + " bytes"; document.getElementById("PauseTotalNs").innerText = ms.PauseTotalNs.toLocaleString() + " ns"; document.getElementById("NumGC").innerText = ms.NumGC.toLocaleString() + " GC cycles"; document.getElementById("NumForcedGC").innerText = ms.NumForcedGC.toLocaleString() + " GC cycles"; let d = new Date(ms.LastGC / 1000000).toLocaleString(); document.getElementById("LastGC").innerText = d; let frac = ms.GCCPUFraction; if (frac < 0) { frac = 0.0; } let percent = (frac * 100).toFixed(2); document.getElementById("GCCPUFraction").innerText = percent + "%"; updateRefreshTime(); } } function onerror(e) { console.error(e); } } function forceCollection() { let url = window.location.protocol + "//" + window.location.host + "/memj/forcecollection"; let ajax = new XMLHttpRequest(); ajax.onload = onload; ajax.onerror = onerror; ajax.open("PUT", url, true); ajax.send(); function onload() { } function onerror(e) { console.error(e); } } refreshMemStats(); window.setInterval(refreshMemStats, 1000); </script> {{ end }} ```
```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\Sheets; class ClearBasicFilterRequest extends \Google\Model { /** * @var int */ public $sheetId; /** * @param int */ public function setSheetId($sheetId) { $this->sheetId = $sheetId; } /** * @return int */ public function getSheetId() { return $this->sheetId; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ClearBasicFilterRequest::class, 'Google_Service_Sheets_ClearBasicFilterRequest'); ```
Clare Boothe Luce (; March 10, 1903 – October 9, 1987) was an American writer, politician, U.S. ambassador, and public conservative figure. A versatile author, she is best known for her 1936 hit play The Women, which had an all-female cast. Her writings extended from drama and screen scenarios to fiction, journalism, and war reportage. She was married to Henry Luce, publisher of Time, Life, Fortune, and Sports Illustrated. Politically, Luce was a leading conservative in later life and was well known for her anti-communism. In her youth, she briefly aligned herself with the liberalism of President Franklin Roosevelt as a protégé of Bernard Baruch but later became an outspoken critic of Roosevelt. Although she was a strong supporter of the Anglo-American alliance in World War II, she remained outspokenly critical of British colonialism in India. Known as a charismatic and forceful public speaker, especially after her conversion to Catholicism in 1946, she campaigned for every Republican presidential candidate from Wendell Willkie to Ronald Reagan. Early life Luce was born Ann Clare Boothe in New York City on March 10, 1903, the second child of Anna Clara Schneider (also known as Ann Snyder Murphy, Ann Boothe, and Ann Clare Austin) and William Franklin Boothe (also known as "John J. Murphy" and "Jord Murfe"). Her parents were not married and would separate in 1912. Her father, a sophisticated man and a brilliant violinist, instilled in his daughter a love of literature, if not of music, but had trouble holding a job and spent years as a traveling salesman. Parts of young Clare's childhood were spent in Memphis and Nashville, Tennessee, Chicago, Illinois, and Union City, New Jersey as well as New York City. Clare Boothe had an elder brother, David Franklin Boothe. She attended the cathedral schools in Garden City and Tarrytown, New York, graduating first in her class in 1919 at 16. Her ambitious mother's initial plan for her was to become an actress. Clare understudied Mary Pickford on Broadway at age 10, and had her Broadway debut in Mrs. Henry B. Harris' production of "The Dummy" in 1914, a detective comedy. She then had a small part in Thomas Edison's 1915 movie, The Heart of a Waif. After a tour of Europe with her mother and stepfather, Dr. Albert E. Austin, whom Ann Boothe married in 1919, she became interested in the women's suffrage movement, and she was hired by Alva Belmont to work for the National Woman's Party in Washington, D.C. and Seneca Falls, New York. She wed George Tuttle Brokaw, millionaire heir to a New York clothing fortune, on August 10, 1923, at the age of 20. They had one daughter, Ann Clare Brokaw (1924–1944) who was killed in a car accident. According to Boothe, Brokaw was a hopeless alcoholic, and the marriage ended in divorce on May 20, 1929. On November 23, 1935, she married Henry Luce, the publisher of Time, Life, and Fortune. She thereafter called herself Clare Boothe Luce, a frequently misspelled name that was often confused with that of her exact contemporary Claire Luce, a stage and film actress. As a professional writer, Luce continued to use her maiden name. In 1939 she commissioned Frida Kahlo to paint a portrait of the late Dorothy Hale. Kahlo produced The Suicide Of Dorothy Hale. Luce was appalled and almost destroyed it; Isamu Noguchi dissuaded her: the painting is now at the Phoenix Art Museum. Noguchi did make several changes to Kahlo's painting, per Luce's direction; still, Luce hid the disturbing painting away for decades. Former NBC News producer Pamela Hamilton wrote about Dorothy Hale, Clare Boothe Luce, and the painting by Frida Kahlo in the book Lady Be Good. On January 11, 1944, her only child, Ann Clare Brokaw, a 19-year-old senior at Stanford University, was killed in an automobile accident. As a result of the tragedy, Luce explored psychotherapy and religion. After grief counseling with Bishop Fulton Sheen, she was received into the Catholic Church in 1946. She became an ardent essayist and lecturer in celebration of her faith, and she was ultimately honored by being named a Dame of Malta. As a memorial to her daughter, beginning in 1949 she funded the construction of a Catholic church in Palo Alto for use by the Stanford campus ministry. The new Saint Ann Chapel was dedicated in 1951. It was sold by the diocese in 1998 and in 2003 became a church of the Anglican Province of Christ the King. Marriage to Henry Luce The marriage between Clare and Henry was difficult. Henry was by any standard extremely successful, but his physical awkwardness, lack of humor, and newsman's discomfort with any conversation that was not strictly factual put him in awe of his beautiful wife's social poise, wit, and fertile imagination. Clare's years as managing editor of Vanity Fair left her with an avid interest in journalism (she suggested the idea of Life magazine to her husband before it was developed internally). Henry himself was generous in encouraging her to write for Life, but the question of how much coverage she should be accorded in Time, as she grew more famous, was always a careful balancing act for Henry since he did not want to be accused of nepotism. It has been reported that their marriage was sexually "open". Clare Luce's lovers included Ambassador Joseph P. Kennedy, Randolph Churchill, General Lucian Truscott, General Charles Willoughby, and Roald Dahl. Joseph P. Kennedy was the father of several United States politicians. Clare Luce at times provided advice to the campaigns of John F. Kennedy, who became the 35th U.S. president. Dahl, who became a very successful author after the war, was at the time a dashing young RAF fighter pilot, temporarily assigned to Washington. He was part of a plan developed by spymaster Sir William Stephenson (code name "Intrepid"), intended to weaken American isolationist thinking by influencing, among others, American journalists and politicians. Dahl was instructed to romance Clare, who was thirteen years his senior, to see if, with the right kind of encouragement, she could warm to the British position. The very tall (6'6") and athletic Dahl later claimed he found his affair with Clare to be so physically demanding that he had begged the British ambassador to relieve him of the task, but the ambassador told him he must continue. In the early 1960s, both Luces were friends of philosopher, author, and LSD advocate Gerald Heard. They tried LSD one time under his careful supervision. Although taking LSD never turned into a habit for either of the Luces, a friend (and biographer of Clare), Wilfred Sheed, wrote that Clare made use of it at least several times. The Luces stayed together until Henry's death from a heart attack in 1967. As one of the great "power couples" in American history, they were bonded by their mutual interests and complementary, if contrasting, characters. They treated each other with unfailing respect in public, never more so than when he willingly acted as his wife's consort during her years as ambassador to Italy. She was never able to convert him to Catholicism (he was the son of a Presbyterian missionary) but he did not question the sincerity of her faith, often attended Mass with her, and defended her when she was criticized by his fellow Protestants. In the early years of her widowhood, she retired to the luxurious beach house that she and her husband had planned in Honolulu, but boredom with life in what she called "this fur-lined rut" brought her back to Washington, D.C. for increasingly long periods. She made her final home there in 1983. Writing career A writer with considerable powers of invention and wit, Luce published Stuffed Shirts, a promising volume of short stories, in 1931. Scribner's Magazine compared the work to Evelyn Waugh's Vile Bodies for its bitter humor. The New York Times found it socially superficial, but praised its "lovely festoons of epigrams" and beguiling stylishness: "What malice there may be in these pages has a felinity that is the purest Angoran." The book's device of characters interlinked from story to story was borrowed from Sherwood Anderson's Winesburg, Ohio (1919), but it impressed Andre Maurois, who asked Luce's permission to imitate it. Luce also published many magazine articles. Her real talent, however, was as a playwright. After the failure of her initial stage effort, the marital melodrama Abide With Me (1935), she rapidly followed up with a satirical comedy, The Women. Deploying a cast of no fewer than 40 actresses who discussed men in often scorching language, it became a Broadway smash in 1936 and, three years later, a successful Hollywood movie known for its exclusively female cast. Toward the end of her life, Luce claimed that for half a century, she had steadily received royalties from productions of The Women all around the world. Later in the 1930s, she wrote two more successful, but less durable plays, also both made into movies: Kiss the Boys Goodbye and Margin for Error. The latter work "presented an all-out attack on the Nazis' racist philosophy". Its opening night in Princeton, New Jersey, on October 14, 1939, was attended by Albert Einstein and Thomas Mann. Otto Preminger directed and starred in both the Broadway production and screen adaptation. Much of Luce's famously acid wit ("No good deed goes unpunished", "Widowhood is a fringe benefit of marriage", "A hospital is no place to be sick") can be traced back to the days when, as a wealthy young divorcee in the early 1930s, she became a caption writer at Vogue and then, associate editor and managing editor of Vanity Fair. She not only edited the works of such great humorists as P. G. Wodehouse and Corey Ford but also contributed many comic pieces of her own, signed and unsigned. Her humor, which she retained into old age, was one of the pillars of Clare's character. Another branch of Luce's literary career was that of war journalism. Europe in the Spring was the result of a four-month tour of Britain, Belgium, the Netherlands, Italy, and France in 1939–1940 as a correspondent for Life magazine. She described the widening battleground of World War II as "a world where men have decided to die together because they are unable to find a way to live together." In 1941, Luce and her husband toured China and reported on the status of the country and its war with Japan. Her profile of General Douglas MacArthur was on the cover of Life on December 8, 1941, the day after the Japanese attacked Pearl Harbor. After the United States entered the war, Luce toured military installations in Africa, India, China, and Burma, compiling a further series of reports for Life. She published interviews with General Harold Alexander, commander of British troops in the Middle East, Chiang Kai-shek, Jawaharlal Nehru, and General Stilwell, commander of American troops in the China-Burma-India theater. Her lifelong instinct for being in the right place at the right time and easy access to key commanders made her an influential figure on both sides of the Atlantic. She endured bombing raids and other dangers in Europe and the Far East. She did not hesitate to criticize the unwarlike lifestyle of General Sir Claude Auchinleck's Middle East Command in language that recalled the barbs of her best playwriting. One draft article for Life, noting that the general lived far from the Egyptian front in a houseboat, and mocking RAF pilots as "flying fairies", was discovered by British Customs when she passed through Trinidad in April 1942. It caused such Allied consternation that she briefly faced house arrest. Coincidentally or not, Auchinleck was fired a few months later by Winston Churchill. Her varied experiences in all the major war theaters qualified her for a seat the following year on the House Military Affairs Committee after she was elected to the United States House of Representatives in 1942. Luce never wrote an autobiography but willed her enormous archive of personal papers to the Library of Congress. Political career House of Representatives In 1942, Luce won a Republican seat in the United States House of Representatives representing Fairfield County, Connecticut, the 4th Congressional District. She based her platform on three goals: "One, to win the war. Two, to prosecute that war as loyally and effectively as we can as Republicans. Three, to bring about a better world and a durable peace, with special attention to post-war security and employment here at home." She took up the seat formerly held by her late stepfather, Dr. Albert Austin. An outspoken critic of Roosevelt's foreign policy, Luce was supported by isolationists and conservatives in Congress, and she was appointed early to the prestigious House Military Affairs Committee. Although she was by no means the only female representative on the floor, her beauty, wealth, and penchant for slashing witticisms caused her to be treated patronizingly by colleagues of both sexes. She made a sensational debut in her maiden speech, coining the phrase "globaloney" to disparage Vice President Henry Wallace's recommendation for airlines of the world to be given free access to US airports. She called for repeal of the Chinese Exclusion Act, comparing its "doctrine of race theology" to Adolf Hitler's, advocated aid for war victims abroad, and sided with the administration on issues such as infant-care and maternity appropriations for the wives of enlisted men. Nevertheless, Roosevelt took a dislike to her and campaigned in 1944 to attempt to prevent her re-election, publicly calling her "a sharp-tongued glamor girl of forty." She retaliated by accusing Roosevelt of being "the only American president who ever lied us into a war because he did not have the political courage to lead us into it." During her second term, Luce was instrumental in the creation of the Atomic Energy Commission and, during the course of two tours of Allied battlefronts in Europe, she campaigned for more support of what she considered to be America's forgotten army in Italy. She was present at the liberation of several Nazi concentration camps in April 1945, and after V-E Day, she began warning against the rise of international Communism as another form of totalitarianism, likely to lead to World War III. In 1946, she was the co-author of the Luce–Celler Act of 1946, which permitted Indians and Filipinos to immigrate to the US, introducing a quota of 100 immigrants from each country, and allowed them ultimately to become naturalized citizens. Luce did not run for re-election in 1946. Ambassador to Italy Luce returned to politics during the 1952 presidential election: she campaigned on behalf of Republican candidate Dwight Eisenhower, giving more than 100 speeches on his behalf. Her anti-Communist speeches on the stump, radio, and television were effective in persuading a large number of traditionally Democratic-voting Catholics to switch parties and vote Eisenhower. For her contributions Luce was rewarded with an appointment as ambassador to Italy, a post that oversaw 1150 employees, 8 consulates, and 9 information centers. She was confirmed by the Senate in March 1953, the first American woman ever to hold such an important diplomatic post. Italians reacted skeptically at first to the arrival of a female ambassador in Rome, but Luce soon convinced those of moderate and conservative temper that she favored their civilization and religion. "Her admirers in Italy – and she had millions – fondly referred to her as la Signora, 'the lady'." The country's large Communist minority, however, regarded her as a foreign meddler in Italian affairs. In Patriot Proest, Luce is pictured with Monsignor William A. Hemmick. She was no stranger to Pope Pius XII, who welcomed her as a friend and faithful acolyte. Over the course of several audiences since 1940, Luce had impressed Pius XII as one of the most effective secular preachers of Catholicism in America. Her principal achievement as ambassador was to play a vital role in negotiating a peaceful solution to the Trieste Crisis of 1953–1954, a border dispute between Italy and Yugoslavia that she saw as potentially escalating into a war between East and West. Her sympathies throughout were with the Christian Democratic government of Giuseppe Pella, and she was influential on the Mediterranean policy of Secretary of State John Foster Dulles, another anticommunist. Although Luce regarded the abatement of the acute phase of the crisis in December 1953 as a triumph for herself, the main work of settlement, finalized in October 1954, was undertaken by professional representatives of the five concerned powers (Britain, France, the United States, Italy, and Yugoslavia) meeting in London. As ambassador, Luce consistently overestimated the possibility that the Italian left would mount a governmental coup and turn the country communist unless the democratic center was buttressed with generous American aid. A United States Defense Department historical study declassified in 2016 revealed that during her time as ambassador, Boothe Luce oversaw a covert financial support program for centrist Italian governments aimed at weakening the Italian Communist Party's hold on labor unions. Nurturing an image of her own country as a haven of social peace and prosperity, she threatened to boycott the 1955 Venice Film Festival if the American juvenile delinquent film Blackboard Jungle was shown. Around the same time, she fell seriously ill with arsenic poisoning. Sensational rumors circulated that the ambassador was the target of extermination by agents of the Soviet Union. Medical analysis eventually determined that the poisoning was caused by arsenate of lead in paint dust falling from the stucco that decorated her bedroom ceiling. The episode debilitated Luce physically and mentally, and she resigned her post in December 1956. Upon her departure, Rome's Il Tempo concluded "She has given a notable example of how well a woman can discharge a political post of grave responsibility." In 1957, she was awarded the Laetare Medal by the University of Notre Dame, considered the most prestigious award for American Catholics. A great appreciator of Italian haute couture, she was a frequent visitor and client of the ateliers Gattinoni, Ferdinandi, Schuberth, and Sorelle Fontana in Rome. Ambassador to Brazil nomination In April 1959, President Eisenhower nominated a recovered Luce to be the US Ambassador to Brazil. She began to learn enough of the Portuguese language in preparation for the job, but she was by now so conservative that her appointment met with strong opposition from a small number of Democratic senators. Leading the charge was Oregon Senator Wayne Morse. Still, Luce was confirmed by a 79 to 11 vote. Her husband urged her to decline the appointment, noting that it would be difficult for her to work with Morse, who chaired the Senate Subcommittee on Latin American Affairs. Luce eventually sent Eisenhower a letter explaining that she felt that the controversy surrounding her appointment would hinder her abilities to be respected by both her Brazilian and US coworkers. Thus, as she had never left American soil, she never officially took office as ambassador. Political life after office After Fidel Castro led a revolution in Cuba in 1959, Luce and her husband began to sponsor anticommunist groups. This support included funding Cuban exiles in commando speedboat raids against Cuba in the early 1960s. Luce's continuing anticommunism as well as her advocacy of conservatism led her to support Senator Barry Goldwater of Arizona as the Republican candidate for president in 1964. She also considered but rejected a candidacy for the United States Senate from New York on the Conservative party ticket. That same year, which also saw the political emergence of future friend Ronald Reagan, marked the voluntary end of Henry Luce's tenure as editor-in-chief of Time. The Luces retired together, establishing a winter home in Arizona and planning a final move to Hawaii. Her husband, Henry, died in 1967 before that dream could be realized, but she went ahead with construction of a luxurious beach house in Honolulu, and, for some years, she led an active life in Hawaii high society. In 1973, President Richard Nixon named her to the President's Foreign Intelligence Advisory Board (PFIAB). She remained on the board until President Jimmy Carter succeeded President Gerald Ford in 1977. By then, she had put down roots in Washington, D.C., that would become permanent in her last years. In 1979, she was the first woman to be awarded the Sylvanus Thayer Award by the United States Military Academy at West Point. President Reagan reappointed Luce to PFIAB. She served on the board until 1983. In 1986, Luce was the recipient of the Golden Plate Award of the American Academy of Achievement. Presidential Medal of Freedom President Reagan awarded her the Presidential Medal of Freedom in 1983. She was the first female member of Congress to receive this award. Upon presenting her with the Presidential Medal of Freedom, Reagan said this of Luce: Death Luce died of brain cancer on October 9, 1987, at age 84, at her Watergate apartment in Washington, D.C. She is buried at Mepkin Abbey, South Carolina, a plantation that she and Henry Luce had once owned and given to a community of Trappist monks. She lies in a grave adjoining her mother, daughter, and husband. Legacy Feminism Revered in her later years as a heroine of the feminist movement, Luce had mixed feelings about the role of women in society. As a congresswoman in 1943, she was invited to co-sponsor a submission of the Equal Rights Amendment, offered by Representative Louis Ludlow of Indiana, but claimed that the invitation got lost in her mail. Luce never ceased to advise women to marry and provide supportive homes for their husbands. (During her ambassadorial years, at a dinner in Luxembourg attended by many European dignitaries, Luce was heard declaiming that all women wanted from men was "babies and security".) Yet, her own professional career as a successful editor, writer, playwright, reporter, legislator, and diplomat remarkably showed how a woman of humble origins and no college education could raise herself to an escalating series of public heights. Luce bequeathed a large part of her personal fortune of some $50 million to an academic program, the Clare Boothe Luce Program, designed to encourage the entry of women into technological fields traditionally dominated by men. Because of her determination and unwillingness to let her gender stand in the way of her personal and professional achievements, Luce is considered to be an influential role model by many women. Starting from humble beginnings, Luce never allowed her initial poverty or her male counterparts' lack of respect to keep her from achieving as much as if not more than many of the men surrounding her. In 2017, she was inducted into the National Women's Hall of Fame. Clare Boothe Luce Program Since 1989, the Clare Boothe Luce Program (CBLP) has become a significant source of private funding support for women in science, mathematics, and engineering. All awards must be used exclusively in the United States (not applicable for travel or study abroad). Student recipients must be U.S. citizens and faculty recipients must be citizens or permanent residents. Thus far, the program has supported more than 1,500 women. The terms of the bequest require the following criteria: at least fifty percent of the awards go to Roman Catholic colleges, universities, and one high school (Villanova Preparatory School) grants are made only to four-year degree-granting institutions, not directly to individuals The program is divided into three distinct categories: undergraduate scholarships and research awards graduate and post-doctoral fellowships tenure-track appointment support at the assistant or associate professorship level Conservatism The Clare Boothe Luce Policy Institute (CBLPI) was founded in 1993 by Michelle Easton. The non-profit think tank seeks to advance American women through conservative ideas and espouses much the same philosophy as that of Clare Boothe Luce, in terms of both foreign and domestic policy. The CBLPI sponsors a program that brings conservative speakers to college campuses such as conservative commentator, Ann Coulter. The Clare Boothe Luce Award, established in 1991, is The Heritage Foundation's highest award for distinguished contributions to the conservative movement. Prominent recipients include Ronald Reagan, Margaret Thatcher, and William F. Buckley Jr. Publications Plays 1935 Abide with Me 1936 The Women 1938 Kiss the Boys Goodbye 1939 Margin for Error 1951 Child of the Morning 1970 Slam the Door Softly Screen Stories 1949 Come to the Stable Books 1931 Stuffed Shirts 1940 Europe in the Spring 1952 Saints for Now (editor) See also List of notable brain tumor patients Women in the United States House of Representatives Notes References Hamilton, Pamela (2021). Lady Be Good External links Booknotes interview with Sylvia Jukes Morris on Rage For Fame: The Ascent of Clare Boothe Luce, July 27, 1997. Q&A interview with Morris on Price of Fame: The Honorable Clare Boothe Luce, August 3, 2014. Discussion of Price of Fame with Morris and James Atlas, July 22, 2014 Library of Congress website Henry Luce profile Clare Boothe Luce Policy Institute website 1903 births 1987 deaths 20th-century American dramatists and playwrights 20th-century American politicians 20th-century Roman Catholics 20th-century American women writers Ambassadors of the United States to Italy American women dramatists and playwrights American women in politics American women journalists American women ambassadors Aphorists Converts to Roman Catholicism Dames of Malta Deaths from brain cancer in the United States Deaths from cancer in Washington, D.C. Female critics of feminism Female members of the United States House of Representatives Laetare Medal recipients Neurological disease deaths in Washington, D.C. People from Ridgefield, Connecticut Presidential Medal of Freedom recipients Roman Catholic writers Women in Connecticut politics Writers from Connecticut Writers from New York City Ward–Belmont College alumni Republican Party members of the United States House of Representatives from Connecticut 20th-century American non-fiction writers Catholics from Connecticut 20th-century American women politicians American anti-communists American anti-fascists 20th-century American diplomats Burials in South Carolina
```smalltalk using Microsoft.AspNetCore.Html; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Razor.TagHelpers; using System.Text; using System.Threading.Tasks; namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; public class AbpModalTagHelperService : AbpTagHelperService<AbpModalTagHelper> { public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { output.TagName = null; var childContent = await output.GetChildContentAsync(); SetContent(context, output, childContent); } protected virtual void SetContent(TagHelperContext context, TagHelperOutput output, TagHelperContent childContent) { var modalContent = GetModalContentElement(context, output, childContent); var modalDialog = GetModalDialogElement(context, output, modalContent); var modal = GetModal(context, output, modalDialog); output.Content.SetHtmlContent(modal); } protected virtual TagBuilder GetModalContentElement(TagHelperContext context, TagHelperOutput output, TagHelperContent childContent) { var element = new TagBuilder("div"); element.AddCssClass(GetModalContentClasses()); element.InnerHtml.SetHtmlContent(childContent); return element; } protected virtual TagBuilder GetModalDialogElement(TagHelperContext context, TagHelperOutput output, IHtmlContent innerHtml) { var element = new TagBuilder("div"); element.AddCssClass(GetModalDialogClasses()); element.Attributes.Add("role", "document"); element.InnerHtml.SetHtmlContent(innerHtml); return element; } protected virtual TagBuilder GetModal(TagHelperContext context, TagHelperOutput output, IHtmlContent innerHtml) { var element = new TagBuilder("div"); element.AddCssClass(GetModalClasses()); element.Attributes.Add("tabindex", "-1"); element.Attributes.Add("role", "dialog"); element.Attributes.Add("aria-hidden", "true"); foreach (var attr in output.Attributes) { element.Attributes.Add(attr.Name, attr.Value.ToString()); } SetDataAttributes(element); element.InnerHtml.SetHtmlContent(innerHtml); return element; } protected virtual string GetModalClasses() { return "modal fade"; } protected virtual string GetModalDialogClasses() { var classNames = new StringBuilder("modal-dialog"); if (TagHelper.Centered ?? false) { classNames.Append(" "); classNames.Append("modal-dialog-centered"); } if (TagHelper.Scrollable ?? false) { classNames.Append(" "); classNames.Append("modal-dialog-scrollable"); } if (TagHelper.Size != AbpModalSize.Default) { classNames.Append(" "); classNames.Append(TagHelper.Size.ToClassName()); } return classNames.ToString(); } protected virtual string GetModalContentClasses() { return "modal-content"; } protected virtual string GetDataAttributes() { if (TagHelper.Static == true) { return "data-bs-backdrop=\"static\" "; } return string.Empty; } protected virtual void SetDataAttributes(TagBuilder builder) { if (TagHelper.Static == true) { builder.Attributes.Add("data-bs-backdrop", "static"); } } } ```
Storyteller is a book by Amy Thomson published in 2003 by Ace Books. The book follows the story of an orphan who is adopted by a storyteller, a member of the Storytelling Guild who travels the stars in a historian like capacity. In contrast to her earlier books which were very hard science fiction Storyteller was much more romantic, the novel focuses on themes such as longevity and environmentalism ignoring technological focus. One reviewer wrote "Some readers will find this book immensely touching. However, readers who prefer a harder edge are liable be put off by sentimentality, weak conflict and a too-readily resolved plot that smacks of wish fulfillment". References External links 2003 American novels Novels by Amy Thomson Novels about orphans Ace Books books
```javascript import { test } from '../../assert'; const tick = () => Promise.resolve(); export default test({ async test({ assert, target }) { target.innerHTML = '<my-app/>'; await tick(); await tick(); /** @type {any} */ const el = target.querySelector('my-app'); target.removeChild(el); await tick(); assert.ok(target.dataset.onMountDestroyed); assert.ok(target.dataset.destroyed); } }); ```
```c++ // -*- C++ -*- // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // Foundation; either version 2, or (at your option) any later // version. // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // along with this library; see the file COPYING. If not, write to // the Free Software Foundation, 59 Temple Place - Suite 330, Boston, // MA 02111-1307, USA. // As a special exception, you may use this file as part of a free // software library without restriction. Specifically, if other files // instantiate templates or use macros or inline functions from this // file, or you compile this file and link it with other files to // produce an executable, this file does not by itself cause the // resulting executable to be covered by the GNU General Public // reasons why the executable file might be covered by the GNU General // Permission to use, copy, modify, sell, and distribute this software // is hereby granted without fee, provided that the above copyright // notice appears in all copies, and that both that copyright notice // and this permission notice appear in supporting documentation. None // of the above authors, nor IBM Haifa Research Laboratories, make any // representation about the suitability of this software for any // purpose. It is provided "as is" without express or implied // warranty. /** * @file const_point_iterator.hpp * Contains an iterator class returned by the table's const find and insert * methods. */ #ifndef PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_CONST_FIND_ITERATOR_HPP #define PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_CONST_FIND_ITERATOR_HPP #include <ext/pb_ds/tag_and_trait.hpp> #include <debug/debug.h> namespace pb_ds { namespace detail { #define PB_DS_CLASS_T_DEC \ template<typename Node, class Allocator> #define PB_DS_CLASS_C_DEC \ left_child_next_sibling_heap_node_const_point_iterator_<Node, Allocator> // Const point-type iterator. template<typename Node, class Allocator> class left_child_next_sibling_heap_node_const_point_iterator_ { protected: typedef typename Allocator::template rebind<Node>::other::pointer node_pointer; public: // Category. typedef trivial_iterator_tag iterator_category; // Difference type. typedef trivial_iterator_difference_type difference_type; // Iterator's value type. typedef typename Node::value_type value_type; // Iterator's pointer type. typedef typename Allocator::template rebind< value_type>::other::pointer pointer; // Iterator's const pointer type. typedef typename Allocator::template rebind< value_type>::other::const_pointer const_pointer; // Iterator's reference type. typedef typename Allocator::template rebind< value_type>::other::reference reference; // Iterator's const reference type. typedef typename Allocator::template rebind< value_type>::other::const_reference const_reference; public: inline left_child_next_sibling_heap_node_const_point_iterator_(node_pointer p_nd) : m_p_nd(p_nd) { } // Default constructor. inline left_child_next_sibling_heap_node_const_point_iterator_() : m_p_nd(NULL) { } // Copy constructor. inline left_child_next_sibling_heap_node_const_point_iterator_(const PB_DS_CLASS_C_DEC& other) : m_p_nd(other.m_p_nd) { } // Access. inline const_pointer operator->() const { _GLIBCXX_DEBUG_ASSERT(m_p_nd != NULL); return &m_p_nd->m_value; } // Access. inline const_reference operator*() const { _GLIBCXX_DEBUG_ASSERT(m_p_nd != NULL); return m_p_nd->m_value; } // Compares content to a different iterator object. inline bool operator==(const PB_DS_CLASS_C_DEC& other) const { return m_p_nd == other.m_p_nd; } // Compares content (negatively) to a different iterator object. inline bool operator!=(const PB_DS_CLASS_C_DEC& other) const { return m_p_nd != other.m_p_nd; } public: node_pointer m_p_nd; }; #undef PB_DS_CLASS_T_DEC #undef PB_DS_CLASS_C_DEC } // namespace detail } // namespace pb_ds #endif ```
```go // +build linux,cgo,!libdm_no_deferred_remove package devicemapper /* #cgo LDFLAGS: -L. -ldevmapper #include <libdevmapper.h> */ import "C" // LibraryDeferredRemovalSupport is supported when statically linked. const LibraryDeferredRemovalSupport = true func dmTaskDeferredRemoveFct(task *cdmTask) int { return int(C.dm_task_deferred_remove((*C.struct_dm_task)(task))) } func dmTaskGetInfoWithDeferredFct(task *cdmTask, info *Info) int { Cinfo := C.struct_dm_info{} defer func() { info.Exists = int(Cinfo.exists) info.Suspended = int(Cinfo.suspended) info.LiveTable = int(Cinfo.live_table) info.InactiveTable = int(Cinfo.inactive_table) info.OpenCount = int32(Cinfo.open_count) info.EventNr = uint32(Cinfo.event_nr) info.Major = uint32(Cinfo.major) info.Minor = uint32(Cinfo.minor) info.ReadOnly = int(Cinfo.read_only) info.TargetCount = int32(Cinfo.target_count) info.DeferredRemove = int(Cinfo.deferred_remove) }() return int(C.dm_task_get_info((*C.struct_dm_task)(task), &Cinfo)) } ```
```javascript OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : " \"config\" ", "This can usually be fixed by giving the web server write access to the config directory." : " \"config\" ", "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : " config.php config_is_read_only true", "See %s" : " %s", "Application %1$s is not present or has a non-compatible version with this server. Please check the apps directory." : " %1$s ", "Sample configuration detected" : "", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : " config.php ", "The page could not be found on the server." : "", "%s email verification" : "%s ", "Email verification" : "", "Click the following button to confirm your email." : "", "Click the following link to confirm your email." : "", "Confirm your email" : "", "Other activities" : "", "%1$s and %2$s" : "%1$s %2$s", "%1$s, %2$s and %3$s" : "%1$s%2$s %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s%2$s%3$s %4$s", "%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s%2$s%3$s%4$s %5$s", "Education bundle" : "", "Enterprise bundle" : "", "Groupware bundle" : "", "Hub bundle" : "", "Public sector bundle" : "", "Social sharing bundle" : "", "PHP %s or higher is required." : " PHP %s ", "PHP with a version lower than %s is required." : " PHP %s ", "%sbit or higher PHP required." : "%s php", "The following architectures are supported: %s" : "%s", "The following databases are supported: %s" : "%s", "The command line tool %s could not be found" : " %s", "The library %s is not available." : " %s ", "Library %1$s with a version higher than %2$s is required - available version %3$s." : " %2$s %1$s %3$s", "Library %1$s with a version lower than %2$s is required - available version %3$s." : " %2$s %1$s %3$s", "The following platforms are supported: %s" : "%s", "Server version %s or higher is required." : " %s ", "Server version %s or lower is required." : " %s ", "Logged in account must be an admin, a sub admin or gotten special right to access this setting" : "", "Your current IP address doesnt allow you to perform admin actions" : " IP ", "Logged in account must be an admin or sub admin" : "", "Logged in account must be an admin" : "", "Wiping of device %s has started" : " %s ", "Wiping of device %s has started" : "%s", "%s started remote wipe" : "%s", "Device or application %s has started the remote wipe process. You will receive another email once the process has finished" : "%s", "Wiping of device %s has finished" : " %s ", "Wiping of device %s has finished" : "%s", "%s finished remote wipe" : "%s", "Device or application %s has finished the remote wipe process." : "%s", "Remote wipe started" : "", "A remote wipe was started on device %s" : " %s ", "Remote wipe finished" : "", "The remote wipe on %s has finished" : "%s ", "Authentication" : "", "Unknown filetype" : "", "Invalid image" : "", "Avatar image is not square" : "", "Files" : "", "View profile" : "", "Local time: %s" : "%s", "today" : "", "tomorrow" : "", "yesterday" : "", "_in %n day_::_in %n days_" : [" %n "], "_%n day ago_::_%n days ago_" : ["%n "], "next month" : "", "last month" : "", "_in %n month_::_in %n months_" : [" %n "], "_%n month ago_::_%n months ago_" : ["%n "], "next year" : "", "last year" : "", "_in %n year_::_in %n years_" : ["%n "], "_%n year ago_::_%n years ago_" : ["%n "], "_in %n hour_::_in %n hours_" : ["%n "], "_%n hour ago_::_%n hours ago_" : ["%n "], "_in %n minute_::_in %n minutes_" : ["%n "], "_%n minute ago_::_%n minutes ago_" : ["%n "], "in a few seconds" : "", "seconds ago" : "", "Empty file" : "", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : " %s ", "Dot files are not allowed" : "", "Invalid character \"%1$s\" in filename" : "%1$s", "Invalid filename extension \"%1$s\"" : "%1$s", "File already exists" : "", "Invalid path" : "", "Failed to create file from template" : "", "Templates" : "", "Path contains invalid segments" : "", "File name is a reserved word" : "", "File name contains at least one invalid character" : "", "File name is too long" : "", "Empty filename is not allowed" : "", "App \"%s\" cannot be installed because appinfo file cannot be read." : " \"%s\" appinfo ", "App \"%s\" cannot be installed because it is not compatible with this version of the server." : " \"%s\" ", "__language_name__" : "", "This is an automatically sent email, please do not reply." : "", "Help & privacy" : "", "Appearance and accessibility" : "", "Apps" : "", "Personal settings" : "", "Administration settings" : "", "Settings" : "", "Log out" : "", "Accounts" : "", "Email" : "", "Mail %s" : " %s", "Fediverse" : "Fediverse", "View %s on the fediverse" : " fediverse %s", "Phone" : "", "Call %s" : " %s", "Twitter" : "Twitter", "View %s on Twitter" : " Twitter %s", "Website" : "", "Visit %s" : " %s", "Address" : "", "Profile picture" : "", "About" : "", "Display name" : "", "Headline" : "", "Organisation" : "", "Role" : "", "Unknown account" : "", "Additional settings" : "", "Enter the database Login and name for %s" : " %s ", "Enter the database Login for %s" : " %s ", "Enter the database name for %s" : " %s ", "You cannot use dots in the database name %s" : " %s ", "MySQL Login and/or password not valid" : "MySQL ", "You need to enter details of an existing account." : "", "Oracle connection could not be established" : " Oracle ", "Oracle Login and/or password not valid" : "Oracle ", "PostgreSQL Login and/or password not valid" : "PostgreSQL ", "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : " Mac OS X %s ", "For the best results, please consider using a GNU/Linux server instead." : " GNU/Linux ", "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : " %s 32 PHP php.ini open_basedir 4GB ", "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : " php.ini open_basedir 64 PHP", "Set an admin Login." : "", "Set an admin password." : "", "Cannot create or write into the data directory %s" : " %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : " %s OCP\\Share_Backend ", "Sharing backend %s not found" : " %s", "Sharing backend for %s not found" : " %s ", "%1$s shared %2$s with you" : "%1$s %2$s", "%1$s shared %2$s with you." : "%1$s %2$s", "Click the button below to open it." : "", "Open %s" : " %s", "%1$s via %2$s" : "%1$s %2$s", "%1$s shared %2$s with you and wants to add:" : "%1$s %2$s ", "%1$s shared %2$s with you and wants to add" : "%1$s %2$s ", "%s added a note to a file shared with you" : "%s ", "You are not allowed to share %s" : " %s", "Cannot increase permissions of %s" : " %s ", "Files cannot be shared with delete permissions" : "", "Files cannot be shared with create permissions" : "", "Expiration date is in the past" : "", "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : [" %n "], "Sharing is only allowed with group members" : "", "Sharing %s failed, because this item is already shared with the account %s" : " %s %s ", "The requested share does not exist anymore" : "", "The requested share comes from a disabled user" : "", "The user was not created because the user limit has been reached. Check your notifications to learn more." : "", "Could not find category \"%s\"" : "\"%s\"", "Input text" : "", "The input text" : "", "Sunday" : "", "Monday" : "", "Tuesday" : "", "Wednesday" : "", "Thursday" : "", "Friday" : "", "Saturday" : "", "Sun." : "", "Mon." : "", "Tue." : "", "Wed." : "", "Thu." : "", "Fri." : "", "Sat." : "", "Su" : "", "Mo" : "", "Tu" : "", "We" : "", "Th" : "", "Fr" : "", "Sa" : "", "January" : "", "February" : "", "March" : "", "April" : "", "May" : "", "June" : "", "July" : "", "August" : "", "September" : "", "October" : "", "November" : "", "December" : "", "Jan." : "", "Feb." : "", "Mar." : "", "Apr." : "", "May." : "", "Jun." : "", "Jul." : "", "Aug." : "", "Sep." : "", "Oct." : "", "Nov." : "", "Dec." : "", "A valid password must be provided" : "", "The Login is already being used" : "", "Could not create account" : "", "Only the following characters are allowed in an Login: \"a-z\", \"A-Z\", \"0-9\", spaces and \"_.@-'\"" : "\"a-z\"\"A-Z\"\"0-9\" \"_.@-'\"", "A valid Login must be provided" : "", "Login contains whitespace at the beginning or at the end" : "", "Login must not consist of dots only" : "", "Login is invalid because files already exist for this user" : "", "Account disabled" : "", "Login canceled by app" : "", "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : " \"%1$s\" %2$s", "a safe home for all your data" : "", "File is currently busy, please try again later" : "", "Cannot download file" : "", "Application is not enabled" : "", "Authentication error" : "", "Token expired. Please reload page." : "Token ", "No database drivers (sqlite, mysql, or postgresql) installed." : "sqlite mysql postgresql", "Cannot write into \"config\" directory." : " \"config\" ", "This can usually be fixed by giving the web server write access to the config directory. See %s" : " \"config\" %s", "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : " config.php \"config_is_read_only\" true%s", "Cannot write into \"apps\" directory." : " \"apps\" ", "This can usually be fixed by giving the web server write access to the apps directory or disabling the App Store in the config file." : " App Store ", "Cannot create \"data\" directory." : " \"data\" ", "This can usually be fixed by giving the web server write access to the root directory. See %s" : " %s", "Permissions can usually be fixed by giving the web server write access to the root directory. See %s." : " %s", "Your data directory is not writable." : "", "Setting locale to %s failed." : " %s ", "Please install one of these locales on your system and restart your web server." : "", "PHP module %s not installed." : " PHP %s", "Please ask your server administrator to install the module." : "", "PHP setting \"%s\" is not set to \"%s\"." : "PHP \"%s\" \"%s\"", "Adjusting this setting in php.ini will make Nextcloud run again" : " php.ini Nextcloud ", "<code>mbstring.func_overload</code> is set to <code>%s</code> instead of the expected value <code>0</code>." : "<code>mbstring.func_overload</code> <code>0</code> <code>%s</code>", "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini." : " php.ini <code>mbstring.func_overload</code> <code>0</code>", "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP inline doc block", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : " Zend OPcache eAccelerator ", "PHP modules have been installed, but they are still listed as missing?" : " PHP ", "Please ask your server administrator to restart the web server." : "", "The required %s config variable is not configured in the config.php file." : " %s config.php ", "Please ask your server administrator to check the Nextcloud configuration." : " Nextcloud ", "Your data directory is readable by other people." : " data ", "Please change the permissions to 0770 so that the directory cannot be listed by other people." : " 0770 ", "Your data directory must be an absolute path." : "", "Check the value of \"datadirectory\" in your configuration." : " \"datadirectory\" ", "Your data directory is invalid." : "", "Ensure there is a file called \"%1$s\" in the root of the data directory. It should have the content: \"%2$s\"" : "%1$s%2$s", "Action \"%s\" not supported or implemented." : " \"%s\" ", "Authentication failed, wrong token or provider ID given" : " token provider ID", "Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : " \"%s\"", "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : "ID \"%1$s\" \"%2$s\" ", "Cloud Federation Provider with ID: \"%s\" does not exist." : "ID %s Cloud Federation Provider", "Could not obtain lock type %d on \"%s\"." : " %d %s", "Storage unauthorized. %s" : "%s", "Storage incomplete configuration. %s" : "%s", "Storage connection error. %s" : "%s", "Storage is temporarily not available" : "", "Storage connection timeout. %s" : "%s", "Transcribe audio" : "", "Transcribe the things said in an audio" : "", "Audio input" : "", "The audio to transcribe" : "", "Transcription" : "", "The transcribed text" : "", "ContextWrite" : "ContextWrite", "Writes text in a given style based on the provided source material." : "", "Writing style" : "", "Demonstrate a writing style that you would like to immitate" : "", "Source material" : "", "The content that would like to be rewritten in the new writing style" : "", "Generated text" : "", "The generated text with content from the source material in the given style" : "", "Emoji generator" : "", "Takes text and generates a representative emoji for it." : "", "The text to generate an emoji for" : "", "Generated emoji" : "", "The generated emoji based on the input text" : "", "Generate image" : "", "Generate an image from a text prompt" : "", "Prompt" : "", "Describe the image you want to generate" : "", "Number of images" : "", "How many images to generate" : "", "Output images" : "", "The generated images" : "", "Free text to text prompt" : "", "Runs an arbitrary prompt through a language model that returns a reply" : "", "Describe a task that you want the assistant to do or ask a question" : "", "Generated reply" : "", "The generated text from the assistant" : "", "Chat" : "", "Chat with the assistant" : "", "System prompt" : "", "Define rules and assumptions that the assistant should follow during the conversation." : "", "Chat message" : "", "Chat history" : "", "The history of chat messages before the current message, starting with a message by the user" : "", "Response message" : "", "The generated response as part of the conversation" : "", "Formalize text" : "", "Takes a text and makes it sound more formal" : "", "Write a text that you want the assistant to formalize" : "", "Formalized text" : "", "The formalized text" : "", "Generate a headline" : "", "Generates a possible headline for a text." : "", "Original text" : "", "The original text to generate a headline for" : "", "The generated headline" : "", "Reformulate text" : "", "Takes a text and reformulates it" : "", "Write a text that you want the assistant to reformulate" : "", "Reformulated text" : "", "The reformulated text, written by the assistant" : "", "Simplify text" : "", "Takes a text and simplifies it" : "", "Write a text that you want the assistant to simplify" : "", "Simplified text" : "", "The simplified text" : "", "Summarize" : "", "Summarizes a text" : "", "The original text to summarize" : "", "Summary" : "", "The generated summary" : "", "Extract topics" : "", "Extracts topics from a text and outputs them separated by commas" : "", "The original text to extract topics from" : "", "Topics" : "", "The list of extracted topics" : "", "Translate" : "", "Translate text from one language to another" : "", "Origin text" : "", "The text to translate" : "", "Origin language" : "", "The language of the origin text" : "", "Target language" : "", "The desired language to translate the origin text in" : "", "Result" : "", "The translated text" : "", "Free prompt" : "", "Runs an arbitrary prompt through the language model." : "", "Generate headline" : "", "Summarizes text by reducing its length without losing key information." : "", "Extracts topics from a text and outputs them separated by commas." : "", "Education Edition" : "", "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "", "Logged in user must be an admin or sub admin" : "", "Logged in user must be an admin" : "", "Help" : "", "Users" : "", "Unknown user" : "", "Enter the database username and name for %s" : " %s ", "Enter the database username for %s" : " %s ", "MySQL username and/or password not valid" : "MySQL ", "Oracle username and/or password not valid" : "Oracle /", "PostgreSQL username and/or password not valid" : "PostgreSQL /", "Set an admin username." : "", "Sharing %s failed, because this item is already shared with user %s" : " %s %s ", "The username is already being used" : "", "Could not create user" : "", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", spaces and \"_.@-'\"" : "\"a-z\" \"A-Z\" \"0-9\" \"_.@-'\"", "A valid username must be provided" : "", "Username contains whitespace at the beginning or at the end" : "", "Username must not consist of dots only" : "", "Username is invalid because files already exist for this user" : "", "User disabled" : "", "Your data directory is readable by other users." : "", "Please change the permissions to 0770 so that the directory cannot be listed by other users." : " 0770 ", "Ensure there is a file called \".ocdata\" in the root of the data directory." : " \"ocdata\" " }, "nplurals=1; plural=0;"); ```
```go package errors // ErrorChain is a linked list of error pointers that point to a parent above and a child below. type ErrorChain struct { // Head of the linked list head error // Next node in the linked list next error // tail node in the linked list tail error } // Tail is the end of the linked list func (e *ErrorChain) Tail() error { return e.tail } // Head is the start of the linked list func (e *ErrorChain) Head() error { return e.head } // Next is the next node in the linked list func (e *ErrorChain) Next() error { return e.next } // Error returns the error string of the tail of the linked list func (e *ErrorChain) Error() string { return Cause(e).Error() } type errLinkedList interface { Head() error Next() error Tail() error } var _ errLinkedList = &ErrorChain{} ```
```shell Revision control of configuration files with git Force a time update with `ntp` Changing the `/tmp` cleanup frequency Check the HDD with `badblocks` Basic service management with `systemd` ```
Dr. Ming-Huey Kao () served as the International Commissioner of the Boy Scouts of China. In 1987, Kao was awarded the 188th Bronze Wolf, the only distinction of the World Organization of the Scout Movement, awarded by the World Scout Committee for exceptional services to world Scouting. References External links Recipients of the Bronze Wolf Award Year of birth missing Scouting in Taiwan
```xml import React from 'react' import { getWorkspaceShowPageData } from '../../../api/pages/teams/workspaces' import { GetInitialPropsParameters } from '../../../interfaces/pages' import WorkspacePage from '../../../components/WorkspacePage' import { getTeamIndexPageData } from '../../../api/pages/teams' import { parse as parseQuery } from 'querystring' const WorkspaceShowPage = ({ pageWorkspace }: any) => { return <WorkspacePage workspace={pageWorkspace} /> } WorkspaceShowPage.getInitialProps = async ( params: GetInitialPropsParameters ) => { const result = await getWorkspaceShowPageData(params) return result } WorkspaceShowPage.getInitialProps = ( (prev: { value: string | null }) => async (params: GetInitialPropsParameters) => { const [, teamId] = params.pathname.split('/') const [result, teamData] = await Promise.all([ getWorkspaceShowPageData(params), prev.value != teamId ? getTeamIndexPageData(params) : Promise.resolve({ merge: true, } as any), ]) prev.value = teamId const query = parseQuery(params.search.slice(1)) return { ...teamData, ...result, thread: query.thread } } )({ value: null }) export default WorkspaceShowPage ```
Devario affinis is a freshwater cyprinid fish found in India, which grows up to in length. References External links Devario affinis Devario Fish described in 1860 Taxa named by Edward Blyth
```c++ // log-filter.cpp // compile with: /EHsc #include <windows.h> #include <agents.h> #include <sstream> #include <fstream> #include <iostream> using namespace concurrency; using namespace std; // A synchronization primitive that is signaled when its // count reaches zero. class countdown_event { public: countdown_event(unsigned int count = 0L) : _current(static_cast<long>(count)) { // Set the event if the initial count is zero. if (_current == 0L) { _event.set(); } } // Decrements the event counter. void signal() { if(InterlockedDecrement(&_current) == 0L) { _event.set(); } } // Increments the event counter. void add_count() { if(InterlockedIncrement(&_current) == 1L) { _event.reset(); } } // Blocks the current context until the event is set. void wait() { _event.wait(); } private: // The current count. volatile long _current; // The event that is set when the counter reaches zero. event _event; // Disable copy constructor. countdown_event(const countdown_event&); // Disable assignment. countdown_event const & operator=(countdown_event const&); }; // Defines message types for the logger. enum log_message_type { log_info = 0x1, log_warning = 0x2, log_error = 0x4, }; // An asynchronous logging agent that writes log messages to // file and to the console. class log_agent : public agent { // Holds a message string and its logging type. struct log_message { wstring message; log_message_type type; }; public: log_agent(const wstring& file_path, log_message_type file_messages, log_message_type console_messages) : _file(file_path) , _file_messages(file_messages) , _console_messages(console_messages) , _active(0) { if (_file.bad()) { throw invalid_argument("Unable to open log file."); } } // Writes the provided message to the log. void log(const wstring& message, log_message_type type) { // Increment the active message count. _active.add_count(); // Send the message to the network. log_message msg = { message, type }; send(_log_buffer, msg); } void close() { // Signal that the agent is now closed. _closed.set(); } protected: void run() { // // Create the dataflow network. // // Writes a log message to file. call<log_message> writer([this](log_message msg) { if ((msg.type & _file_messages) != 0) { // Write the message to the file. write_to_stream(msg, _file); } if ((msg.type & _console_messages) != 0) { // Write the message to the console. write_to_stream(msg, wcout); } // Decrement the active counter. _active.signal(); }); // Connect _log_buffer to the internal network to begin data flow. _log_buffer.link_target(&writer); // Wait for the closed event to be signaled. _closed.wait(); // Wait for all messages to be processed. _active.wait(); // Close the log file and flush the console. _file.close(); wcout.flush(); // Set the agent to the completed state. done(); } private: // Writes a logging message to the specified output stream. void write_to_stream(const log_message& msg, wostream& stream) { // Write the message to the stream. wstringstream ss; switch (msg.type) { case log_info: ss << L"info: "; break; case log_warning: ss << L"warning: "; break; case log_error: ss << L"error: "; } ss << msg.message << endl; stream << ss.str(); } private: // The file stream to write messages to. wofstream _file; // The log message types that are written to file. log_message_type _file_messages; // The log message types that are written to the console. log_message_type _console_messages; // The head of the network. Propagates logging messages // to the rest of the network. unbounded_buffer<log_message> _log_buffer; // Counts the number of active messages in the network. countdown_event _active; // Signals that the agent has been closed. event _closed; }; int wmain() { // Union of all log message types. log_message_type log_all = log_message_type(log_info | log_warning | log_error); // Create a logging agent that writes all log messages to file and error // messages to the console. log_agent logger(L"log.txt", log_all, log_error); // Start the agent. logger.start(); // Log a few messages. logger.log(L"===Logging started.===", log_info); logger.log(L"This is a sample warning message.", log_warning); logger.log(L"This is a sample error message.", log_error); logger.log(L"===Logging finished.===", log_info); // Close the logger and wait for the agent to finish. logger.close(); agent::wait(&logger); } ```
```c++ /// Source : path_to_url /// Author : liuyubobobo /// Time : 2023-05-13 #include <iostream> #include <vector> #include <map> #include <algorithm> using namespace std; /// Ad-Hoc /// Time Complexity: O(nlogn) /// Space Complexity: O(n) class Solution { public: vector<int> rearrangeBarcodes(vector<int>& barcodes) { int n = barcodes.size(); map<int, int> f; for(int barcode : barcodes) f[barcode]++; vector<pair<int, int>> v; for(const pair<int, int>& p: f) v.push_back(p); sort(v.begin(), v.end(), [](const pair<int, int>& a, const pair<int, int>& b) { return a.second < b.second; }); vector<int> res(n); for(int i = 0; i < n; i += 2){ res[i] = v.back().first; v.back().second --; if(v.back().second == 0) v.pop_back(); } for(int i = 1; i < n; i += 2){ res[i] = v.back().first; v.back().second --; if(v.back().second == 0) v.pop_back(); } return res; } }; int main() { return 0; } ```
"True Love Ways" is a song attributed to Norman Petty and Buddy Holly. Buddy Holly's original was recorded with the Dick Jacobs Orchestra in October 1958, four months before the singer's death. It was first released on the posthumous album The Buddy Holly Story, Vol. 2 (Coral 57326/757326), in March 1960. The song was first released as a single in Britain in May 1960, reaching number 25 on the UK Singles Chart. It was released the following month in the US, but did not make the charts. In 1988, a UK re-release of the recording by MCA, the single reached no. 65 on the UK singles chart in a 5 week chart run. In 1965, Peter and Gordon's version became a hit internationally, reaching number 2 in the UK, number 14 in the US Billboard Hot 100 and the top 10 in numerous other countries. Other notable covers include Mickey Gilley's 1980 version which reached number 1 on the US Billboard Hot Country Singles chart and Cliff Richard's version that reached the top 10 in the UK and Ireland in 1983 and was a minor hit internationally. Buddy Holly original Background and Recording The song was recorded at Holly's last recording session before his death on February 3, 1959. The session took place at the Pythian Temple on October 21, 1958 and also included the recordings of "It Doesn't Matter Anymore", "Raining in My Heart", and "Moondreams". In the extended version of the song, in the first ten seconds Holly can be heard preparing to sing. The audio starts with audio saying "Yeah, we're rolling." A piano player and a tenor saxophone player play some notes, and Holly mutters, "Okay," and clears his throat. The producer yells, "Quiet, boys!" to everyone else in the room, and at the end of the talkback, the producer says, "Pitch, Ernie", to signal the piano player to give Holly his starting note, a B-flat. Holly biographer Bill Griggs points out that the melody borrows heavily from the gospel song "I'll Be All Right," a favorite of Holly's, and one that would be played at his funeral in 1959. According to Griggs, the framework of the melody was written by Buddy, with the remainder, and lyrics, added by Petty. Holly's widow, Maria Elena Holly, claimed that the song was written for her as a wedding gift. On April 29, 2011, Mrs. Holly unveiled the never-before-seen "True Love Ways" photo of their wedding kiss, now displayed at P.J. Clarke's above Table 53, the table where they became engaged while on their first date, on June 20, 1958. A listing of producer Norman Petty's productions claims that Vi Petty, Norman's wife, recorded the first version of this song on June 4, 1958—two weeks prior to Buddy's engagement with Maria. However, only white label promotional copies were pressed (in July). Personnel Al Caiola – guitar Sanford Block – bass Ernie Hayes – piano Doris Johnson – harp Abraham Richman – saxophone Clifford Leeman – drums Sylvan Shulman, Leo Kruczek, Leonard Posner, Irving Spice, Ray Free, Herbert Bourne, Julius Held and Paul Winter – violins David Schwartz, Howard Kay – violas Maurice Brown, Maurice Bialkin – cellos Releases UK: "True Love Ways" b/w "Moondreams" (Coral Q72397, 20 May 1960). USA: "True Love Ways" b/w "That Makes It Tough" (Coral C62210, June 29, 1960). Two compilation albums by Buddy Holly have used the title of the song. The 1989 Telstar album reached no. 8 on the UK album chart. The 2018 Decca album with the Royal Philharmonic Orchestra reached no. 10 on the UK album chart. Chart performance Peter and Gordon version British pop duo, Peter and Gordon, released their version in 1965. It reached number 2 in the UK Singles Chart and is the only version of the song to have made the Top 40 of the US singles charts, reaching number 14 on the Billboard Hot 100 chart in June 1965 during the British Invasion era. Cash Box described it as "a pretty, lyrical emotion-packed reading of the Buddy Holly-penned oldie." Chart performance Note, Canadian chart weeks following the song's climb up to number 3 on the Canadian chart are missing in the archive, so the song may have climbed higher. Mickey Gilley version Mickey Gilley, country singer, released a successful cover version in 1980 (during the height of his popularity). Gilley's version reached the No. 1 spot on the Billboard magazine Hot Country Singles chart in July 1980. Chart performance Year-end charts Cliff Richard version British pop singer Cliff Richard released his cover as the lead single from his Dressed for the Occasion album in April 1983. The recording is of a live performance at the Royal Albert Hall in 1982 with the London Philharmonic Orchestra. Richard's version reached No. 8 on the UK Singles Chart and was a hit in several other countries. Chart performance Other notable versions Vi Petty, wife of co-writer Norman Petty, and pianist on many Petty productions, is believed to have recorded the first version in June 1958, with, initially, only limited promotional pressings made. Dick Rivers, a French singer, recorded a French adaptation, "Ne pleure pas" (1965). It reached number 19 in Belgium's Wallonia (French) charts and 43 in France. David Essex and Catherine Zeta-Jones recorded a duet for Essex's 1994 album Back to Back. The single reached no. 38 on the UK singles chart. Ricky Nelson recorded the song in 1985, five days before his death in a plane crash. It was his last recording before his death, although the recording remains unreleased. However, an earlier recording from 1978 is widely available. Popular culture The Never Say No to Panda series of commercials for the product Panda Cheese, from the Egyptian company Arab Dairy, uses the Buddy Holly & The Picks version of the song as the theme tune of its unpredictable and destructive panda mascot. The commercials featuring the song became an instant hit on the internet and become an internet meme. References 1958 songs 1960 singles 1980 singles Buddy Holly songs Bobby Vee songs Peter and Gordon songs Mickey Gilley songs Cliff Richard songs Johnny Mathis songs David Essex songs The Mavericks songs Martina McBride songs Jackson Browne songs Songs written by Buddy Holly Songs written by Norman Petty Song recordings produced by Jim Ed Norman Songs released posthumously Epic Records singles Coral Records singles EMI Records singles 1950s ballads
Genista tinctoria, the dyer's greenweed or dyer's broom, is a species of flowering plant in the family Fabaceae. Its other common names include dyer's whin, waxen woad and waxen wood. The Latin specific epithet tinctoria means "used as a dye". Description It is a variable deciduous shrub growing to tall by wide, the stems woody, slightly hairy, and branched. The alternate, nearly sessile leaves are glabrous and lanceolate. Golden yellow pea-like flowers are borne in erect narrow racemes from spring to early summer. The fruit is a long, shiny pod shaped like a green bean pod. Distribution and habitat This species is native to meadows and pastures in Europe and Turkey. Properties and uses Numerous cultivars have been selected for garden use, of which 'Royal Gold' has gained the Royal Horticultural Society's Award of Garden Merit. The plant, as its Latin and common names suggest, has been used from ancient times for producing a yellow dye, which combined with woad also provides a green colour. It was from this plant that the isoflavone genistein was first isolated in 1899; hence the name of the chemical compound. The medicinal parts are the flowering twigs. The plant has been used in popular medicine and herbalism for various complaints, including skin diseases, even in modern times. Gallery References External links tinctoria Flora of Europe Flora of the Northeastern United States Medicinal plants of Asia Medicinal plants of Europe Plant dyes Plants described in 1753 Taxa named by Carl Linnaeus Flora without expected TNC conservation status
```c /* * * This file is part of MooseFS. * * MooseFS is free software; you can redistribute it and/or modify * the Free Software Foundation, version 2 (only). * * MooseFS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * along with MooseFS; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA * or visit path_to_url */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> #include <string.h> #include <stdlib.h> #include <errno.h> #ifdef WIN32 #include "portable.h" #else #include <syslog.h> #endif #include "cfg.h" #include "massert.h" #include "strerr.h" #ifdef WIN32 #include <stdarg.h> static inline void mfs_arg_syslog(uint8_t level,const char *format,...) { va_list args; va_start(args, format); vprintf(format, args); va_end(args); printf("\n"); } #else #include "slogger.h" #endif typedef struct paramsstr { char *name; char *value; struct paramsstr *next; } paramstr; static char *cfgfname; static paramstr *paramhead=NULL; static int logundefined=0; int cfg_reload (void) { FILE *fd; char linebuff[1000]; uint32_t nps,npe,vps,vpe,i; uint8_t found; paramstr *tmp; fd = fopen(cfgfname,"r"); if (fd==NULL) { if (errno==ENOENT) { mfs_arg_syslog(LOG_ERR,"main config file (%s) not found",cfgfname); } else { mfs_arg_syslog(LOG_ERR,"can't load main config file (%s), error: %s",cfgfname,strerr(errno)); } return 0; } while (paramhead!=NULL) { tmp = paramhead; paramhead = tmp->next; free(tmp->name); free(tmp->value); free(tmp); } while (fgets(linebuff,999,fd)!=NULL) { linebuff[999]=0; if (linebuff[0]=='#') { continue; } i = 0; while (linebuff[i]==' ' || linebuff[i]=='\t') i++; nps = i; while (linebuff[i]>32 && linebuff[i]<127 && linebuff[i]!='=') { i++; } npe = i; while (linebuff[i]==' ' || linebuff[i]=='\t') i++; if (linebuff[i]!='=' || npe==nps) { if (linebuff[i]>32) { mfs_arg_syslog(LOG_WARNING,"bad definition in config file '%s': %s",cfgfname,linebuff); } continue; } i++; while (linebuff[i]==' ' || linebuff[i]=='\t') i++; vps = i; while (linebuff[i]>=32) { i++; } while (i>vps && linebuff[i-1]==32) { i--; } vpe = i; while (linebuff[i]==' ' || linebuff[i]=='\t') i++; if (linebuff[i]!='\0' && linebuff[i]!='\r' && linebuff[i]!='\n' && linebuff[i]!='#') { mfs_arg_syslog(LOG_WARNING,"bad definition in config file '%s': %s",cfgfname,linebuff); continue; } linebuff[npe]=0; linebuff[vpe]=0; found = 0; for (tmp = paramhead ; tmp && found==0; tmp=tmp->next) { if (strcmp(tmp->name,linebuff+nps)==0) { free(tmp->value); tmp->value = (char*)malloc(vpe-vps+1); memcpy(tmp->value,linebuff+vps,vpe-vps+1); found = 1; } } if (found==0) { tmp = (paramstr*)malloc(sizeof(paramstr)); tmp->name = (char*)malloc(npe-nps+1); tmp->value = (char*)malloc(vpe-vps+1); memcpy(tmp->name,linebuff+nps,npe-nps+1); memcpy(tmp->value,linebuff+vps,vpe-vps+1); tmp->next = paramhead; paramhead = tmp; } } fclose(fd); return 1; } int cfg_load (const char *configfname,int _lu) { paramhead = NULL; logundefined = _lu; cfgfname = strdup(configfname); return cfg_reload(); } int cfg_isdefined(const char *name) { paramstr *_cfg_tmp; for (_cfg_tmp = paramhead ; _cfg_tmp ; _cfg_tmp=_cfg_tmp->next) { if (strcmp(name,_cfg_tmp->name)==0) { return 1; } } return 0; } void cfg_term(void) { paramstr *i,*in; for (i = paramhead ; i ; i = in) { in = i->next; free(i->value); free(i->name); free(i); } free(cfgfname); } #define STR_TO_int(x) return strtol(x,NULL,0) #define STR_TO_int32(x) return strtol(x,NULL,0) #define STR_TO_uint32(x) return strtoul(x,NULL,0) #define STR_TO_int64(x) return strtoll(x,NULL,0) #define STR_TO_uint64(x) return strtoull(x,NULL,0) #define STR_TO_double(x) return strtod(x,NULL) #define STR_TO_charptr(x) { \ char* _cfg_ret_tmp = strdup(x); \ passert(_cfg_ret_tmp); \ return _cfg_ret_tmp; \ } #define COPY_int(x) return x #define COPY_int32(x) return x #define COPY_uint32(x) return x #define COPY_int64(x) return x #define COPY_uint64(x) return x #define COPY_double(x) return x #define COPY_charptr(x) { \ char* _cfg_ret_tmp = strdup(x); \ passert(_cfg_ret_tmp); \ return _cfg_ret_tmp; \ } #define _CONFIG_GEN_FUNCTION(fname,type,convname,format) \ type cfg_get##fname(const char *name,const type def) { \ paramstr *_cfg_tmp; \ for (_cfg_tmp = paramhead ; _cfg_tmp ; _cfg_tmp=_cfg_tmp->next) { \ if (strcmp(name,_cfg_tmp->name)==0) { \ STR_TO_##convname(_cfg_tmp->value); \ } \ } \ if (logundefined) { \ mfs_arg_syslog(LOG_NOTICE,"config: using default value for option '%s' - '" format "'",name,def); \ } \ COPY_##convname(def); \ } _CONFIG_GEN_FUNCTION(str,char*,charptr,"%s") _CONFIG_GEN_FUNCTION(num,int,int,"%d") _CONFIG_GEN_FUNCTION(int8,int8_t,int32,"%"PRId8) _CONFIG_GEN_FUNCTION(uint8,uint8_t,uint32,"%"PRIu8) _CONFIG_GEN_FUNCTION(int16,int16_t,int32,"%"PRId16) _CONFIG_GEN_FUNCTION(uint16,uint16_t,uint32,"%"PRIu16) _CONFIG_GEN_FUNCTION(int32,int32_t,int32,"%"PRId32) _CONFIG_GEN_FUNCTION(uint32,uint32_t,uint32,"%"PRIu32) _CONFIG_GEN_FUNCTION(int64,int64_t,int64,"%"PRId64) _CONFIG_GEN_FUNCTION(uint64,uint64_t,uint64,"%"PRIu64) _CONFIG_GEN_FUNCTION(double,double,double,"%lf") ```
Jean Jay Macpherson (June 13, 1931 – March 21, 2012) was a Canadian lyric poet and scholar. The Encyclopædia Britannica calls her "a member of 'the mythopoeic school of poetry,' who expressed serious religious and philosophical themes in symbolic verse that was often lyrical or comic." Life Jay Macpherson was born in London, England, in 1931. She was brought to Newfoundland in 1940 as a 'war guest'. She took high school at Bishop Spencer College, St. John's, and Glebe Collegiate, Ottawa. In 1951 Macpherson received a BA from Carleton College (now Carleton University) in 1951, followed by a year at University College in London. She received a BLS from McGill University, and then completed her MA and PhD at Victoria College, University of Toronto, both supervised by professor and critic Northrop Frye. Macpherson published poetry in Contemporary Verse in 1949. Her first book was published in 1952. In 1954 Macpherson began her own small press, Emblem Books, which published her second volume, O Earth Return. Between 1954 and 1963, Emblem Books published eight chapbooks featuring the work of Canadian poets, including Dorothy Livesay, Alden Nowlan, and Al Purdy. Macpherson's two earlier volumes were incorporated into The Boatman (1957), a book which "gained her a considerable reputation. Dedicated to Northrop Frye and his wife, the collection reflects Frye's emphasis on the mythic and archetypal properties of poetry." The Boatman won the Governor General's Award in 1958. Macpherson taught English at Victoria College from 1957 until 1996. She became a Professor of English in 1974. Her 1982 book The Spirit of Solitude is "a highly regarded study of the elegiac and pastoral traditions from the 17th century onward." Jay Macpherson died on Mar 21, 2012. Writing Macpherson has been described "as a 'mythopoeic' poet – rooted in the teachings of Frye, the archetypes of Carl Jung, and the intensely conservative social vision of T.S. Eliot." Within her work, "recurring themes involve the creation, fall, flood, redemption and the apocalypse." Her interest is in "authentic myth", "the ones that have some imaginative force behind them." In technique, Macpherson has been placed "beside Margaret Avison, P. K. Page, Phyllis Webb, but especially Anne Hébert – particularly in the use of the Gothic and macabre themes and devices." The Boatman Macpherson's first major work, The Boatman (1957), "describes a world where redemption is still possible." Northrop Frye (to whom The Boatman was dedicated) called it the "one good book" of Canadian poetry for that year. He added: "There is little use looking for bad lines or lapses in taste: The Boatman is completely successful within the conventions it adopts, and anyone dissatisfied with the book must quarrel with the conventions. Among these are the use of a great variety of echoes, some of them direct quotations from other poems, and an interest in myth, both Biblical and Classical." The Boatman of the title "is Noah, but both Noah and the ark itself form an allegory for the artist and the artistic experience, the ark representing Jung's collective unconscious." "The creation is inside its creator, and the ark similarly attempts to explain to Noah ... that it is really inside him, as Eve was once inside Adam: When the four quarters shall Turn in and make one whole, Then I who wall your body, Which is to me a soul, Shall swim circled by you And cradled on your tide, Who was not even, not ever, Taken from your side. "As the ark expands into the flooded world, the body of the Biblical leviathan, and the order of nature, the design of the whole book begins to take shape. The Boatman begins with a poem called 'Ordinary People in the Last Days,' a wistful poem about an apocalypse that happens to everyone except the poet, and ends with a vision of a 'Fisherman' who ... catches 'myriad forms,' eats them, drinks the lake they are in, and is caught in his turn by God." Welcoming Disaster Macpherson's next major work, Welcoming Disaster (1974), "employs more complex forms to pursue its quest for meaning; the poems frequently succeed in maintaining imaginative contact with social reality while extending Macpherson's essential concern with psychological and metaphysical conditions." George Woodcock saw Welcoming Disaster and The Boatman as similar, even complementary: "They are narratives of journeys into spiritual day and night, disguised, no doubt, by all the devices of privacy, but nonetheless derived from true inner experiences." Margaret Atwood emphasized their differences: "If The Boatman is 'classical,' . . . then Welcoming Disaster is, by the same lights, 'romantic': more personal, more convoluted, darker and more grotesque, its rhythms more complex"<ref name=keith>W.J. Keith, "Jay Macpherson's Welcoming Disaster: a Reconsideration," Canadian Poetry: Studies/Documents/Reviews," No. 36 (Spring/Summer 1995), UWO, Web, Apr. 12, 2011.</ref> "Welcoming Disaster, has the critics baffled. They cannot agree on its proper interpretation - is it a darker, more tragic vision or is the possibility of redemption there?" Suniti Namjoshi saw it as a book about redemption: about the necessity "to hit bottom and then to make the journey up"; "after a descent into the underworld ... it is possible to return to the ordinary world of everyday life". David Bromwich, reviewing the book in Poetry, saw it as even more positive: for him, it "moves from consolation to guilt to terror and finally to a deepened consolation." On the other hand, Lorraine Weir interpreted the book to be saying that the "underworld journey of redemption ... fails". "Fertility is not restored, the underworld is not left behind." Weir calls Macpherson's vision "inescapably a tragic one." Recognition Macpherson won Poetry magazine's Levinson Prize, and the University of Western Ontario President's Medal, in 1957. She won the Governor General's Award for The Boatman in 1958. A small park in her former Toronto neighbourhood, Jay Macpherson Green, is named for her near Avenue Road and Dupont Street. Publications Poetry A Country Without a Mythology. n.p.: 195?. 1952:Nineteen Poems. Mallorca, Spain: Seizin Press 1954:O Earth Return. Toronto: Emblem Books 1957:The Fisherman: A Book of Riddles 1957:The Boatman. Toronto: Oxford University Press 1959:A Dry Light & The Dark Air. Toronto: Hawkshead Press 1968:The Boatman and Other Poems. Toronto: Oxford UP 1974:Welcoming Disaster: Poems, 1970-74. Toronto: Saannes Publications 1981:Poems Twice Told: The Boatman & Welcoming Disaster. Toronto: Oxford University Press Fiction 1962:The Four Ages of Man: The Classical Myths. Toronto: Macmillan Non-fiction 1972:Pratt’s Romantic Mythology: The Witches’ Brew. St. John's Nfld.: Memorial University 1974:"Beauty and the Beast" and Some Relatives. Toronto: Toronto Public Library 1982:The Spirit of Solitude: Conventions and Continuities in Late Romance. New Haven: Yale University PressExcept where otherwise noted, bibliographic information courtesy Brock University.References Monograph Weir, Lorraine. Jay Macpherson and Her Works Toronto: ECW Press, 1989. Articles Berner, Audrey. "The ‘Unicorn’ Poems of Jay Macpherson." Journal of Canadian Poetry 3 (1980): 9-16. "Comments (On the Practice of Alluding)." University of Toronto Quarterly 61.3 (1992): 381-390. Keith, W.J. "Jay Macpherson’s Welcoming Disaster: a Reconsideration." Canadian Poetry 36 (1995): 32-43. Weir, Lorraine. "Toward a Feminist Hermeneutics: Jay Macpherson's Welcoming Disaster," in Gynocritics/La Gynocritique - Feminist Approaches to Writing by Canadian and Quebecoise Women, ed. Barbara Godard (Toronto: ECW P, 1987) 59-70. Namjoshi, Suniti. "In the Whale’s Belly: Jay Macpherson’s Poetry." Canadian Literature 79 (1978): 54-59. Reaney, James. "The Third-Eye: Macpherson’s The Boatman." Canadian Literature'' 3 (1960): 23-34. Notes External links Biography and selected poetry of Jay Macpherson Jay Macpherson's entry in The Canadian Encyclopedia 1931 births 2012 deaths 20th-century Canadian poets Canadian women poets Alumni of University College London Anglo-Scots Canadian people of Scottish descent Canadian modernist poets English emigrants to Canada Governor General's Award-winning poets McGill University alumni Members of the United Church of Canada University of Toronto alumni Academic staff of the University of Toronto Poets from London Writers from Toronto 20th-century Canadian women writers
```java package com.ctrip.xpipe.redis.integratedtest.full.multidc; import com.ctrip.xpipe.redis.core.entity.RedisMeta; import com.ctrip.xpipe.redis.integratedtest.full.AbstractIntegratedTestTemplate; import org.junit.Before; import java.util.List; /** * @author wenchao.meng * * Jun 15, 2016 */ public abstract class AbstractMultiDcTest extends AbstractIntegratedTestTemplate{ @Before public void beforeAbstractMultiDcTest() throws Exception{ if(startAllDc()){ startXpipe(); sleep(6000); } } protected boolean startAllDc() { return true; } @Override protected List<RedisMeta> getRedisSlaves() { return getAllRedisSlaves(); } } ```
Nerdcore hiphop may refer to: Nerdcore hip hop, a musical genre Nerdcore Hiphop (album), a demo album by MC Frontalot, as well as a song on that album
```xml <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="path_to_url"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}</ProjectGuid> <Keyword>Win32Proj</Keyword> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <CharacterSet>MultiByte</CharacterSet> <PlatformToolset>v100</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <CharacterSet>MultiByte</CharacterSet> <PlatformToolset>v100</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <CharacterSet>MultiByte</CharacterSet> <PlatformToolset>v100</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <CharacterSet>MultiByte</CharacterSet> <PlatformToolset>v100</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(OutDir)$(ProjectName)\</IntDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)$(ProjectName)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <OutDir>$(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(OutDir)$(ProjectName)\</IntDir> <TargetName>gtestd</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <OutDir>$(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(OutDir)$(ProjectName)\</IntDir> <TargetName>gtest</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <TargetName>gtestd</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <TargetName>gtest</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <PrecompiledHeader> </PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>EditAndContinue</DebugInformationFormat> <AdditionalIncludeDirectories>..\..\include;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile> <Lib /> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <PrecompiledHeader> </PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <AdditionalIncludeDirectories>..\..\include;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile> <Lib /> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <PreprocessorDefinitions>WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <PrecompiledHeader> </PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <AdditionalIncludeDirectories>..\..\include;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile> <Lib /> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <PreprocessorDefinitions>WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <PrecompiledHeader> </PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <AdditionalIncludeDirectories>..\..\include;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile> <Lib /> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="..\..\src\gtest-all.cc"> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project> ```
```c /* * */ #include "esp_log.h" #include "nvs_flash.h" #include "esp_bt.h" #ifndef CONFIG_BT_LE_HCI_INTERFACE_USE_UART #error "Please Enable Uart for HCI" #endif #define TAG "BLE_HCI" void app_main(void) { esp_err_t ret; /* Initialize NVS it is used to store PHY calibration data */ ret = nvs_flash_init(); if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { ESP_ERROR_CHECK(nvs_flash_erase()); ret = nvs_flash_init(); } ESP_ERROR_CHECK(ret); esp_bt_controller_config_t config_opts = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); /* * Initialize Bluetooth Controller parameters. */ ESP_ERROR_CHECK(esp_bt_controller_init(&config_opts)); /* * Enable the task stack of the Bluetooth Controller. */ ESP_ERROR_CHECK(esp_bt_controller_enable(ESP_BT_MODE_BLE)); } ```
```smalltalk using System; namespace SkiaSharp.Tests { public class ManagedStream : SKAbstractManagedStream { protected override IntPtr OnRead (IntPtr buffer, IntPtr size) => (IntPtr)0; protected override IntPtr OnPeek (IntPtr buffer, IntPtr size) => (IntPtr)0; protected override bool OnIsAtEnd () => false; protected override bool OnHasPosition () => false; protected override bool OnHasLength () => false; protected override bool OnRewind () => false; protected override IntPtr OnGetPosition () => (IntPtr)0; protected override IntPtr OnGetLength () => (IntPtr)0; protected override bool OnSeek (IntPtr position) => false; protected override bool OnMove (int offset) => false; protected override IntPtr OnCreateNew () => IntPtr.Zero; } } ```
```java package org.opencv.core; //javadoc:Point3_ public class Point3 { public double x, y, z; public Point3(double x, double y, double z) { this.x = x; this.y = y; this.z = z; } public Point3() { this(0, 0, 0); } public Point3(Point p) { x = p.x; y = p.y; z = 0; } public Point3(double[] vals) { this(); set(vals); } public void set(double[] vals) { if (vals != null) { x = vals.length > 0 ? vals[0] : 0; y = vals.length > 1 ? vals[1] : 0; z = vals.length > 2 ? vals[2] : 0; } else { x = 0; y = 0; z = 0; } } public Point3 clone() { return new Point3(x, y, z); } public double dot(Point3 p) { return x * p.x + y * p.y + z * p.z; } public Point3 cross(Point3 p) { return new Point3(y * p.z - z * p.y, z * p.x - x * p.z, x * p.y - y * p.x); } @Override public int hashCode() { final int prime = 31; int result = 1; long temp; temp = Double.doubleToLongBits(x); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(y); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(z); result = prime * result + (int) (temp ^ (temp >>> 32)); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof Point3)) return false; Point3 it = (Point3) obj; return x == it.x && y == it.y && z == it.z; } @Override public String toString() { return "{" + x + ", " + y + ", " + z + "}"; } } ```
Deraz Geri (, also Romanized as Deraz Gerī; also known as Daraz Keri, Darzeh Kerī, and Derāz Kerī) is a village in Chubar Rural District, Haviq District, Talesh County, Gilan Province, Iran. At the 2006 census, its population was 292, in 66 families. References Populated places in Talesh County