text
stringlengths
1
22.8M
Moore's Crossing is an unincorporated community in Travis County, in the U.S. state of Texas. According to the Handbook of Texas, the community had a population of 25 in 2000. It is located within the Greater Austin metropolitan area. History The region was utilized as a low-water crossing of Onion Creek as early as the 1840s, but it wasn't until John B. Moore opened a store there that it got its current name. It was replaced in 1915 with a portion of the original Congress Avenue Bridge from Austin, but a flood destroyed it later that year. In 1922, it was rebuilt using the remaining portions of the Congress Avenue bridge. On county route maps from the 1940s, the village was marked by a few scathed buildings; 25 people were reportedly living there in 1941. The Moore's Crossing bridge, which includes a marker from the Texas Historical Commission, was shut down in the 1990s. Its population remained at 25 in 2000. The Moore's Crossing Historic District is located near the community. Geography Moore's Crossing is located on Farm to Market Road 973, southeast of Austin in southeastern Travis County. Education Today, the community is served by the Del Valle Independent School District. Schools that serve the community are Hillcrest Elementary School, Del Valle Middle School, and Del Valle High School. References Unincorporated communities in Travis County, Texas Unincorporated communities in Texas
```javascript // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; const common = require('../common'); const assert = require('assert'); const net = require('net'); const msg = 'test'; let stopped = true; let server1Sock; const server1ConnHandler = (socket) => { socket.on('data', function(data) { if (stopped) { assert.fail('data event should not have happened yet'); } assert.strictEqual(data.toString(), msg); socket.end(); server1.close(); }); server1Sock = socket; }; const server1 = net.createServer({ pauseOnConnect: true }, server1ConnHandler); const server2ConnHandler = (socket) => { socket.on('data', function(data) { assert.strictEqual(data.toString(), msg); socket.end(); server2.close(); assert.strictEqual(server1Sock.bytesRead, 0); server1Sock.resume(); stopped = false; }); }; const server2 = net.createServer({ pauseOnConnect: false }, server2ConnHandler); server1.listen(0, function() { const clientHandler = common.mustCall(function() { server2.listen(0, function() { net.createConnection({ port: this.address().port }).write(msg); }); }); net.createConnection({ port: this.address().port }).write(msg, clientHandler); }); process.on('exit', function() { assert.strictEqual(stopped, false); }); ```
```go package targetspb import ( "strconv" "strings" "github.com/pkg/errors" "github.com/prometheus/prometheus/model/labels" "github.com/thanos-io/thanos/pkg/store/labelpb" ) func NewTargetsResponse(targets *TargetDiscovery) *TargetsResponse { return &TargetsResponse{ Result: &TargetsResponse_Targets{ Targets: targets, }, } } func NewWarningTargetsResponse(warning error) *TargetsResponse { return &TargetsResponse{ Result: &TargetsResponse_Warning{ Warning: warning.Error(), }, } } func (x *TargetHealth) UnmarshalJSON(entry []byte) error { fieldStr, err := strconv.Unquote(string(entry)) if err != nil { return errors.Wrapf(err, "targetHealth: unquote %v", string(entry)) } if fieldStr == "" { return errors.New("empty targetHealth") } state, ok := TargetHealth_value[strings.ToUpper(fieldStr)] if !ok { return errors.Errorf("unknown targetHealth: %v", string(entry)) } *x = TargetHealth(state) return nil } func (x *TargetHealth) MarshalJSON() ([]byte, error) { return []byte(strconv.Quote(strings.ToLower(x.String()))), nil } func (x TargetHealth) Compare(y TargetHealth) int { return int(x) - int(y) } func (t1 *ActiveTarget) Compare(t2 *ActiveTarget) int { if d := strings.Compare(t1.ScrapeUrl, t2.ScrapeUrl); d != 0 { return d } if d := strings.Compare(t1.ScrapePool, t2.ScrapePool); d != 0 { return d } if d := labels.Compare(t1.DiscoveredLabels.PromLabels(), t2.DiscoveredLabels.PromLabels()); d != 0 { return d } if d := labels.Compare(t1.Labels.PromLabels(), t2.Labels.PromLabels()); d != 0 { return d } return 0 } func (t1 *ActiveTarget) CompareState(t2 *ActiveTarget) int { if d := t1.Health.Compare(t2.Health); d != 0 { return d } if t1.LastScrape.Before(t2.LastScrape) { return 1 } if t1.LastScrape.After(t2.LastScrape) { return -1 } return 0 } func (t1 *DroppedTarget) Compare(t2 *DroppedTarget) int { if d := labels.Compare(t1.DiscoveredLabels.PromLabels(), t2.DiscoveredLabels.PromLabels()); d != 0 { return d } return 0 } func (t *ActiveTarget) SetLabels(ls labels.Labels) { var result labelpb.ZLabelSet if !ls.IsEmpty() { result = labelpb.ZLabelSet{Labels: labelpb.ZLabelsFromPromLabels(ls)} } t.Labels = result } func (t *ActiveTarget) SetDiscoveredLabels(ls labels.Labels) { var result labelpb.ZLabelSet if !ls.IsEmpty() { result = labelpb.ZLabelSet{Labels: labelpb.ZLabelsFromPromLabels(ls)} } t.DiscoveredLabels = result } func (t *DroppedTarget) SetDiscoveredLabels(ls labels.Labels) { var result labelpb.ZLabelSet if !ls.IsEmpty() { result = labelpb.ZLabelSet{Labels: labelpb.ZLabelsFromPromLabels(ls)} } t.DiscoveredLabels = result } ```
```javascript "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.respond = exports.convertRequest = exports.convertHeaders = exports.createRequestHandler = void 0; const stream_1 = require("@remix-run/node/dist/stream"); const __1 = require(".."); /** * Returns a request handler for Express that serves the response using Remix. */ function createRequestHandler({ build }, setup) { const handleRequest = (0, __1.createRequestHandler)(build, setup); return async (req, res, next) => { if (!req?.url || !req.method) { return next(); } try { const request = convertRequest(req, res); const response = await handleRequest(request); await respond(res, response); } catch (error) { // Express doesn't support async functions, so we have to pass along the // error manually using next(). next(error); } }; } exports.createRequestHandler = createRequestHandler; function convertHeaders(requestHeaders) { const headers = new Headers(); for (const [key, values] of Object.entries(requestHeaders)) { if (values) { if (Array.isArray(values)) { for (const value of values) { headers.append(key, value); } } else { headers.set(key, values); } } } return headers; } exports.convertHeaders = convertHeaders; function convertRequest(req, res) { const url = new URL(`${req.protocol}://${req.get('host')}${req.url}`); // Abort action/loaders once we can no longer write a response const controller = new AbortController(); res.on('close', () => controller.abort()); const init = { method: req.method, headers: convertHeaders(req.headers), // Cast until reason/throwIfAborted added // path_to_url signal: controller.signal, }; if (req.method !== 'GET' && req.method !== 'HEAD') { init.body = (0, stream_1.createReadableStreamFromReadable)(req); init.duplex = 'half'; } return new Request(url.href, init); } exports.convertRequest = convertRequest; async function respond(res, expoRes) { res.statusMessage = expoRes.statusText; res.status(expoRes.status); for (const [key, value] of expoRes.headers.entries()) { res.append(key, value); } if (expoRes.body) { await (0, stream_1.writeReadableStreamToWritable)(expoRes.body, res); } else { res.end(); } } exports.respond = respond; //# sourceMappingURL=express.js.map ```
Rind () is a village in the Areni Municipality of the Vayots Dzor Province in Armenia, 1320 m above sea level, 25 km west of the regional center. Geography Rind is located on a peninsula descending to the Arpa valley of the Vardenis mountain range. The largest water object of the village is Yeghegnalich, the surface of which is 2.12 hectares, and the absolute height of the mirror is 1458 meters. History The village of Rind was founded in the early 1800s. In 1967, due to a landslide, the old village was depopulated, the residents moved 3 km west and founded the current village in the "Tap" area. Gallery References External links Populated places in Vayots Dzor Province
```java /** * * * 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. */ package org.thingsboard.server.dao.device.claim; import lombok.AllArgsConstructor; import lombok.Data; import org.thingsboard.server.common.data.Device; @AllArgsConstructor @Data public class ClaimResult { private Device device; private ClaimResponse response; } ```
```yaml category: Utilities commonfields: id: LogPoint SIEM Integration version: -1 configuration: - display: LogPoint URL name: url required: true type: 0 - display: LogPoint Username name: username required: true type: 0 - additionalinfo: User's secret key display: API Key name: apikey required: true type: 4 - additionalinfo: Whether to allow connections without verifying SSL certificates validity. display: Trust any certificate (not secure) name: insecure type: 8 required: false - additionalinfo: Whether to use XSOARs system proxy settings to connect to the API display: Use system proxy settings name: proxy type: 8 required: false - additionalinfo: If it is not provided, incidents from past 24 hours will be fetched by default. defaultvalue: 1 day display: First fetch timestamp (<number> <time unit>, e.g., 6 hours, 1 day) name: first_fetch type: 0 required: false - display: Incident type name: incidentType type: 13 required: false - display: Fetch incidents name: isFetch type: 8 required: false - additionalinfo: If this is left blank, maximum 50 incidents will be fetched at a time. defaultvalue: '50' display: Fetch limit (Max value is 200, Recommended value is 50 or less) name: max_fetch type: 0 required: false - defaultvalue: '1' display: Incidents Fetch Interval name: incidentFetchInterval required: false type: 19 description: Use this Content Pack to search logs, fetch incident logs from LogPoint, analyze them for underlying threats, and respond to these threats in real-time. display: LogPoint SIEM Integration name: LogPoint SIEM Integration script: commands: - arguments: - description: From Timestamp. name: ts_from - description: To Timestamp. name: ts_to - description: Number of incidents to fetch. Accepts integer value. name: limit description: Displays incidents between the provided two Timestamps ts_from and ts_to. By default, this command will display first 50 incidents of the past 24 hours but limit can be set to get desired number of incidents. name: lp-get-incidents outputs: - contextPath: LogPoint.Incidents.name description: LogPoint Incident Name. type: String - contextPath: LogPoint.Incidents.type description: LogPoint Incident Type. type: String - contextPath: LogPoint.Incidents.incident_id description: LogPoint Incident ID. type: String - contextPath: LogPoint.Incidents.assigned_to description: LogPoint Incidents Assigned To. type: String - contextPath: LogPoint.Incidents.status description: LogPoint Incidents Status. type: String - contextPath: LogPoint.Incidents.id description: LogPoint Incident Object ID. type: String - contextPath: LogPoint.Incidents.detection_timestamp description: LogPoint Incidents Detection Timestamp. type: Number - contextPath: LogPoint.Incidents.username description: LogPoint Incident Username. type: String - contextPath: LogPoint.Incidents.user_id description: LogPoint Incidents User ID. type: String - contextPath: LogPoint.Incidents.assigned_to description: LogPoint Incidents Assigned To. type: String - contextPath: LogPoint.Incidents.visible_to description: LogPoint Incidents Visible To. type: String - contextPath: LogPoint.Incidents.tid description: LogPoint Incidents Tid. type: String - contextPath: LogPoint.Incidents.rows_count description: LogPoint Incidents Rows Count. type: String - contextPath: LogPoint.Incidents.risk_level description: LogPoint Incidents Risk Level. type: String - contextPath: LogPoint.Incidents.detection_timestamp description: LogPoint Incidents Detection Timestamp. type: String - contextPath: LogPoint.Incidents.loginspect_ip_dns description: LogPoint Incidents Loginspect IP DNS. type: String - contextPath: LogPoint.Incidents.status description: LogPoint Incidents Status. type: String - contextPath: LogPoint.Incidents.comments description: LogPoint Incidents Comments. type: String - contextPath: LogPoint.Incidents.commentscount description: LogPoint Incidents Comments Count. type: Number - contextPath: LogPoint.Incidents.query description: LogPoint Incidents Query. type: String - contextPath: LogPoint.Incidents.repos description: LogPoint Incidents Repos. type: String - contextPath: LogPoint.Incidents.time_range description: LogPoint Incidents Time Range. type: String - contextPath: LogPoint.Incidents.alert_obj_id description: LogPoint Incidents Alert Obj Id. type: String - contextPath: LogPoint.Incidents.throttle_enabled description: LogPoint Incidents Throttle Enabled. type: Boolean - contextPath: LogPoint.Incidents.lastaction description: LogPoint Incidents Last Action. type: String - contextPath: LogPoint.Incidents.description description: LogPoint Incidents Description. type: String - arguments: - description: Object ID of a particular incident. It is the value contained in 'id' key of the incidents obtained from 'lp-get-incidents' command. name: incident_obj_id required: true - description: Incident Id of a particular incident. It is the value contained in 'incident_id' key of the incidents obtained from 'lp-get-incidents' command. name: incident_id required: true - description: Incident Detection TImestamp. It is the value contained in 'detection_timestamp' key of the incidents obtained from 'lp-get-incidents' command. name: date required: true description: Retrieves a Particular Incident's Data. name: lp-get-incident-data outputs: - contextPath: LogPoint.Incidents.data.use description: LogPoint Incidents Data Use. type: String - contextPath: LogPoint.Incidents.data.used description: LogPoint Incidents Data Used. type: String - contextPath: LogPoint.Incidents.data.log_ts description: LogPoint Incidents Data Log Ts. type: Number - contextPath: LogPoint.Incidents.data._type_str description: LogPoint Incidents Data Type Str. type: String - contextPath: LogPoint.Incidents.data.msg description: LogPoint Incidents Data Msg. type: String - contextPath: LogPoint.Incidents.data.total description: LogPoint Incidents Data Total. type: String - contextPath: LogPoint.Incidents.data.device_name description: LogPoint Incidents Data Device Name. type: String - contextPath: LogPoint.Incidents.data._offset description: LogPoint Incidents Data Offset. type: String - contextPath: LogPoint.Incidents.data.logpoint_name description: LogPoint Incidents Data LogPoint Name. type: String - contextPath: LogPoint.Incidents.data.repo_name description: LogPoint Incidents Data Repo Name. type: String - contextPath: LogPoint.Incidents.data.free description: LogPoint Incidents Data Free. type: String - contextPath: LogPoint.Incidents.data.source_name description: LogPoint Incidents Data Source Name. type: String - contextPath: LogPoint.Incidents.data.col_ts description: LogPoint Incidents Data Col Ts. type: Number - contextPath: LogPoint.Incidents.data._tz description: LogPoint Incidents Data Tz. type: String - contextPath: LogPoint.Incidents.data.norm_id description: LogPoint Incidents Data Norm Id. type: String - contextPath: LogPoint.Incidents.data._identifier description: LogPoint Incidents Data Identifier. type: String - contextPath: LogPoint.Incidents.data.collected_at description: LogPoint Incidents Data Collected At. type: String - contextPath: LogPoint.Incidents.data.device_ip description: LogPoint Incidents Data Device IP. type: String - contextPath: LogPoint.Incidents.data._fromV550 description: LogPoint Incidents Data From V550. type: String - contextPath: LogPoint.Incidents.data._enrich_policy description: LogPoint Incidents Data Enrich Policy. type: String - contextPath: LogPoint.Incidents.data._type_num description: LogPoint Incidents Data Type Num. type: String - contextPath: LogPoint.Incidents.data._type_ip description: LogPoint Incidents Data Type IP. type: String - contextPath: LogPoint.Incidents.data.sig_id description: LogPoint Incidents Data Sig Id. type: String - contextPath: LogPoint.Incidents.data.col_type description: LogPoint Incidents Data Col Type. type: String - contextPath: LogPoint.Incidents.data.object description: LogPoint Incidents Data Object. type: String - contextPath: LogPoint.Incidents.data._labels description: LogPoint Incidents Data Labels. type: String - contextPath: LogPoint.Incidents.data.source_address description: Source Address. type: String - contextPath: LogPoint.Incidents.data.destination_address description: Destination Address. type: String - contextPath: LogPoint.Incidents.data.workstation description: Workstation. type: String - contextPath: LogPoint.Incidents.data.domain description: Domain. type: String - contextPath: LogPoint.Incidents.data.user description: User. type: String - contextPath: LogPoint.Incidents.data.caller_user description: Caller User. type: String - contextPath: LogPoint.Incidents.data.target_user description: Target User. type: String - contextPath: LogPoint.Incidents.data.source_machine_id description: Source Machie Id. type: String - contextPath: LogPoint.Incidents.data.destination_machine_id description: Destination Machine Id. type: String - contextPath: LogPoint.Incidents.data.destination_port description: Destination Port. type: String - contextPath: LogPoint.Incidents.data.event_type description: Event Type. type: String - contextPath: LogPoint.Incidents.data.share_path description: Share Path. type: String - contextPath: LogPoint.Incidents.data.object_name description: Object Name. type: String - contextPath: LogPoint.Incidents.data.sub_status_code description: Sub Status Code. type: String - contextPath: LogPoint.Incidents.data.object_type description: Object Type. type: String - contextPath: LogPoint.Incidents.data.request_method description: Request Method. type: String - contextPath: LogPoint.Incidents.data.status_code description: Status Code. type: String - contextPath: LogPoint.Incidents.data.received_datasize description: Received Datasize. type: String - contextPath: LogPoint.Incidents.data.received_packet description: Received Packet. type: String - contextPath: LogPoint.Incidents.data.user_agent description: User Agent. type: String - contextPath: LogPoint.Incidents.data.sent_datasize description: Sent Datasize. type: String - contextPath: LogPoint.Incidents.data.sender description: Sender. type: String - contextPath: LogPoint.Incidents.data.receiver description: Receiver. type: String - contextPath: LogPoint.Incidents.data.datasize description: Datasize. type: String - contextPath: LogPoint.Incidents.data.file description: File. type: String - contextPath: LogPoint.Incidents.data.subject description: Subject. type: String - contextPath: LogPoint.Incidents.data.status description: Status. type: String - contextPath: LogPoint.Incidents.data.file_count description: File Count. type: String - contextPath: LogPoint.Incidents.data.protocol_id description: Protocol Id. type: String - contextPath: LogPoint.Incidents.data.sent_packet description: Sent Packet. type: String - contextPath: LogPoint.Incidents.data.service description: Service. type: String - contextPath: LogPoint.Incidents.data.printer description: Printer. type: String - contextPath: LogPoint.Incidents.data.print_count description: Print Count. type: String - contextPath: LogPoint.Incidents.data.event_id description: Event Id. type: String - contextPath: LogPoint.Incidents.data.country_name description: Country Name. type: String - contextPath: LogPoint.Incidents.data.host description: Host. type: String - contextPath: LogPoint.Incidents.data.hash description: Hash. type: String - contextPath: LogPoint.Incidents.data.hash_sha1 description: Hash SHA1. type: String - contextPath: LogPoint.Incidents.data.agent_address description: Agent Address. type: String - contextPath: LogPoint.Incidents.data.attacker_address description: Attacker Address. type: String - contextPath: LogPoint.Incidents.data.broadcast_address description: Broadcast Address. type: String - contextPath: LogPoint.Incidents.data.client_address description: Client Address. type: String - contextPath: LogPoint.Incidents.data.client_hardware_address description: Client Hardware Address. type: String - contextPath: LogPoint.Incidents.data.destination_hardware_address description: Destination Hardware Address. type: String - contextPath: LogPoint.Incidents.data.destination_nat_address description: Destination NAT Address. type: String - contextPath: LogPoint.Incidents.data.device_address description: Device Address. type: String - contextPath: LogPoint.Incidents.data.external_address description: External Address. type: String - contextPath: LogPoint.Incidents.data.gateway_address description: Gateway Address. type: String - contextPath: LogPoint.Incidents.data.hardware_address description: Hardware Address. type: String - contextPath: LogPoint.Incidents.data.host_address description: Host Address. type: String - contextPath: LogPoint.Incidents.data.interface_address description: Interface Address. type: String - contextPath: LogPoint.Incidents.data.lease_address description: Lease Address. type: String - contextPath: LogPoint.Incidents.data.local_address description: Local Address. type: String - contextPath: LogPoint.Incidents.data.nas_address description: Nas ddress. type: String - contextPath: LogPoint.Incidents.data.nas_ipv6_address description: Nas_IPV6 Address. type: String - contextPath: LogPoint.Incidents.data.nat_address description: NAT Address. type: String - contextPath: LogPoint.Incidents.data.nat_source_address description: NAT Source Address. type: String - contextPath: LogPoint.Incidents.data.network_address description: Network Address. type: String - contextPath: LogPoint.Incidents.data.new_hardware_address description: New Hardware Address. type: String - contextPath: LogPoint.Incidents.data.old_hardware_address description: Old Hardware Address. type: String - contextPath: LogPoint.Incidents.data.original_address description: Original Address. type: String - contextPath: LogPoint.Incidents.data.original_client_address description: Original Client Address. type: String - contextPath: LogPoint.Incidents.data.original_destination_address description: Original Destination Address. type: String - contextPath: LogPoint.Incidents.data.original_server_address description: Original Server Address. type: String - contextPath: LogPoint.Incidents.data.original_source_address description: Original Source Address. type: String - contextPath: LogPoint.Incidents.data.originating_address description: Originating Address. type: String - contextPath: LogPoint.Incidents.data.peer_address description: Peer Address. type: String - contextPath: LogPoint.Incidents.data.private_address description: Private Address. type: String - contextPath: LogPoint.Incidents.data.proxy_address description: Proxy Address. type: String - contextPath: LogPoint.Incidents.data.proxy_source_address description: Proxy Source Address. type: String - contextPath: LogPoint.Incidents.data.relay_address description: Relay Address. type: String - contextPath: LogPoint.Incidents.data.remote_address description: Remote Address. type: String - contextPath: LogPoint.Incidents.data.resolved_address description: Resolved Address. type: String - contextPath: LogPoint.Incidents.data.route_address description: Route Address. type: String - contextPath: LogPoint.Incidents.data.scanner_address description: Scanner Address. type: String - contextPath: LogPoint.Incidents.data.server_address description: Server Address. type: String - contextPath: LogPoint.Incidents.data.server_hardware_address description: Server Hardware Address. type: String - contextPath: LogPoint.Incidents.data.source_hardware_address description: Source Hardware Address. type: String - contextPath: LogPoint.Incidents.data.start_address description: Start Address. type: String - contextPath: LogPoint.Incidents.data.supplier_address description: Supplier Address. type: String - contextPath: LogPoint.Incidents.data.switch_address description: Switch Address. type: String - contextPath: LogPoint.Incidents.data.translated_address description: Translated Address. type: String - contextPath: LogPoint.Incidents.data.virtual_address description: Virtual Address. type: String - contextPath: LogPoint.Incidents.data.virtual_server_address description: Virtual Server Address. type: String - contextPath: LogPoint.Incidents.data.vpn_address description: VPN Address. type: String - contextPath: LogPoint.Incidents.data.hash_length description: Hash Length. type: String - contextPath: LogPoint.Incidents.data.hash_sha256 description: Hash SHA256. type: String - contextPath: LogPoint.Incidents.data.alternate_user description: Alternate User. type: String - contextPath: LogPoint.Incidents.data.authenticated_user description: Authenticated User. type: String - contextPath: LogPoint.Incidents.data.authorized_user description: Authorized User. type: String - contextPath: LogPoint.Incidents.data.certificate_user description: Certificate User. type: String - contextPath: LogPoint.Incidents.data.current_user description: Current User. type: String - contextPath: LogPoint.Incidents.data.database_user description: Database User. type: String - contextPath: LogPoint.Incidents.data.destination_user description: Destination User. type: String - contextPath: LogPoint.Incidents.data.logon_user description: Logon User. type: String - contextPath: LogPoint.Incidents.data.new_max_user description: New Max User. type: String - contextPath: LogPoint.Incidents.data.new_user description: New User. type: String - contextPath: LogPoint.Incidents.data.old_max_user description: Old Max User. type: String - contextPath: LogPoint.Incidents.data.os_user description: OS User. type: String - contextPath: LogPoint.Incidents.data.remote_user description: Remote User. type: String - contextPath: LogPoint.Incidents.data.source_user description: Source User. type: String - contextPath: LogPoint.Incidents.data.system_user description: System User. type: String - contextPath: LogPoint.Incidents.data.target_logon_user description: Target Logon User. type: String - contextPath: LogPoint.Incidents.data.zone_user description: Zone User. type: String - arguments: - description: From Timestamp. name: ts_from - description: To Timestamp. name: ts_to - description: Number of incident states data to fetch. Accepts integer value. name: limit description: Displays incident states data between the provided two Timestamps ts_from and ts_to. By default, this command will display first 50 data of the past 24 hours but limit can be set to get desired number of incident states data. name: lp-get-incident-states outputs: - contextPath: LogPoint.Incidents.states.id description: LogPoint Incidents States Id. type: String - contextPath: LogPoint.Incidents.states.status description: LogPoint Incidents States Status. type: String - contextPath: LogPoint.Incidents.states.assigned_to description: LogPoint Incidents States Assigned To. type: String - contextPath: LogPoint.Incidents.states.comments description: LogPoint Incidents States Comments. type: String - arguments: - description: Object ID of a particular incident. It is the value contained in 'id' key of the incidents obtained from 'lp-get-incidents' command. name: incident_obj_id required: true - description: Comment to be added to the incidents. name: comment required: true description: Add comments to the incidents. name: lp-add-incident-comment outputs: - contextPath: LogPoint.Incidents.comment description: LogPoint Incidents Comment. type: String - arguments: - description: Object ID of a particular incident. It is the value contained in 'id' key of the incidents obtained from 'lp-get-incidents' command. Multiple id can be provided by separating them using comma. isArray: true name: incident_obj_ids required: true - description: Id of the user whom the incidents are assigned. It can be displayed using 'lp-get-users' command. name: new_assignee required: true description: Assigning/Re-assigning Incidents. name: lp-assign-incidents outputs: - contextPath: LogPoint.Incidents.assign description: LogPoint Incidents Assign. type: String - arguments: - description: Object ID of a particular incident. It is the value contained in 'id' key of the incidents obtained from 'lp-get-incidents' command. Multiple id can be provided by separating them using comma. isArray: true name: incident_obj_ids required: true description: Resolves the Incidents. name: lp-resolve-incidents outputs: - contextPath: LogPoint.Incidents.resolve description: LogPoint Incidents Resolve. type: String - arguments: - description: Object ID of a particular incident. It is the value contained in 'id' key of the incidents obtained from 'lp-get-incidents' command. Multiple id can be provided by separating them using comma. isArray: true name: incident_obj_ids required: true description: Closes the Incidents. name: lp-close-incidents outputs: - contextPath: LogPoint.Incidents.close description: LogPoint Incidents Close. type: String - arguments: - description: Object ID of a particular incident. It is the value contained in 'id' key of the incidents obtained from 'lp-get-incidents' command. Multiple id can be provided by separating them using comma. isArray: true name: incident_obj_ids required: true description: Re-opens the closed incidents. name: lp-reopen-incidents outputs: - contextPath: LogPoint.Incidents.reopen description: LogPoint Incidents Reopen. type: String - description: Gets Incident users and user groups. name: lp-get-users outputs: - contextPath: LogPoint.Incidents.users.id description: LogPoint Incidents Users Id. type: String - contextPath: LogPoint.Incidents.users.name description: LogPoint Incidents Users Name. type: String - contextPath: LogPoint.Incidents.users.usergroups description: LogPoint Incidents Users Usergroups. type: String arguments: [] - description: Gets LogPoint user's preference such as timezone, date format, etc. name: lp-get-users-preference outputs: - contextPath: LogPoint.User.Preference.timezone description: LogPoint user's timezone. type: String - contextPath: LogPoint.User.Preference.date_format description: LogPoint user's date format. type: String - contextPath: LogPoint.User.Preference.hour_format description: LogPoint user's hour format. type: String arguments: [] - description: Gets user's LogPoints. name: lp-get-logpoints outputs: - contextPath: LogPoint.LogPoints.name description: LogPoint name. type: String - contextPath: LogPoint.LogPoints.ip description: LogPoint's IP address. type: String arguments: [] - description: Gets the list of LogPoint repos that can be accessed by the user. name: lp-get-repos outputs: - contextPath: LogPoint.Repos.repo description: LogPoint repo name. type: String - contextPath: LogPoint.Repos.address description: LogPoint repo address. type: String arguments: [] - description: Gets devices associated with LogPoint. name: lp-get-devices outputs: - contextPath: LogPoint.Devices.name description: Device name. type: String - contextPath: LogPoint.Devices.address description: Device IP address. type: String arguments: [] - description: Gets live search results of the alerts and dashboards. name: lp-get-livesearches outputs: - contextPath: LogPoint.LiveSearches.generated_by description: Who generated the live search. type: String - contextPath: LogPoint.LiveSearches.searchname description: The name of the live search. type: String - contextPath: LogPoint.LiveSearches.description description: A description of the live search. type: String - contextPath: LogPoint.LiveSearches.query description: The live search query. type: String arguments: [] - arguments: - description: LogPoint search query. This should be the exact query to use to search logs in the LogPoint UI. name: query required: true - defaultValue: Last 5 minutes description: 'Time range. For example: Last 30 minutes, Last 7 days, etc. If not provided, it will use "Last 5 minutes" as the time range by default.' name: time_range - defaultValue: '100' description: Number of logs to fetch. If not provided, the first 100 logs will be displayed. name: limit - description: A comma-separated list of LogPoint repos from which logs are to be fetched. If not provided, it will display logs from all repos. isArray: true name: repos - defaultValue: '60' description: LogPoint search timeout in seconds. name: timeout description: Gets the search ID based on the provided search parameters. name: lp-get-searchid outputs: - contextPath: LogPoint.search_id description: Search ID. Use this ID in the lp-search-logs command to get the search result. type: String - arguments: - description: Search ID obtained from the lp-get-searchid command. name: search_id required: true description: Gets LogPoint search results. Uses the value of search_id as an argument. name: lp-search-logs outputs: - contextPath: LogPoint.SearchLogs description: Search results. type: String dockerimage: demisto/python3:3.10.14.99865 isfetch: true runonce: false script: '' subtype: python3 type: python tests: - LogPoint SIEM Integration - Test Playbook 1 - LogPoint SIEM Integration - Test Playbook 2 - LogPoint SIEM Integration - Test Playbook 3 defaultmapperin: LogPoint SIEM Integration - Incoming Mapper fromversion: 6.0.0 ```
```smalltalk using System; using System.Threading; using System.Text; using Microsoft.Xna.Framework.Graphics; using System.Collections.Generic; using Microsoft.Xna.Framework.Content; using System.Threading.Tasks; using System.IO; using Microsoft.Xna.Framework; using Nez.ParticleDesigner; using Nez.Sprites; using Nez.Textures; using Nez.Tiled; using Microsoft.Xna.Framework.Audio; using Nez.BitmapFonts; using Nez.Aseprite; namespace Nez.Systems { /// <summary> /// ContentManager subclass that also manages Effects from ogl files. Adds asynchronous loading of assets as well. /// </summary> public class NezContentManager : ContentManager { Dictionary<string, Effect> _loadedEffects = new Dictionary<string, Effect>(); List<IDisposable> _disposableAssets; List<IDisposable> DisposableAssets { get { if (_disposableAssets == null) { var fieldInfo = ReflectionUtils.GetFieldInfo(typeof(ContentManager), "disposableAssets"); _disposableAssets = fieldInfo.GetValue(this) as List<IDisposable>; } return _disposableAssets; } } #if FNA Dictionary<string, object> _loadedAssets; Dictionary<string, object> LoadedAssets { get { if (_loadedAssets == null) { var fieldInfo = ReflectionUtils.GetFieldInfo(typeof(ContentManager), "loadedAssets"); _loadedAssets = fieldInfo.GetValue(this) as Dictionary<string, object>; } return _loadedAssets; } } #endif public NezContentManager(IServiceProvider serviceProvider, string rootDirectory) : base(serviceProvider, rootDirectory) {} public NezContentManager(IServiceProvider serviceProvider) : base(serviceProvider) {} public NezContentManager() : base(((Game)Core._instance).Services, ((Game)Core._instance).Content.RootDirectory) {} #region Strongly Typed Loaders /// <summary> /// loads a Texture2D either from xnb or directly from a png/jpg. Note that xnb files should not contain the .xnb file /// extension or be preceded by "Content" in the path. png/jpg files should have the file extension and have an absolute /// path or a path starting with "Content". /// </summary> public Texture2D LoadTexture(string name, bool premultiplyAlpha = false) { // no file extension. Assumed to be an xnb so let ContentManager load it if (string.IsNullOrEmpty(Path.GetExtension(name))) return Load<Texture2D>(name); if (LoadedAssets.TryGetValue(name, out var asset)) { if (asset is Texture2D tex) return tex; } using (var stream = Path.IsPathRooted(name) ? File.OpenRead(name) : TitleContainer.OpenStream(name)) { var texture = premultiplyAlpha ? TextureUtils.TextureFromStreamPreMultiplied(stream) : Texture2D.FromStream(Core.GraphicsDevice, stream); texture.Name = name; LoadedAssets[name] = texture; DisposableAssets.Add(texture); return texture; } } /// <summary> /// loads a SoundEffect either from xnb or directly from a wav. Note that xnb files should not contain the .xnb file /// extension or be preceded by "Content" in the path. wav files should have the file extension and have an absolute /// path or a path starting with "Content". /// </summary> public SoundEffect LoadSoundEffect(string name) { // no file extension. Assumed to be an xnb so let ContentManager load it if (string.IsNullOrEmpty(Path.GetExtension(name))) return Load<SoundEffect>(name); if (LoadedAssets.TryGetValue(name, out var asset)) { if (asset is SoundEffect sfx) { return sfx; } } using (var stream = Path.IsPathRooted(name) ? File.OpenRead(name) : TitleContainer.OpenStream(name)) { var sfx = SoundEffect.FromStream(stream); LoadedAssets[name] = sfx; DisposableAssets.Add(sfx); return sfx; } } /// <summary> /// loads a Tiled map /// </summary> public TmxMap LoadTiledMap(string name) { if (LoadedAssets.TryGetValue(name, out var asset)) { if (asset is TmxMap map) return map; } var tiledMap = new TmxMap().LoadTmxMap(name, this); LoadedAssets[name] = tiledMap; DisposableAssets.Add(tiledMap); return tiledMap; } /// <summary> /// Loads a ParticleDesigner pex file /// </summary> public Particles.ParticleEmitterConfig LoadParticleEmitterConfig(string name) { if (LoadedAssets.TryGetValue(name, out var asset)) { if (asset is Particles.ParticleEmitterConfig config) return config; } var emitterConfig = ParticleEmitterConfigLoader.Load(name); LoadedAssets[name] = emitterConfig; DisposableAssets.Add(emitterConfig); return emitterConfig; } /// <summary> /// Loads a SpriteAtlas created with the Sprite Atlas Packer tool /// </summary> public SpriteAtlas LoadSpriteAtlas(string name, bool premultiplyAlpha = false) { if (LoadedAssets.TryGetValue(name, out var asset)) { if (asset is SpriteAtlas spriteAtlas) return spriteAtlas; } var atlas = SpriteAtlasLoader.ParseSpriteAtlas(name, premultiplyAlpha); LoadedAssets.Add(name, atlas); DisposableAssets.Add(atlas); return atlas; } /// <summary> /// Loads a BitmapFont /// </summary> public BitmapFont LoadBitmapFont(string name, bool premultiplyAlpha = false) { if (LoadedAssets.TryGetValue(name, out var asset)) { if (asset is BitmapFont bmFont) return bmFont; } var font = BitmapFontLoader.LoadFontFromFile(name, premultiplyAlpha); LoadedAssets.Add(name, font); DisposableAssets.Add(font); return font; } /// <summary> /// Loads the contents of an Aseprite (.ase/.aseprite) file. /// </summary> /// <param name="name">The content path name of the Aseprite file to load.</param> /// <returns> /// A new instance of the <see cref="AsepriteFile"/> class initialized with the data read from the Aseprite /// file. /// </returns> public AsepriteFile LoadAsepriteFile(string name) { if (LoadedAssets.TryGetValue(name, out var asset)) { if (asset is AsepriteFile aseFile) return aseFile; } var asepriteFile = AsepriteFileLoader.Load(name); LoadedAssets.Add(name, asepriteFile); return asepriteFile; } /// <summary> /// loads an ogl effect directly from file and handles disposing of it when the ContentManager is disposed. Name should be the path /// relative to the Content folder or including the Content folder. /// </summary> /// <returns>The effect.</returns> /// <param name="name">Name.</param> public Effect LoadEffect(string name) => LoadEffect<Effect>(name); /// <summary> /// loads an embedded Nez effect. These are any of the Effect subclasses in the Nez/Graphics/Effects folder. /// Note that this will return a unique instance if you attempt to load the same Effect twice to avoid Effect duplication. /// </summary> /// <returns>The nez effect.</returns> /// <typeparam name="T">The 1st type parameter.</typeparam> public T LoadNezEffect<T>() where T : Effect, new() { var cacheKey = typeof(T).Name + "-" + Utils.RandomString(5); var effect = new T(); effect.Name = cacheKey; _loadedEffects[cacheKey] = effect; return effect; } /// <summary> /// loads an ogl effect directly from file and handles disposing of it when the ContentManager is disposed. Name should the the path /// relative to the Content folder or including the Content folder. Effects must have a constructor that accepts GraphicsDevice and /// byte[]. Note that this will return a unique instance if you attempt to load the same Effect twice to avoid Effect duplication. /// </summary> /// <returns>The effect.</returns> /// <param name="name">Name.</param> public T LoadEffect<T>(string name) where T : Effect { // make sure the effect has the proper root directory if (!name.StartsWith(RootDirectory)) name = RootDirectory + "/" + name; var bytes = EffectResource.GetFileResourceBytes(name); return LoadEffect<T>(name, bytes); } /// <summary> /// loads an ogl effect directly from its bytes and handles disposing of it when the ContentManager is disposed. Name should the the path /// relative to the Content folder or including the Content folder. Effects must have a constructor that accepts GraphicsDevice and /// byte[]. Note that this will return a unique instance if you attempt to load the same Effect twice to avoid Effect duplication. /// </summary> /// <returns>The effect.</returns> /// <param name="name">Name.</param> public T LoadEffect<T>(string name, byte[] effectCode) where T : Effect { var effect = Activator.CreateInstance(typeof(T), Core.GraphicsDevice, effectCode) as T; effect.Name = name + "-" + Utils.RandomString(5); _loadedEffects[effect.Name] = effect; return effect; } /// <summary> /// loads and manages any Effect that is built-in to MonoGame such as BasicEffect, AlphaTestEffect, etc. Note that this will /// return a unique instance if you attempt to load the same Effect twice. If you intend to use the same Effect in multiple locations /// keep a reference to it and use it directly. /// </summary> /// <returns>The mono game effect.</returns> /// <typeparam name="T">The 1st type parameter.</typeparam> public T LoadMonoGameEffect<T>() where T : Effect { var effect = Activator.CreateInstance(typeof(T), Core.GraphicsDevice) as T; effect.Name = typeof(T).Name + "-" + Utils.RandomString(5); _loadedEffects[effect.Name] = effect; return effect; } #endregion /// <summary> /// loads an asset on a background thread with optional callback for when it is loaded. The callback will occur on the main thread. /// </summary> /// <param name="assetName">Asset name.</param> /// <param name="onLoaded">On loaded.</param> /// <typeparam name="T">The 1st type parameter.</typeparam> public void LoadAsync<T>(string assetName, Action<T> onLoaded = null) { var syncContext = SynchronizationContext.Current; Task.Run(() => { var asset = Load<T>(assetName); // if we have a callback do it on the main thread if (onLoaded != null) { syncContext.Post(d => { onLoaded(asset); }, null); } }); } /// <summary> /// loads an asset on a background thread with optional callback that includes a context parameter for when it is loaded. /// The callback will occur on the main thread. /// </summary> /// <param name="assetName">Asset name.</param> /// <param name="onLoaded">On loaded.</param> /// <param name="context">Context.</param> /// <typeparam name="T">The 1st type parameter.</typeparam> public void LoadAsync<T>(string assetName, Action<object, T> onLoaded = null, object context = null) { var syncContext = SynchronizationContext.Current; Task.Run(() => { var asset = Load<T>(assetName); if (onLoaded != null) { syncContext.Post(d => { onLoaded(context, asset); }, null); } }); } /// <summary> /// loads a group of assets on a background thread with optional callback for when it is loaded /// </summary> /// <param name="assetNames">Asset names.</param> /// <param name="onLoaded">On loaded.</param> /// <typeparam name="T">The 1st type parameter.</typeparam> public void LoadAsync<T>(string[] assetNames, Action onLoaded = null) { var syncContext = SynchronizationContext.Current; Task.Run(() => { for (var i = 0; i < assetNames.Length; i++) Load<T>(assetNames[i]); // if we have a callback do it on the main thread if (onLoaded != null) { syncContext.Post(d => { onLoaded(); }, null); } }); } /// <summary> /// removes assetName from LoadedAssets and Disposes of it /// disposeableAssets List. /// </summary> /// <param name="assetName">Asset name.</param> /// <typeparam name="T">The 1st type parameter.</typeparam> public void UnloadAsset<T>(string assetName) where T : class, IDisposable { if (IsAssetLoaded(assetName)) { try { // first fetch the actual asset. we already know its loaded so we'll grab it directly var assetToRemove = LoadedAssets[assetName]; for (var i = 0; i < DisposableAssets.Count; i++) { // see if the asset is disposeable. If so, find and dispose of it. var typedAsset = DisposableAssets[i] as T; if (typedAsset != null && typedAsset == assetToRemove) { typedAsset.Dispose(); DisposableAssets.RemoveAt(i); break; } } LoadedAssets.Remove(assetName); } catch (Exception e) { Debug.Error("Could not unload asset {0}. {1}", assetName, e); } } } /// <summary> /// unloads an Effect that was loaded via loadEffect, loadNezEffect or loadMonoGameEffect /// </summary> /// <param name="effectName">Effect.name</param> public bool UnloadEffect(string effectName) { if (_loadedEffects.ContainsKey(effectName)) { _loadedEffects[effectName].Dispose(); _loadedEffects.Remove(effectName); return true; } return false; } /// <summary> /// unloads an Effect that was loaded via loadEffect, loadNezEffect or loadMonoGameEffect /// </summary> public bool UnloadEffect(Effect effect) => UnloadEffect(effect.Name); /// <summary> /// checks to see if an asset with assetName is loaded /// </summary> /// <returns><c>true</c> if this instance is asset loaded the specified assetName; otherwise, <c>false</c>.</returns> /// <param name="assetName">Asset name.</param> public bool IsAssetLoaded(string assetName) => LoadedAssets.ContainsKey(assetName); /// <summary> /// provides a string suitable for logging with all the currently loaded assets and effects /// </summary> /// <returns>The loaded assets.</returns> internal string LogLoadedAssets() { var builder = new StringBuilder(); foreach (var asset in LoadedAssets.Keys) builder.AppendFormat("{0}: ({1})\n", asset, LoadedAssets[asset].GetType().Name); foreach (var asset in _loadedEffects.Keys) builder.AppendFormat("{0}: ({1})\n", asset, _loadedEffects[asset].GetType().Name); return builder.ToString(); } /// <summary> /// reverse lookup. Gets the asset path given the asset. This is useful for making editor and non-runtime stuff. /// </summary> /// <param name="asset"></param> /// <returns></returns> public string GetPathForLoadedAsset(object asset) { if (LoadedAssets.ContainsValue(asset)) { foreach (var kv in LoadedAssets) { if (kv.Value == asset) return kv.Key; } } return null; } /// <summary> /// override that disposes of all loaded Effects /// </summary> public override void Unload() { base.Unload(); foreach (var key in _loadedEffects.Keys) _loadedEffects[key].Dispose(); _loadedEffects.Clear(); } } /// <summary> /// the only difference between this class and NezContentManager is that this one can load embedded resources from the Nez.dll /// </summary> sealed class NezGlobalContentManager : NezContentManager { public NezGlobalContentManager(IServiceProvider serviceProvider, string rootDirectory) : base(serviceProvider, rootDirectory) {} /// <summary> /// override that will load embedded resources if they have the "nez://" prefix /// </summary> /// <returns>The stream.</returns> /// <param name="assetName">Asset name.</param> protected override Stream OpenStream(string assetName) { if (assetName.StartsWith("nez://")) { var assembly = GetType().Assembly; #if FNA // for FNA, we will just search for the file by name since the assembly name will not be known at runtime foreach (var item in assembly.GetManifestResourceNames()) { if (item.EndsWith(assetName.Substring(assetName.Length - 20))) { assetName = "nez://" + item; break; } } #endif return assembly.GetManifestResourceStream(assetName.Substring(6)); } return base.OpenStream(assetName); } } } ```
Litsa Kouroupaki (, born in 1964) is a Greek politician and member of the Hellenic Parliament for the Panhellenic Socialist Movement (PASOK). Life Litsa Kouroupaki studied at the School of Dentistry of the National and Kapodistrian University of Athens, graduating in 1988. Litsa Kouroupaki was a member of PASP, the youth wing of PASOK during her studies and became a member of PASOK itself since 1982. Within PASOK, she has been active in the health, volunteerism, immigration policy and human rights sections for the Athens party organization, and is a member of the Secretariat of the party section for the Greek diaspora. References Biography of Litsa Kouroupaki Litsa Kouroupaki in the Official Website of the Hellenic Parliament - External links Official Website of Litsa Kouroupaki 1964 births PASOK politicians Living people Greek MPs 2009–2012 People from Chania (regional unit) Cretan women National and Kapodistrian University of Athens alumni 21st-century Greek politicians 21st-century Greek women politicians
John Saris () was chief merchant on the first English voyage to Japan, which left London in 1611. He stopped at Yemen, missing India (which he had originally intended to visit) and going on to Java, which had the sole permanent English trading station (or 'factory') in Asia. Saris had spent more than five years there before, as a merchant, having gone with the East India Company Second Voyage, under Henry Middleton. He became Chief Factor there, but returned to London in 1610. Now arrived again, in 1612, Saris decided to send his other ships home, taking just one, the Clove, on to Japan, where it arrived in summer 1613. Career Although the better known William Adams was the first Englishman to arrive in Japan in April 1600, he did so as the navigator of the Dutch ship Liefde (Charity), rather than aboard an English ship. Saris received much aid from Adams, who had become the shogun's advisor on foreign affairs. As a result, Saris was able to meet the retired shogun, Tokugawa Ieyasu, who still held power, and also his son, the de facto Shōgun Tokugawa Hidetada. Ieyasu promised Saris extensive trade benefits for the English, and suggested, along with Adams, the port of Uraga as a strategic point of access to Edo Bay. But Saris decided to place the English factory far from the Shogun's capital of Edo (modern Tokyo), on Hirado, a small island off Kyūshū, Japan's largest southern island. The Dutch were already trading with some success, and it saved an extra leg of sailing along dangerous coasts. Saris was partly welcomed in Japan because of the astonishing present he had brought. This was a telescope, described as 'silver-gilt' and very large. It was the first telescope ever to leave Europe, and the first to be made as a royal-level gift. It is not extant. After some months, at the end of 1613, Saris sailed home to England, leaving Richard Cocks in charge of the Hirado operation. It failed, due in large part to the fact that the English came to Japan to sell their finest domestic product, which was woollen cloth, but it tended to rot en route. English efforts to develop a trade relationship with China at this time failed as well, and so the Hirado factory was abandoned 'temporarily' ten years later, in 1623. Saris brought back Ieyasu's reciprocal gifts for King James, in thanks for the telescope, which were stunning paintings, and from the shogun himself, two suits of armour (which are extant). He encountered some opprobrium when he was accused of 'private trade' (smuggling) and was also discovered to have shown around London some erotic Japanese 'books and pictures' (shunga). However, he was exonerated by the East India Company of the first charge, while prudently surrendering his erotica for destruction. Saris had become very rich from this voyage. He married Anne, daughter of the wealthy London merchant William Megges, granddaughter (on her mother's side) of Sir Thomas Cambell, Lord Mayor in 1609-10. She died in the 8th year of their marriage without issue, on February 21, 1623, aged 29 probably in childbirth. He never remarried. Saris then moved into a fine mansion near the Thames at Fulham, called Goodriches, which was behind All Saints Church in Fulham. It was pulled down in 1750, and Sir William Fowell's Alms-houses now stand upon its site. Here he lived quietly until the winter of 1643, when he died on December 11, and was buried on the 19th, a fee of 2 shillings and 6 pennies being paid to the churchwardens "for the burial." His monument, a large black stone in the floor to the right of the altar, may still be seen in All Saints Church in Fulham, though it is barely legible and partially hidden by the choir-stalls. It bears the arms of himself and his wife and reads: HERE LYETH INTERRED THE BODY OF CAPTAYN JOHN SARIS OF FVLHAM IN THE COVNTY OF MIDDLESEX ESQ. HE DEPARTED THIS LIFE THE 11 DAY OF DECEM Ao DNI 1643, AGED 63 YEARS. HE HAD TO WIFE ANNE THE DAVGHTER OF WILLIAM MIGGES OF LONDON ESQ. SHE DEPARTED THIS LIFE THE 2ND DAY OF FEBRVARY Ao DNI 1622 AND LIETH BV RYD IN THE PARISHE CHVRCH OF ST BOTOPLH IN THAMES STREET BEING AGED 21 YEARES In his will (a copy of which is in Somerset House), dated April 18, 1643, which was proved October 2nd, 1646, he left the bulk of his property to the children of his half-brother George, who had died in 1631. To the poor of Fulham parish, however, he left thirty pounds, to be expended in two-penny loaves, which were to be distributed to thirty poor people every Sunday, after sermon, until the amount was exhausted. His unusual surname is a variant spelling of the more common Sayers. Saris's journals were published in 1900, as The Voyage of Captain John Saris to Japan, 1613, edited by Ernest M. Satow. See also Anglo-Japanese relations List of Westerners who visited Japan before 1868 Notes References Elison, George (1985). "Saris, John." Kodansha Encyclopedia of Japan. Tokyo: Kodansha Ltd. The Voyage of Captain John Saris to Japan, 1613, edited by Sir Ernest M. Satow, "Historical Overview" 2015 Japan 400, 400th Anniversary of Japan-British Relations External links voyage of Captain John Saris to Japan, 1613 (1900) 1580s births 1643 deaths British expatriates in Japan Sailors from London Chief factors British East India Company people 17th-century English people Burials at All Saints Church, Fulham
```javascript import { Map as ImmutableMap, fromJS } from 'immutable'; import { POLLS_IMPORT } from 'mastodon/actions/importer'; import { normalizePollOptionTranslation } from '../actions/importer/normalizer'; import { STATUS_TRANSLATE_SUCCESS, STATUS_TRANSLATE_UNDO } from '../actions/statuses'; const importPolls = (state, polls) => state.withMutations(map => polls.forEach(poll => map.set(poll.id, fromJS(poll)))); const statusTranslateSuccess = (state, pollTranslation) => { return state.withMutations(map => { if (pollTranslation) { const poll = state.get(pollTranslation.id); pollTranslation.options.forEach((item, index) => { map.setIn([pollTranslation.id, 'options', index, 'translation'], fromJS(normalizePollOptionTranslation(item, poll))); }); } }); }; const statusTranslateUndo = (state, id) => { return state.withMutations(map => { const options = map.getIn([id, 'options']); if (options) { options.forEach((item, index) => map.deleteIn([id, 'options', index, 'translation'])); } }); }; const initialState = ImmutableMap(); export default function polls(state = initialState, action) { switch(action.type) { case POLLS_IMPORT: return importPolls(state, action.polls); case STATUS_TRANSLATE_SUCCESS: return statusTranslateSuccess(state, action.translation.poll); case STATUS_TRANSLATE_UNDO: return statusTranslateUndo(state, action.pollId); default: return state; } } ```
```shell Bash history reverse search Rapidly invoke an editor to write a long, complex, or tricky command Find any Unix / Linux command Random password generator Terminal incognito mode ```
```yaml # A config that demonstrates various load balancer options. namers: - kind: io.l5d.fs rootDir: linkerd/examples/io.l5d.fs routers: - protocol: http dtab: | /svc => /#/io.l5d.fs servers: - port: 4140 maxConcurrentRequests: 10000 client: loadBalancer: kind: p2c maxEffort: 10 hostConnectionPool: minSize: 0 maxSize: 1000 idleTimeMs: 10000 maxWaiters: 5000 failureAccrual: kind: io.l5d.successRate successRate: 0.9 requests: 1000 backoff: kind: jittered minMs: 5000 maxMs: 300000 ```
Steven Hughes (born 26 March 1974) is an Australian former professional rugby league footballer who played for the Canterbury-Bankstown Bulldogs in the National Rugby League. Background Hughes is the son of former Canterbury five-eighth Garry Hughes. Both his elder brother, Glen Hughes, and younger brother, Corey Hughes, also played for the club. Playing career Hughes made his first grade debut for Canterbury against the Brisbane Broncos in round 17 1993 at the Queensland Sport and Athletics Centre. Hughes played at centre in Canterbury's 1994 grand final loss to the Canberra Raiders at the Sydney Football Stadium. Hughes missed the entire 1995 ARL season due a knee injury. Canterbury would go on to win their 7th premiership that year defeating Manly-Warringah in the grand final. Hughes then missed the entire 1997 season with a similar injury. In 1998, Hughes played in Canterbury's reserve grade premiership winning side. Hughes had an injury plagued career in the NRL, amassing 70 first-grade games in nine seasons. He retired at the conclusion of the 2001 NRL season having made a total of 185 appearances for Canterbury across all grades. References External links Steven Hughes at Rugby League project 1974 births Living people Australian rugby league players Canterbury-Bankstown Bulldogs players Steven Rugby league centres Rugby league players from Sydney
Discophora, commonly known as the duffers is a genus of butterflies in the family Nymphalidae. The members are confined to India, China and Southeast Asia. Species Discophora bambusae C. & R. Felder, [1867] Discophora celinde (Stoll, [1790]) Discophora deo de Nicéville, 1898 Discophora dodong Schröder & Treadaway, 1981 Discophora lepida (Moore, 1857) Discophora necho C. & R. Felder, [1867] Discophora ogina (Godart, [1824]) Discophora philippina Moore, [1895] Discophora simplex Staudinger, 1889 Discophora sondaica Boisduval, 1836 Discophora timora Westwood, [1850] References External links Images representing Discophora at BOLD Images representing Discophora at EOL Amathusiini Nymphalidae genera Taxa named by Arthur Gardiner Butler
```java package com.fishercoder.solutions.firstthousand; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; public class _146 { public class Solution1 { public class LRUCache { /** * The shortest implementation is to use LinkedHashMap: * specify a size of the LinkedHashMap; * override the removeEldestEntry method when its size exceeds max size: * path_to_url#removeEldestEntry-java.util.Map.Entry- * in the constructor, set the last boolean variable to be true: it means the ordering mode, * if we set it to be true, it means in access order, false, means it's in insertion order: * path_to_url#LinkedHashMap-int-float-boolean- */ private Map<Integer, Integer> cache; private final int max; public LRUCache(int capacity) { max = capacity; cache = new LinkedHashMap<Integer, Integer>(capacity, 1.0f, true) { public boolean removeEldestEntry(Map.Entry eldest) { return cache.size() > max; } }; } public int get(int key) { return cache.getOrDefault(key, -1); } public void put(int key, int value) { cache.put(key, value); } } } public class Solution2 { public class LRUCache { /** * The more verbose solution is to implement a doubly linked list yourself plus a map. * It's very straightforward to implement this, key notes here: path_to_url#gid=0 * (search for the URL of this problem to find it.) */ private class Node { int key; int value; LRUCache.Node prev; LRUCache.Node next; Node(int k, int v) { this.key = k; this.value = v; } Node() { this.key = 0; this.value = 0; } } private int capacity; private int count; private LRUCache.Node head; private LRUCache.Node tail; private Map<Integer, LRUCache.Node> map; // ATTN: the value should be Node type! This is the whole point of having a class called Node! public LRUCache(int capacity) { this.capacity = capacity; this.count = 0;// we need a count to keep track of the number of elements in the cache so // that we know when to evict the LRU one from the cache this.map = new HashMap(); head = new LRUCache.Node(); tail = new LRUCache.Node(); head.next = tail; tail.prev = head; } public int get(int key) { LRUCache.Node node = map.get(key); // HashMap allows value to be null, this is superior to HashTable! if (node == null) { return -1; } else { /**Do two operations: this makes the process more clear: * remove the old node first, and then * just add the node again. * This will guarantee that this node will be at the latest position: * the most recently used position.*/ remove(node); add(node); return node.value; } } public void put(int key, int value) { LRUCache.Node node = map.get(key); if (node == null) { node = new LRUCache.Node(key, value); map.put(key, node); add(node); count++; if (count > capacity) { /** ATTN: It's tail.prev, not tail, because tail is always an invalid node, it doesn't contain anything, it's always the tail.prev that is the last node in the cache*/ LRUCache.Node toDelete = tail.prev; map.remove(toDelete.key); remove(toDelete); count--; } } else { remove(node); node.value = value; add(node); } } private void remove(LRUCache.Node node) { LRUCache.Node next = node.next; LRUCache.Node prev = node.prev; prev.next = next; next.prev = prev; } private void add(LRUCache.Node node) { // ATTN: we'll always add the node into the first position: head.next!!!! LRUCache.Node next = head.next; head.next = node; node.next = next; node.prev = head; next.prev = node; } } } } ```
```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\Dataflow; class WorkerMessage extends \Google\Model { protected $dataSamplingReportType = DataSamplingReport::class; protected $dataSamplingReportDataType = ''; /** * @var string[] */ public $labels; protected $perWorkerMetricsType = PerWorkerMetrics::class; protected $perWorkerMetricsDataType = ''; protected $streamingScalingReportType = StreamingScalingReport::class; protected $streamingScalingReportDataType = ''; /** * @var string */ public $time; protected $workerHealthReportType = WorkerHealthReport::class; protected $workerHealthReportDataType = ''; protected $workerLifecycleEventType = WorkerLifecycleEvent::class; protected $workerLifecycleEventDataType = ''; protected $workerMessageCodeType = WorkerMessageCode::class; protected $workerMessageCodeDataType = ''; protected $workerMetricsType = ResourceUtilizationReport::class; protected $workerMetricsDataType = ''; protected $workerShutdownNoticeType = WorkerShutdownNotice::class; protected $workerShutdownNoticeDataType = ''; protected $workerThreadScalingReportType = WorkerThreadScalingReport::class; protected $workerThreadScalingReportDataType = ''; /** * @param DataSamplingReport */ public function setDataSamplingReport(DataSamplingReport $dataSamplingReport) { $this->dataSamplingReport = $dataSamplingReport; } /** * @return DataSamplingReport */ public function getDataSamplingReport() { return $this->dataSamplingReport; } /** * @param string[] */ public function setLabels($labels) { $this->labels = $labels; } /** * @return string[] */ public function getLabels() { return $this->labels; } /** * @param PerWorkerMetrics */ public function setPerWorkerMetrics(PerWorkerMetrics $perWorkerMetrics) { $this->perWorkerMetrics = $perWorkerMetrics; } /** * @return PerWorkerMetrics */ public function getPerWorkerMetrics() { return $this->perWorkerMetrics; } /** * @param StreamingScalingReport */ public function setStreamingScalingReport(StreamingScalingReport $streamingScalingReport) { $this->streamingScalingReport = $streamingScalingReport; } /** * @return StreamingScalingReport */ public function getStreamingScalingReport() { return $this->streamingScalingReport; } /** * @param string */ public function setTime($time) { $this->time = $time; } /** * @return string */ public function getTime() { return $this->time; } /** * @param WorkerHealthReport */ public function setWorkerHealthReport(WorkerHealthReport $workerHealthReport) { $this->workerHealthReport = $workerHealthReport; } /** * @return WorkerHealthReport */ public function getWorkerHealthReport() { return $this->workerHealthReport; } /** * @param WorkerLifecycleEvent */ public function setWorkerLifecycleEvent(WorkerLifecycleEvent $workerLifecycleEvent) { $this->workerLifecycleEvent = $workerLifecycleEvent; } /** * @return WorkerLifecycleEvent */ public function getWorkerLifecycleEvent() { return $this->workerLifecycleEvent; } /** * @param WorkerMessageCode */ public function setWorkerMessageCode(WorkerMessageCode $workerMessageCode) { $this->workerMessageCode = $workerMessageCode; } /** * @return WorkerMessageCode */ public function getWorkerMessageCode() { return $this->workerMessageCode; } /** * @param ResourceUtilizationReport */ public function setWorkerMetrics(ResourceUtilizationReport $workerMetrics) { $this->workerMetrics = $workerMetrics; } /** * @return ResourceUtilizationReport */ public function getWorkerMetrics() { return $this->workerMetrics; } /** * @param WorkerShutdownNotice */ public function setWorkerShutdownNotice(WorkerShutdownNotice $workerShutdownNotice) { $this->workerShutdownNotice = $workerShutdownNotice; } /** * @return WorkerShutdownNotice */ public function getWorkerShutdownNotice() { return $this->workerShutdownNotice; } /** * @param WorkerThreadScalingReport */ public function setWorkerThreadScalingReport(WorkerThreadScalingReport $workerThreadScalingReport) { $this->workerThreadScalingReport = $workerThreadScalingReport; } /** * @return WorkerThreadScalingReport */ public function getWorkerThreadScalingReport() { return $this->workerThreadScalingReport; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(WorkerMessage::class, 'Google_Service_Dataflow_WorkerMessage'); ```
Samir Houhou (born 7 September 1968) is a retired Algerian football striker and later manager. References 1968 births Living people People from Constantine, Algeria Algerian men's footballers MO Constantine players CR Belouizdad players NA Hussein Dey players CS Constantine players CA Batna players Men's association football forwards Algerian Ligue Professionnelle 1 players Algerian football managers US Biskra managers Algerian Ligue Professionnelle 1 managers 21st-century Algerian people
```yaml # # Starter pipeline # Minimal pipeline to deploy a basic assistant bot that you can customize to build and deploy your code. # Add steps that build, run tests, deploy, and more: # path_to_url # trigger: - none pool: vmImage: ubuntu-latest # Parameters with defaults formatted as $(name) get their values # from variables of that name defined in the Azure DevOps pipeline UI. parameters: - name: azureServiceConnection displayName: Azure service connection type: string default: $(AZURESERVICECONNECTION) - name: botName displayName: Bot name type: string default: $(BOTNAME) - name: microsoftAppId displayName: Bot"s Microsoft app ID type: string default: $(MICROSOFTAPPID) - name: microsoftAppPassword displayName: Bot"s Microsoft app password type: string default: $(MICROSOFTAPPPASSWORD) - name: resourceGroupName displayName: Azure resource group type: string default: $(RESOURCEGROUPNAME) - name: webAppName displayName: Azure web app name type: string default: $(WEBAPPNAME) - name: botProjectDirectory displayName: Relative path to the bot's csproj file (e.g. BasicAssistantCLU/BasicAssistantCLU) type: string default: $(BOTPROJECTDIRECTORY) - name: botProjectName displayName: Bot"s project name (csproj) type: string default: $(BOTPROJECTNAME) - name: buildYamlDirectory displayName: Relative path to the pipeline's .yaml folder (e.g. build/yaml) type: string default: $(BUILDYAMLDIRECTORY) # CLU parameters - name: cluProjectName displayName: CLU Project name type: string default: $(CLUPROJECTNAME) - name: cluEndpoint displayName: CLU Endpoint type: string default: $(CLUENDPOINT) - name: cluEndpointKey displayName: CLU Endpoint key type: string default: $(CLUENDPOINTKEY) - name: cluDeploymentName displayName: CLU Deployment name type: string default: $(CLUDEPLOYMENTNAME) # QnAMaker parameters - name: qnaSubscriptionKey displayName: QnA Maker subscription key type: string default: $(QNASUBSCRIPTIONKEY) - name: qnaEndpointKey displayName: QnA Maker endpoint key type: string default: $(QNAENDPOINTKEY) - name: qnaHostName displayName: QnA Maker host name type: string default: $(QNAHOSTNAME) - name: qnaKnowledgebaseId displayName: QnA Maker knowledgebase ID type: string default: $(QNAKNOWLEDGEBASEID) - name: qnaRegion displayName: QnA Maker region type: string default: $(QNAREGION) steps: # Install prerequisites - template: templates/installPrerequisites.yaml # Build and deploy QnAMaker models - template: templates/buildAndDeployModels.yaml parameters: sourceDirectory: "$(System.DefaultWorkingDirectory)/${{ parameters.botProjectDirectory }}" yamlDirectory: "$(System.DefaultWorkingDirectory)/${{ parameters.buildYamlDirectory }}" botName: "${{ parameters.botName }}" qnaSubscriptionKey: "${{ parameters.qnaSubscriptionKey }}" # Deploy and configure web app - template: templates/buildAndDeployDotNetWebApp.yaml parameters: azureServiceConnection: "${{ parameters.azureServiceConnection }}" webAppName: "${{ parameters.webAppName }}" resourceGroupName: "${{ parameters.resourceGroupName }}" botProjectFile: "$(System.DefaultWorkingDirectory)/${{ parameters.botProjectDirectory }}/${{ parameters.botProjectName }}" botName: "${{ parameters.botName }}" microsoftAppId: "${{ parameters.microsoftAppId }}" microsoftAppPassword: "${{ parameters.microsoftAppPassword }}" cluProjectName: "${{ parameters.cluProjectName }}" cluEndpoint: "${{ parameters.cluEndpoint }}" cluEndpointKey: "${{ parameters.cluEndpointKey }}" cluDeploymentName: "${{ parameters.cluDeploymentName }}" qnaSubscriptionKey: "${{ parameters.qnaSubscriptionKey }}" qnaEndpointKey: "${{ parameters.qnaEndpointKey }}" qnaHostName: "${{ parameters.qnaHostName }}" qnaKnowledgebaseId: "${{ parameters.qnaKnowledgebaseId }}" qnaRegion: "${{ parameters.qnaRegion }}" # Helper to output the working folder directory contents for diagnostics - task: PowerShell@2 displayName: "Dir workspace" continueOnError: true condition: succeededOrFailed() inputs: targetType: "inline" script: | cd .. ls -R ```
```c++ /// Source : path_to_url /// Author : liuyubobobo /// Time : 2023-05-06 #include <iostream> #include <vector> using namespace std; /// Backtrack /// Time Complexity: O(exp) /// Space Complexity: O(R * C) class Solution { private: const int dirs[8][2] = { {-2, -1}, {-2, 1}, {-1, -2}, {-1, 2}, {1, -2}, {1, 2}, {2, -1}, {2, 1} }; public: vector<vector<int>> tourOfKnight(int R, int C, int r, int c) { vector<vector<int>> res(R, vector<int>(C, -1)); dfs(R, C, r, c, 0, res); return res; } bool dfs(int R, int C, int x, int y, int step, vector<vector<int>>& res) { res[x][y] = step; if(step == R * C - 1) return true; for (int i = 0; i < 8; ++i) { int nx = x + dirs[i][0]; int ny = y + dirs[i][1]; if (nx >= 0 && nx < R && ny >= 0 && ny < C && res[nx][ny] == -1) { if(dfs(R, C, nx, ny, step + 1, res)) return true; } } res[x][y] = -1; return false; } }; int main() { return 0; } ```
Warren Emmett Lahr (September 5, 1923 – January 19, 1969) was a professional American football defensive back who played for the Cleveland Browns for 11 seasons, mainly in the 1950s. When he retired, he had the most career interceptions in Browns team history with 44. Lahr grew up in Pennsylvania and starred on the West Wyoming High School football team. After graduating in 1941, he attended Western Reserve University in Cleveland, Ohio and played football for the Red Cats as a reserve in 1942. He then served for three years in the U.S. Navy during World War II. He returned to Western Reserve in 1946 and became a star for the team as a left halfback for two seasons. Lahr was drafted by the Pittsburgh Steelers of the National Football League (NFL) in the 1947 draft. However, he signed with the Browns of the rival All-America Football Conference (AAFC). Lahr sat out the 1948 season with an injured knee, but quickly became a regular on defense the following season. He stayed with the Browns through 1959, a period during which the team won one AAFC championship and three NFL championships after merging into that league in 1950. Lahr has the second-most career interceptions in Browns history, trailing only Thom Darden, who passed him with his 45th and final interception in 1981. After leaving the Browns, Lahr settled in Aurora, Ohio and served as a color commentator for Browns games between 1963 and 1967. He died of a heart attack in 1969 at the age of 45. Early life and college Lahr Grew up in West Wyoming, Pennsylvania, a small town in the eastern part of the state. He attended West Wyoming High School, where he was a standout on the football team. However, West Wyoming did not have a strong team, and Lahr's only college scholarship offer came from Western Reserve University, a small school in Cleveland, Ohio. Lahr graduated in 1941 and enrolled at Western Reserve. Lahr began as a reserve player under Western Reserve head coach Tom Davies in 1942, when he was a sophomore. He played halfback for the Western Reserve Red Cats. However, his college career was interrupted by three years of service in the U.S. Navy during World War II. Lahr returned to Western Reserve in 1946 and had a successful junior season as a left halfback. The Red Cats went undefeated against the three other rival Cleveland schools of the Big Four Conference, and Lahr was named to the 11-member All-Big Four city all-star team after the season. He also won the school's Jack Dempsey Adam Hat trophy for his performance. Lahr figured prominently in Western Reserve's offense as a senior in 1947. He was switched from halfback to quarterback midway through the season. However, the team was less successful than the previous year. After the season, officials at the Mid-American Conference, of which Western Reserve was a member, ruled that Lahr and other players who had served in the war could have an extra year of eligibility to play football. Lahr had exhausted his eligibility by playing in 1942, 1946 and 1947, but was not expected to have enough course credits to graduate until 1949. However, Lahr decided to forgo his extra year at Western Reserve and signed with the Cleveland Browns, a professional team in the All-America Football Conference (AAFC) coached by Paul Brown. Lahr was also selected by the National Football League's Pittsburgh Steelers late in the NFL draft. Professional career Lahr came to the Browns in 1948 as a third-string quarterback, but had to sit out while recovering from a knee injury he suffered before the season began. The Browns went undefeated in 1948 and won a third straight AAFC championship. Lahr's first playing time with the team came in 1949, when Cleveland again won the AAFC championship. Brown came close to cutting Lahr when he made a mistake on defense during a preseason game against the San Francisco 49ers. However, Lahr made the team and started the year as a left halfback. He was switched to safety in the middle of the season and played primarily on defense after Browns starter Cliff Lewis was injured. Substituting for Lewis, Lahr quickly became a regular starter on defense and finished the year with four interceptions. One of his interceptions came at the end of a divisional playoff game against the Buffalo Bills and helped the Browns retain a 24–21 lead. The AAFC dissolved after the 1949 season and the Browns were absorbed by the NFL. Lahr stayed with the team after the transition and was a mainstay of the defensive backfield throughout the 1950s, playing opposite Tommy James. The Browns won the NFL championship in their first year in the league, when Lahr recorded eight interceptions, including two he ran back for touchdowns. He had two interceptions in the Browns' 30–28 win over the Los Angeles Rams in the championship game. Lahr continued to play mainly as a defensive left halfback in the following seasons, although he spent time at safety in 1952 and his final season in 1959. The Browns advanced to the NFL championship each year between 1951 and 1953, but lost once to the Rams and twice to the Detroit Lions. Lahr was named a first-team All-Pro by sportswriters in 1951, when he had five interceptions and returned two of them for touchdowns. His blown coverage on a late-game touchdown catch by Jim Doran of the Lions in the 1953 championship was a major factor in the Browns loss. He was nevertheless named to the Pro Bowl after the season, having made five interceptions and returned them for 119 yards. The Browns repeated as NFL champions in 1954 and 1955 behind a strong defense and an offensive attack led by quarterback Otto Graham. Lahr was named a first-team All-Pro for the second time in 1956. Cleveland reached the NFL championship in 1957, losing to the Lions, and made the playoffs in 1958. Lahr stayed with the Browns through the 1959 season, when he was switched from defensive halfback to safety. He had 44 interceptions in his Browns career, which stood as the record for most team interceptions by a Browns player until it was later broken by Thom Darden. He also ran back five interceptions for touchdowns, which remains a team record. Later life and death After retiring from football, Lahr settled in Aurora, Ohio and served as the color commentator alongside announcer Ken Coleman for Browns games broadcast on WJW channel 8 in Cleveland between 1963 and 1967. He was dropped when CBS made changes to its broadcasting lineup in 1968, but continued to work on preseason games. He also worked as a sales agent for Lax Industries in Cleveland and ran a sporting goods business with his close friend Ed Lewis, the athletic director at Adelbert College, which was part of Western Reserve. Lahr died unexpectedly of a heart attack in 1969, when he was 45 years old. He had recently passed a physical examination, but had come down with the flu the previous week. He and his wife, Rowena, had five daughters. In 2008, Lahr was named a Browns Legend, an honor given by the franchise to a selection of the best players in its history. References Bibliography External links Lahr 29th on Plain Dealer list of Cleveland Browns' greatest players 1923 births 1969 deaths American football defensive backs Case Western Spartans football players Cleveland Browns announcers Cleveland Browns (AAFC) players Cleveland Browns players Eastern Conference Pro Bowl players National Football League announcers People from Aurora, Ohio Players of American football from Luzerne County, Pennsylvania United States Navy personnel of World War II
The Cichlid Room Companion (CRC) is a membership-based webpage dedicated to the fishes of the Cichlid family (Cichlidae). The site was launched in May 1996 and offers arguably the most comprehensive authoritative catalogue of cichlids on the web, which is illustrated with more than 25,000 photographs of fishes and 2,000 of habitats, as well as over 300 videos of cichlids and their habitats. It also “offers access to ample information about 253 genera and 2371 species”, a discussion forum as well as many articles about taxonomy, natural history, fish-keeping, field accounts, conservation, and other cichlid related topics; mostly written by citizen scientists and people who specialize in cichlids. The species summaries provided in the form of profiles include taxonomic, distribution and habitat, distribution maps, conservation, natural history, captive maintenance, images, videos, collection records, and an extensive bibliography of the species included and have been prepared by world-class specialists. A document establishes the standards followed in the preparation and maintenance of the cichlid catalogue. The site is administered by its creator and editor, Juan Miguel Artigas-Azas, a naturalist, who is also an aquarist and a nature photographer. In 2008, the American Cichlid Association (ACA) awarded Artigas-Azas the Guy Jordan Retrospective Award, which is the maximum honor that association gives to people who have done extensive contribution to the international cichlid hobby. Contributions to public understanding of science In the past decade, the Internet has fundamentally transformed the relationships between the scientific community and society as a whole, as the boundaries between public and private, professionals and hobbyists fade away; allowing for a wider range of participants to engage with science in unprecedented ways. The educational and citizens science task of the CRC has been acknowledged in the formal scientific literature, both as a source of data, information, and awareness among fish hobbyists about topics like the threat of releases of invasive species from domestic aquaria, as well as promoting ethical behavior in the fish hobby. Furthermore, while for the most part, the CRC is a popular resource, a number of articles in it have some academic value, and have been cited as primary sources in the scholarly literature. Criticism Biological systematics is a scientific discipline, which requires scientific training. It is often professed in the scientific community that reliable contention of scientific papers is restricted to scientific publications, that are backed up with scientific facts. "Hobby publications are non-scientific literature", and the scholarly use or discussion of names and other nomenclatural acts "dropped in the hobby is entirely questionable". Hobby articles, both printed and electronic, are usually published on the approval of the editors, whereas in a scientific journal, by contrast, all articles are peer reviewed. Moreover, in the case of the CRC, the site is not edited by a person educated in systematics or with an advanced degree in ichthyology or a related field. As of January, 2015, the catalogue section in the CRC displayed a disclaimer stating that they are "not to be considered as published in the sense of the Code, and statements made therein are not made available for nomenclatural purposes". Even so, the site has been criticized for censoring taxonomic information based on its editor's arbitrary, personal, subjective views (e.g. the synonymy of Paraneetroplus and Vieja sensu McMahan et al. 2010 (prior to 2015); the validity of Maylandia Meyer & Foerster 1984 vs its junior synonym Metriaclima Stauffer, J. R., Jr. and K. A. Kellogg 2002; the split of genus Nosferatu De la Maza-Benignos, et al. 2014 from Herichthys,; or the recent review of the taxonomy and systematics of the herichthyns;), on the basis of an anticonventional argument that official, in the sense of the Code, nomenclatural acts are not “mandatory” (see editor's comments). Some of the views have been corroborated by the scientific community, as has been the case of the genus Nosferatu that that is considered a junior synonym of Herichthys, while the synonymy of Vieja and Paraneetroplus was not initially accepted in 2015 in the CRC although, in 2016, it was proven that the genera are not synonymous. References External links Ichthyology Cichlidae Fishkeeping Animal and pet magazines Online magazines published in the United States Electronic publishing Hobby magazines published in the United States Magazines established in 1997
Gabriel Santos may refer to: Gabriel Joaquim dos Santos (1892-1985), Brazilian salt worker and architect Gabriel Santos (footballer, born 1983), Brazilian football centre-back Gabriel Santos (swimmer) (born 1996), Brazilian swimmer Gabriel Santos (footballer, born 1999), Brazilian football forward
Roseway (1916 – 1936) was a British Thoroughbred racehorse and broodmare. She showed promise as a juvenile in 1918 when she won twice and was second twice from seven starts. In the following spring she produced by far her best performance when she won the 1000 Guineas by six lengths. She finished second when odds-on favourite for the Oaks Stakes but ran poorly in two subsequent races and was retired from racing at the end of the year. She had some success as a broodmare both in Britain and in the United States. Background Roseway was a brown mare bred and owned by the newspaper proprietor Edward Hulton. She was trained by Frank Hartigan at Weyhill in Hampshire. Her sire Stornoway was at his best as a two-year-old in 1913 when his wins included the Gimcrack Stakes. He ran only once subsequently and sired Roseway in his first season at stud. Roseway's dam Rose of Ayrshire produced several good broodmares and was the female-line ancestor of the Irish Derby winner Steel Pulse and the Argentinian champion Telescopico. Racing career 1918: two-year-old season Roseway began her racecourse career at Newmarket Racecourse in June when she won the Home-bred Two-year-old Plate. In the following month at the same track she followed up by taking the Isleham Plate from Sunny Rhyme. Her two wins that summer earned her owner a total of £589. On her return at Newmarket in October she started 15/8 second favourite for the Buckenham Stakes and finished second, beaten a head by Lord Basil, a highly-rated colt from the Alec Taylor, Jr. stable. In the course of the season, Roseway also finished second in the Barton Mills Nursery Handicap and ran unplaced on three occasions. 1919: three-year-old season On 9 May, Roseway started the 2/1 favourite ahead of fourteen opponents for the 106th running of the 1000 Guineas over the Rowley Mile course. Ridden by Albert "Snowy" Whalley she won by six lengths from Britannia with Glaciale a length and a half away in third place. Roseway's winning margin was the second widest of the 20th century, behind only Humble Duty's seven length win in 1970. Steve Donoghue took the ride when Roseway started the 4/7 favourite for the Oaks Stakes over one and a half miles at Epsom Racecourse on 6 June. She took the lead in the straight but was overtaken inside the final furlong and was beaten one and a half lengths by Bayuda. At Royal Ascot later in June, Roseway was beaten by the King's colt Viceroy in the Waterford Stakes over one mile. In July she started the 8/13 favourite for the Falmouth Stakes at Newmarket but finished last of the five runners behind Tomatina. By the end of July the filly had earned £4,814 in prize money. Roseway reportedly became "unreliable" in late 1919 and at the end of the year Hulton sold her to Sir George Greenhill who retired her from racing to become a broodmare. Assessment and honours In their book, A Century of Champions, based on the Timeform rating system, John Randall and Tony Morris rated Roseway a "poor" winner of the 1000 Guineas. Breeding record Roseway produced at least two foals in Britain and at least six more after her export to the United States. Roseway died in 1936. Roseola, a black filly, foaled in 1923, sired by Swynford. Dam of Tornado, winner of the Prix Lupin, Prix des Sablons, Prix Jean Prat. Heatherway, brown colt, 1924, by Craig an Eran Phalara (USA), brown filly, 1926, by Phalaris Arbor (USA), chestnut filly, 1930, by Fair Play Entwine (USA), bay mare, 1932, by Chance Shot Rushaway (USA), black gelding, 1933 by Haste. Won Illinois Derby, Latonia Derby, Louisiana Derby. Queen Full (USA), chestnut filly, 1934 by Jack High Hard Times (USA), brown colt, 1936 by Sickle Pedigree Roseway was inbred 3 × 4 to Hampton, meaning that this stallion appears in both the third and fourth generations of her pedigree. She was also inbred 4 × 4 to Galopin. References 1916 racehorse births 1936 racehorse deaths Racehorses bred in the United Kingdom Racehorses trained in the United Kingdom Thoroughbred family 1-s 1000 Guineas winners
Aleksandr Krotov may refer to: Aleksandr Krotov (footballer, born 1895), Russian football player Alyaksandr Krotaw (born 1995), Belarusian football player
```c #define UNW_LOCAL_ONLY #include <libunwind.h> #if !defined(UNW_REMOTE_ONLY) #include "Gia64-test-nat.c" #endif ```
The Congress Street Bridge carries NY 2 across the Hudson River connecting Watervliet, New York with Troy, New York. The bridge has slated improvements to bring multimodal transportation to this bridge. See also List of fixed crossings of the Hudson River References Bridges over the Hudson River Bridges in Rensselaer County, New York Road bridges in New York (state) Steel bridges in the United States Girder bridges in the United States
Dibamus celebensis is a legless lizard endemic to Sulawesi. References Dibamus Reptiles of Indonesia Reptiles described in 1858
The Gachado Well was excavated between 1917 and 1919 near the Arizona-Mexico border in Pima County, Arizona. Named after a stooped mesquite tree, the well served a ranch owned by Lonald Blankenship. The line camp and water rights were sold in 1919 to Robert Louis Gray, who built an adobe house at the site in 1930. The house became a line camp, a bunkhouse for cowboys on the range in that area. The camp was used until 1976, when the Grays discontinued ranching. The site is located within Organ Pipe Cactus National Monument. It is accessible via the rough, unpaved Camino de Dos Republicas, which also leads to Dos Lomitas Ranch, another Gray family property. The site was placed on the National Register of Historic Places on November 2, 1978. See also Bates Well Ranch, another of the Gray family ranches in Organ Pipe Cactus National Monument References External links National Register of Historic Places in Organ Pipe Cactus National Monument Buildings and structures completed in 1917 Historic American Buildings Survey in Arizona
```yaml id: Ticket Management - Generic version: -1 name: Ticket Management - Generic description: "`Ticket Management - Generic` allows you to open new tickets or update comments to the existing ticket in the following ticketing systems:\n-ServiceNow \n-Zendesk \nusing the following sub-playbooks:\n-`ServiceNow - Ticket Management`\n-`Zendesk - Ticket Management`" starttaskid: "0" tasks: "0": id: "0" taskid: 8e482cde-8abb-4c9d-86a5-15c8ce3f7aa7 type: start task: id: 8e482cde-8abb-4c9d-86a5-15c8ce3f7aa7 version: -1 name: "" iscommand: false brand: "" description: '' nexttasks: '#none#': - "19" separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 430, "y": -280 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "2": id: "2" taskid: f9e4560c-d621-4bf8-8849-f00beaa70d70 type: playbook task: id: f9e4560c-d621-4bf8-8849-f00beaa70d70 version: -1 name: ServiceNow - Ticket Management description: '`ServiceNow - Ticket Management` allows you to open new tickets or update comments to the existing ticket using the playbook''s tasks. ' playbookName: ServiceNow - Ticket Management type: playbook iscommand: false brand: "" nexttasks: '#none#': - "12" scriptarguments: Action: complex: root: Action CommentToAdd: complex: root: inputs.CommentToAdd addCommentPerEndpoint: complex: root: inputs.addCommentPerEndpoint description: complex: root: inputs.description serviceNowAssignmentGroup: complex: root: inputs.serviceNowAssignmentGroup serviceNowCategory: complex: root: inputs.serviceNowCategory serviceNowImpact: complex: root: inputs.serviceNowImpact 'serviceNowSeverity ': complex: root: inputs.serviceNowSeverity serviceNowShortDescription: complex: root: inputs.serviceNowShortDescription serviceNowTicketID: complex: root: parentIncidentContext accessor: ServiceNowTicketID serviceNowTicketType: complex: root: inputs.serviceNowTicketType serviceNowUrgency: complex: root: inputs.serviceNowUrgency separatecontext: true continueonerrortype: "" loop: iscommand: false exitCondition: "" wait: 1 max: 100 view: |- { "position": { "x": 230, "y": 350 } } note: false timertriggers: [] ignoreworker: false skipunavailable: true quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "3": id: "3" taskid: bc8a5228-c2b8-46af-8e21-d7687a8edffe type: playbook task: id: bc8a5228-c2b8-46af-8e21-d7687a8edffe version: -1 name: Zendesk - Ticket Management description: '`Zendesk - Ticket Management` allows you to open new tickets or update comments to the existing ticket using the playbook''s tasks. ' playbookName: Zendesk - Ticket Management type: playbook iscommand: false brand: "" nexttasks: '#none#': - "11" scriptarguments: Action: complex: root: Action CommentToAdd: complex: root: inputs.CommentToAdd ZendeskAssigne: complex: root: inputs.ZendeskAssigne ZendeskCollaborators: complex: root: inputs.ZendeskCollaborators ZendeskPriority: complex: root: inputs.ZendeskPriority ZendeskRequester: complex: root: inputs.ZendeskRequester ZendeskStatus: complex: root: inputs.ZendeskStatus ZendeskSubject: complex: root: inputs.ZendeskSubject ZendeskTags: complex: root: inputs.ZendeskTags ZendeskTicketID: complex: root: parentIncidentContext accessor: ZendeskTicketID ZendeskType: complex: root: inputs.ZendeskType addCommentPerEndpoint: complex: root: inputs.addCommentPerEndpoint description: complex: root: inputs.description separatecontext: true continueonerrortype: "" loop: iscommand: false exitCondition: "" wait: 1 max: 100 view: |- { "position": { "x": 660, "y": 350 } } note: false timertriggers: [] ignoreworker: false skipunavailable: true quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "4": id: "4" taskid: 66b87a8c-c5a1-489c-8cef-ea4c198faa4e type: title task: id: 66b87a8c-c5a1-489c-8cef-ea4c198faa4e version: -1 name: Done type: title iscommand: false brand: "" description: '' separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 870, "y": 950 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "11": id: "11" taskid: 159abeff-fe4e-42fc-8be0-67f4ba0f245b type: regular task: id: 159abeff-fe4e-42fc-8be0-67f4ba0f245b version: -1 name: Set Zendesk Ticket ID description: |- Sets the `ZendeskTicketID` key to the incident's context. If the output `Zendesk.Ticket.id` from sub-playbook `Zendesk - Ticket Management` is defined, set the ticket ID to the `ZendeskTicketID` key in the incident context else set the value of the `ZendeskTicketID` key as empty on the incident's context. script: Builtin|||setParentIncidentContext type: regular iscommand: true brand: Builtin nexttasks: '#none#': - "13" scriptarguments: key: simple: ZendeskTicketID value: complex: root: alert accessor: id transformers: - operator: If-Then-Else args: condition: value: simple: lhs==rhs conditionB: {} conditionInBetween: {} else: value: simple: Zendesk.Ticket.id iscontext: true equals: {} lhs: value: simple: Zendesk.Ticket.id iscontext: true lhsB: {} options: {} optionsB: {} rhs: {} rhsB: {} then: {} separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 660, "y": 530 } } note: false timertriggers: [] ignoreworker: false skipunavailable: true quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "12": id: "12" taskid: a27c8fa0-c258-41db-84e9-8b93a26c1623 type: regular task: id: a27c8fa0-c258-41db-84e9-8b93a26c1623 version: -1 name: Set ServiceNow Ticket ID description: |- Sets the `ServiceNowTicketID` key to the incident's context. If the output `ServiceNow.Ticket.ID` from sub-playbook `ServiceNow - Ticket Management` is defined, set the ticket ID to the `ServiceNowTicketID` key in the incident context else set the value of the `ServiceNowTicketID` key as empty on the incident's context. script: Builtin|||setParentIncidentContext type: regular iscommand: true brand: Builtin nexttasks: '#none#': - "13" scriptarguments: key: simple: ServiceNowTicketID value: complex: root: alert accessor: id transformers: - operator: If-Then-Else args: condition: value: simple: lhs==rhs conditionB: {} conditionInBetween: {} else: value: simple: ServiceNow.Ticket.ID iscontext: true equals: {} lhs: value: simple: ServiceNow.Ticket.ID iscontext: true lhsB: {} options: {} optionsB: {} rhs: {} rhsB: {} then: {} separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 230, "y": 530 } } note: false timertriggers: [] ignoreworker: false skipunavailable: true quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "13": id: "13" taskid: 4d9c9b8f-0747-4eb0-8474-99316ead7621 type: regular task: id: 4d9c9b8f-0747-4eb0-8474-99316ead7621 version: -1 name: 'Set Endpoint hostname from alerts ' description: |- Sets the `Endpoint` key to the incident's context. If the alert.hostname is defined on the alert context , set the hostname to the `Endpoint` key in the incident context else set the value `There is no hostname in the alert` to the incident's context. script: Builtin|||setParentIncidentContext type: regular iscommand: true brand: Builtin nexttasks: '#none#': - "4" scriptarguments: key: simple: Endpoint value: complex: root: alert accessor: id transformers: - operator: If-Then-Else args: condition: value: simple: lhs==rhs conditionB: {} conditionInBetween: {} else: value: simple: alert.hostname iscontext: true equals: {} lhs: value: simple: alert.hostname iscontext: true lhsB: {} options: {} optionsB: {} rhs: {} rhsB: {} then: value: simple: There is no hostname in the alert separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 440, "y": 760 } } note: false timertriggers: [] ignoreworker: false skipunavailable: true quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "16": id: "16" taskid: c8d353d1-1319-420f-8831-8d04cb40effd type: regular task: id: c8d353d1-1319-420f-8831-8d04cb40effd version: -1 name: Set key to open a ticket description: Set a value in context under the key you entered. scriptName: Set type: regular iscommand: false brand: "" nexttasks: '#none#': - "18" scriptarguments: key: simple: Action value: simple: NewTicket separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 640, "y": 40 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "17": id: "17" taskid: 2e759af3-962e-48ad-8493-c4052d84f866 type: regular task: id: 2e759af3-962e-48ad-8493-c4052d84f866 version: -1 name: Set key to add a comment description: Set a value in context under the key you entered. scriptName: Set type: regular iscommand: false brand: "" nexttasks: '#none#': - "18" scriptarguments: key: simple: Action value: simple: AddComment separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 210, "y": 40 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "18": id: "18" taskid: 0be81a91-6f8f-488c-8cdc-9df4684fe290 type: title task: id: 0be81a91-6f8f-488c-8cdc-9df4684fe290 version: -1 name: Ticket Management type: title iscommand: false brand: "" description: '' nexttasks: '#none#': - "2" - "3" separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 430, "y": 210 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "19": id: "19" taskid: 043ae1ef-de8c-490b-8526-cb5fdd8f521b type: condition task: id: 043ae1ef-de8c-490b-8526-cb5fdd8f521b version: -1 name: Open a new ticket or comment on existing ticket description: Whether to open a new ticket or comment on an existing ticket. type: condition iscommand: false brand: "" nexttasks: '#default#': - "4" Add comment: - "17" New Ticket: - "16" separatecontext: false conditions: - label: New Ticket condition: - - operator: isEmpty left: value: complex: root: parentIncidentContext accessor: ServiceNowTicketID iscontext: true right: value: {} - - operator: isEmpty left: value: complex: root: parentIncidentContext accessor: ZendeskTicketID iscontext: true - label: Add comment condition: - - operator: isNotEmpty left: value: complex: root: parentIncidentContext accessor: ZendeskTicketID iscontext: true - operator: isNotEmpty left: value: complex: root: parentIncidentContext accessor: ServiceNowTicketID iscontext: true - - operator: notIn left: value: complex: root: alert accessor: hostname iscontext: true right: value: simple: parentIncidentContext.Endpoint iscontext: true continueonerrortype: "" view: |- { "position": { "x": 430, "y": -140 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false view: |- { "linkLabelsPosition": {}, "paper": { "dimensions": { "height": 1295, "width": 1040, "x": 210, "y": -280 } } } inputs: - key: serviceNowShortDescription value: {} required: false description: A short description of the ticket. playbookInputQuery: - key: serviceNowImpact value: {} required: false description: The impact for the new ticket. Leave empty for ServiceNow default impact. playbookInputQuery: - key: serviceNowUrgency value: {} required: false description: The urgency of the new ticket. Leave empty for ServiceNow default urgency. playbookInputQuery: - key: serviceNowSeverity value: {} required: false description: The severity of the new ticket. Leave empty for ServiceNow default severity. playbookInputQuery: - key: serviceNowTicketType value: {} required: false description: The ServiceNow ticket type. Options are "incident", "problem", "change_request", "sc_request", "sc_task", or "sc_req_item". Default is "incident". playbookInputQuery: - key: serviceNowCategory value: {} required: false description: The category of the ServiceNow ticket. playbookInputQuery: - key: serviceNowAssignmentGroup value: {} required: false description: The group to which to assign the new ticket. playbookInputQuery: - key: ZendeskPriority value: {} required: false description: The urgency with which the ticket should be addressed. Allowed values are "urgent", "high", "normal", or "low". playbookInputQuery: - key: ZendeskRequester value: {} required: false description: The user who requested this ticket. playbookInputQuery: - key: ZendeskStatus value: {} required: false description: The state of the ticket. Allowed values are "new", "open", "pending", "hold", "solved", or "closed". playbookInputQuery: - key: ZendeskSubject value: {} required: false description: The value of the subject field for this ticket. playbookInputQuery: - key: ZendeskTags value: {} required: false description: The array of tags applied to this ticket. playbookInputQuery: - key: ZendeskType value: {} required: false description: The type of this ticket. Allowed values are "problem", "incident", "question", or "task". playbookInputQuery: - key: ZendeskAssigne value: {} required: false description: The agent currently assigned to the ticket. playbookInputQuery: - key: ZendeskCollaborators value: {} required: false description: The users currently CC'ed on the ticket. playbookInputQuery: - key: description value: {} required: false description: The ticket description. playbookInputQuery: - key: addCommentPerEndpoint value: simple: "True" required: false description: 'Whether to append a new comment to the ticket for each endpoint in the incident. Possible values: True/False.' playbookInputQuery: - key: CommentToAdd value: {} required: false description: Comment for the ticket. playbookInputQuery: outputs: - contextPath: ServiceNow.Ticket.ID description: ServiceNow ticket ID. - contextPath: Zendesk.Ticket.id description: Zendesk ticket ID. tests: - No tests (auto formatted) marketplaces: - marketplacev2 fromversion: 6.8.0 ```
Thomas Hutcheson Bass (January 11, 1927 – March 3, 2019) was a Texas politician, professor, and third-generation Houstonian. In addition to his many years teaching at the high school and university level, he served in the House of Representatives and in Harris County government. He was one of the founding members of the "Dirty Thirty" and served in the Texas House of Representatives from 1963 until his election as Harris County Commissioner in 1974. In 1984, as a result of his flood control efforts while county commissioner, Tom Bass Regional Park was dedicated in his name. He left the Commissioner's Court in 1985 and helped in the successful adoption of the first 9-1-1 District in Texas; in 2008, the Greater Harris County 9-1-1 building was opened and named the Tom Bass Building in his honor. His remains are interred at Texas State Cemetery in Austin. Early life and education Bass was born and reared in Houston, Texas. Bass attended Holy Rosary School in what is now Midtown, and graduated from St. Thomas High School, where he would later teach, in 1944. He graduated from the University of Texas in three years, completing his bachelor's degree in 1950. Bass married his wife, Mary Ann King, in 1950, and together they reared ten children. Following graduation, he joined the U.S. Army and served on active duty and in the Army Reserve for 36 years, retiring as a colonel in 1980. Following active duty, Bass earned a Master of Arts from the University of Texas in 1950 and a Master of Education from the University of Houston in 1958. Political career Bass’ political career began in 1962, when he ran for a newly created state representative seat. His decision to seek election was spawned out of President John F. Kennedy's successful presidential campaign. Kennedy's election broke a long-standing barrier for Catholics seeking political office; Bass believed that if Kennedy could win an election as a Catholic, so could he. House of Representatives and the "Dirty Thirty" Bass served in the Texas House of Representatives for 10 years, serving as a committee chairman for three sessions and the Harris County Delegation Chairman for two sessions. As a member of the "Dirty Thirty" during the Sharpstown Scandal, Bass worked on legislation for reform laws to prevent government wrongdoing. As a result of his stance against House Speaker Gus Mutscher, Bass felt that he had little chance for being re-elected as a state representative. Instead, he ran successfully against incumbent Kyle Chapman, for the position of Harris County Commissioner for Precinct 1. Harris County Commissioner As county commissioner from 1973 to 1985, Bass worked hard for strong financial disclosure and ethics rules for all county officials and a redistricting of the commissioner precincts that allowed the first minority to be elected as a Harris County Commissioner. Bass "saw that the county's elected leaders increasingly failed to resemble the demographics of the rapidly growing, diverse region." Rather than run for a fourth term as county commissioner, Bass stepped down and El Franco Lee was ultimately elected as Harris County's first minority commissioner. Lee held the office for more than 30 years, until his death in 2016. Bass subsequently ran, unsuccessfully, for the U.S. Congress. 9-1-1 and other contributions One of Bass' most lasting achievements was the acquisition of 635 acres of riparian corridor along Clear Creek, which forms the southern boundary of Harris County. By conserving this greenbelt, Bass prevented the commercial development of this flood-prone area. In 1984, the park was named Tom Bass Regional Park. Following his time in office, Bass helped to establish the Greater Harris County 9-1-1 Emergency Network in 1983, and continued to serve as the head of its board of managers. The 9-1-1 Headquarters Building was renamed the Tom Bass Building in 2008 to honor Bass’ contributions. Bass served on the board of the Visiting Nurses Association, represented Harris County at the Texas Silver Haired Legislature, and volunteered at Villa de Mantel. Teaching Bass spent much of his life as a teacher. He taught in the Houston Independent School District for eight years, and in his later life served as an adjunct professor at the University of Houston, University of St. Thomas, and Texas Southern University. He was Professor Emeritus of the department of political science at University of St. Thomas. References External links http://www.sths.org/about/hallofhonor/basst.html http://www.co.harris.tx.us/comm_lee/ptbassi/index.htm—dead link Bass, Tom and Louis Marchiafava. Tom Bass Oral History, Houston Oral History Project, April 11, 1975. 1927 births 2019 deaths County commissioners in Texas Members of the Texas House of Representatives University of Houston alumni
The Order of Saint Stephen (officially Sacro Militare Ordine di Santo Stefano Papa e Martire, 'Holy Military Order of St. Stephen Pope and Martyr') is a Roman Catholic Tuscan dynastic military order founded in 1561. The order was created by Cosimo I de' Medici, first Grand Duke of Tuscany. The last member of the Medici dynasty to be a leader of the order was Gian Gastone de Medici in 1737. The order was permanently abolished in 1859 by the annexation of Tuscany to the Kingdom of Sardinia. The former Kingdom of Italy and the current Italian Republic also did not recognize the order as a legal entity but tolerates it as a private body. History The order was founded by Cosimo I de' Medici, first Grand Duke of Tuscany, with the approbation of Pope Pius IV on 1 October 1561. The rule chosen was that of the Benedictine Order. The first grand master was Cosimo himself and he was followed in that role by his successors as grand duke. The dedication to the martyred Pope Stephen I, whose feast day is 2 August, derives from the date of Cosimo's victories at the Battle of Montemurlo on 1 August 1537 and the Battle of Marciano (Scannagallo) on 2 August 1554. The objective of the order was to fight the Ottoman Turks and the pirates that sailed Mediterranean Sea in the 16th century. The Turks and the pirates were making dangerous inroads on the coast of the Tyrrhenian Sea where Cosimo had recently inaugurated the new port of Livorno. Cosimo also needed a symbolic fight to unite the nobility of the different cities that combined to form his new grand duchy (including Florence and Siena), and to demonstrate his support of the Roman Catholic Church. Finally, the creation of a Tuscan military order would also strengthen the prestige, both internal and international, of Cosimo's new state. In its early years, the Order took part successfully in the Spanish wars against the Ottomans, being present at the siege of Malta (1565), the Battle of Lepanto (1571) and the 1607 capture of Annaba in Algeria by the then admiral Jacopo Inghirami. They burned the city, killed 470 people and took 1,500 captives. After its aggressive capabilities had been recognized, the Order concentrated on the defence of the Mediterranean coasts against Turkish and African pirates. In particular, the Knights made some incursions into the Aegean Islands controlled by the Turks, and took part in the campaigns in Dalmatia, Negroponte and Corfu. The organization peaked in the early 17th century, when it counted 600 knights and 2,000 other soldiers, sailors, and oarsmen. Of the 3,756 knights who served in the organization between 1562 and 1737, 68 percent were Tuscans, 28 percent came from neighboring Italian states (mostly the Papal States), and 4 percent came from elsewhere. After 1640, military involvement was reduced. The Order concentrated on the coastal defence and on ordnance duties, but did not avoid the chance to send help to the Republic of Venice, then engaged in a desperate war against the Ottoman Empire. The order's last military action dates from 1719. Grand Duke Peter Leopold of Tuscany promoted a reorganization of the order, turning it into an institute for education of the Tuscan nobility. On 7 March 1791, six months after becoming Emperor, Leopold abdicated the Grand Duchy to his younger son, Ferdinand III, the founder of the present Grand Ducal House. Although Ferdinand was the first European sovereign to recognize the French Republic, he was forced to submit to the French authorities who occupied the Grand Duchy in 1799. He abdicated both the Grand Duchy and the Grand Magistery of Saint Stephen. The order survived during the short-lived Kingdom of Etruria. Following the restoration of Ferdinand III in 1814, the revival of the Order was proposed. By a decree dated 1815 the Ripristinazione dell'Ordine dei Cavalieri di S. Stefano was proclaimed. The Order was again dissolved in 1859, when Tuscany was annexed to the Kingdom of Sardinia. Currently The descendants of the former Tuscan ruling family maintain that the Order of Saint Stephen was a religious and dynastic institution not subject to dissolution by the Italian authorities. Today, Archduke Sigismund, Grand Duke of Tuscany awards an Order of Saint Stephen which he claims to be a continuation of the order founded by Grand Duke Cosimo I. Approximately 80 individuals are currently associated with this order. All members must be Roman Catholic, although exceptions are made for Heads of State and members of royal families who are members of the other Christian denominations. Eligibility To join the Order a postulant had to be at least eighteen years of age, able to meet the financial obligations of membership, make the necessary noble proofs and not be descended from heretics. The initial seat of the order was on Elba before moving to Pisa. The Knights' Square in Pisa, on which their palace faces, is named after the Order. The Coat of Arms include a red cross with eight points, flanked by golden lilies. Knights of Grace The following have been designated Knights of Grace of the Order of Saint Stephen: Alfred I, Prince of Windisch-Grätz Vincenzo Antinori Archduke Charles Stephen of Austria Ernst I, Duke of Saxe-Altenburg Ferdinand III, Grand Duke of Tuscany Archduke Franz Salvator of Austria Archduke Johann Salvator of Austria Archduke Joseph Ferdinand of Austria Archduke Karl Salvator of Austria Archduke Leopold Ferdinand of Austria Leopold II, Grand Duke of Tuscany Giovanni Pacini Archduke Peter Ferdinand of Austria References Gregor Gatscher-Riedl, Mario Strigl, Die roten Ritter. Zwischen Medici, Habsburgern und Osmanen. Die Orden und Auszeichnungen des Großherzogtums Toskana. Vienna 2014. . External links 1561 establishments in Italy Dynastic orders Orders, decorations, and medals of Tuscany Catholic orders of chivalry History of Pisa History of Tuscany Christianity in Tuscany Military orders (monastic society)
The Boston Burglar (Roud 261) was a number one hit in the Irish Charts for Johnny McEvoy in 1967. It is a transportation ballad commonly assumed to have been adapted in America from the sea shanty The Whitby Lad / Botany Bay. before the 20th century. The filk song Banned from Argo's tune was based on this song. Synopsis The story tells of a young man who has been well brought up but turns to crime in the city of Boston, in America. Caught, tried and sentenced the man is placed on train to Charlestown, and warns people to be lawful so to not end up incarcerated like him. References Notes Footnotes Sources Boston Burglar, The Year of song unknown [[Category:1967 singles]] Songwriter unknown
```javascript const { assert, skip, test, module: describe, only } = require('qunit'); const { GPU } = require('../../../../../../../src'); describe('feature: to-string single precision array style kernel map returns 2D Array'); function testReturn(mode, context, canvas) { const gpu = new GPU({ mode }); function addOne(value) { return value + 1; } const originalKernel = gpu.createKernelMap([addOne], function(a) { const result = a[this.thread.x] + 1; addOne(result); return result; }, { canvas, context, output: [2, 2], precision: 'single', }); const a = [1, 2, 3, 4, 5, 6]; const expected = [ new Float32Array([2, 3]), new Float32Array([2, 3]), ]; const expectedZero = [ new Float32Array([3, 4]), new Float32Array([3, 4]), ]; const originalResult = originalKernel(a); assert.deepEqual(originalResult.result, expected); assert.deepEqual(originalResult[0], expectedZero); const kernelString = originalKernel.toString(a); const newResult = new Function('return ' + kernelString)()({ context })(a); assert.deepEqual(newResult.result, expected); assert.deepEqual(newResult[0], expectedZero); gpu.destroy(); } (GPU.isSinglePrecisionSupported && GPU.isWebGLSupported ? test : skip)('webgl', () => { const canvas = document.createElement('canvas'); const context = canvas.getContext('webgl'); testReturn('webgl', context, canvas); }); (GPU.isSinglePrecisionSupported && GPU.isWebGL2Supported ? test : skip)('webgl2', () => { const canvas = document.createElement('canvas'); const context = canvas.getContext('webgl2'); testReturn('webgl2', context, canvas); }); (GPU.isSinglePrecisionSupported && GPU.isHeadlessGLSupported ? test : skip)('headlessgl', () => { testReturn('headlessgl', require('gl')(1, 1), null); }); test('cpu', () => { testReturn('cpu'); }); ```
Jock the Leg and the Merry Merchant is Child ballad 282. The ballad tells of a merchant who defends himself from a thief. The story is similar to those of Robin Hood, except that the merchant does not join the band of thieves. Synopsis Jock the Leg and a merchant meet. As they come across a tavern-house, Jock tries to get him to pay his way. In the middle of the night, Then Jock wakes him and tells him they should be on their way. The merchant says he cannot go by Barnisdale or Coventry, fearing Jock will rob him. Jock says he will protect him, though he eventually tries to rob the merchant. The two fight until bloody, and Jock persuades him to let him blow his horn. This summons his 24 bowmen. The merchants challenges them. If six bowmen and Jock fight him and are able to get him one foot from his pack, he will give it to them. The merchant grabs the pack, wields a broadsword, and defeats all seven. Jock invites the merchant to have him join them. Refusing to join the "robber-band," the merchant parts, promising to call Jock a thief if they ever meet again. Commentary This story matches many Robin Hood ballads, in which Robin meets and fights a stranger. Unlike Robin, Jock's summoning his men with his horn does not end the fray, and the stranger rejects his invitation. See also List of the Child Ballads Scottish mythology English folklore References External links Jock the Leg and the Merry Merchant Child Ballads Border ballads Northumbrian folklore Anglo-Scottish border Year of song unknown
```python import os import hou import unittest local_dir = os.path.dirname(__file__) class TestStringMethods(unittest.TestCase): @classmethod def setUpClass(cls): pass def test_1_test_demoscenes(self): demo_files = os.listdir(os.path.dirname(local_dir) + "/hip") for demo_file in demo_files: if demo_file.endswith(".hip"): print "opening", demo_file try: hou.hipFile.load(os.path.join(os.path.dirname(local_dir), "hip", demo_file).replace("\\", "/")) GameDevNodeInstances = [x for x in hou.node("/").allSubChildren() if x.type().nameComponents()[1] == "gamedev"] for node in GameDevNodeInstances: if node.type().definition().nodeType().name() != hou.nodeType(node.type().definition().nodeTypeCategory(), node.type().definition().nodeTypeName()).namespaceOrder()[0]: print "Warning... Node instance is using older definition:", node.path() except Exception, e: print str(e) pass if __name__ == '__main__': unittest.main() ```
```smalltalk using System; using System.IO; using System.Collections.Generic; using FluentFTP.Rules; using FluentFTP.Helpers; namespace FluentFTP { public partial class FtpClient { /// <summary> /// Uploads the specified directory onto the server. /// In Mirror mode, we will upload missing files, and delete any extra files from the server that are not present on disk. This is very useful when publishing an exact copy of a local folder onto an FTP server. /// In Update mode, we will only upload missing files and preserve any extra files on the server. This is useful when you want to simply upload missing files to a server. /// Only uploads the files and folders matching all the rules provided, if any. /// All exceptions during uploading are caught, and the exception is stored in the related FtpResult object. /// </summary> /// <param name="localFolder">The full path of the local folder on disk that you want to upload. If it does not exist, an empty result list is returned.</param> /// <param name="remoteFolder">The full path of the remote FTP folder to upload into. It is created if it does not exist.</param> /// <param name="mode">Mirror or Update mode, as explained above</param> /// <param name="existsMode">If the file exists on disk, should we skip it, resume the upload or restart the upload?</param> /// <param name="verifyOptions"> Sets verification type and what to do if verification fails (See Remarks)</param> /// <param name="rules">Only files and folders that pass all these rules are downloaded, and the files that don't pass are skipped. In the Mirror mode, the files that fail the rules are also deleted from the local folder.</param> /// <param name="progress">Provide a callback to track upload progress.</param> /// <remarks> /// If verification is enabled (All options other than <see cref="FtpVerify.None"/>) the file will be verified against the source using the verification methods specified by <see cref="FtpVerifyMethod"/> in the client config. /// <br/> If only <see cref="FtpVerify.OnlyVerify"/> is set then the return of this method depends on both a successful transfer &amp; verification. /// <br/> Additionally, if any verify option is set and a retry is attempted the existsMode will automatically be set to <see cref="FtpRemoteExists.Overwrite"/>. /// If <see cref="FtpVerify.Throw"/> is set and <see cref="FtpError.Throw"/> is <i>not set</i>, then individual verification errors will not cause an exception to propagate from this method. /// </remarks> /// <returns> /// Returns a listing of all the remote files, indicating if they were downloaded, skipped or overwritten. /// Returns a blank list if nothing was transferred. Never returns null. /// </returns> public List<FtpResult> UploadDirectory(string localFolder, string remoteFolder, FtpFolderSyncMode mode = FtpFolderSyncMode.Update, FtpRemoteExists existsMode = FtpRemoteExists.Skip, FtpVerify verifyOptions = FtpVerify.None, List<FtpRule> rules = null, Action<FtpProgress> progress = null) { if (localFolder.IsBlank()) { throw new ArgumentException("Required parameter is null or blank.", nameof(localFolder)); } if (remoteFolder.IsBlank()) { throw new ArgumentException("Required parameter is null or blank.", nameof(remoteFolder)); } // ensure the local path ends with slash localFolder = localFolder.EnsurePostfix(Path.DirectorySeparatorChar.ToString()); // cleanup the remote path remoteFolder = remoteFolder.GetFtpPath().EnsurePostfix("/"); LogFunction(nameof(UploadDirectory), new object[] { localFolder, remoteFolder, mode, existsMode, verifyOptions, (rules.IsBlank() ? null : rules.Count + " rules") }); var results = new List<FtpResult>(); // if the dir does not exist, fail fast if (!Directory.Exists(localFolder)) { return results; } // flag to determine if existence checks are required var checkFileExistence = true; // ensure the remote dir exists if (!DirectoryExists(remoteFolder)) { CreateDirectory(remoteFolder); checkFileExistence = false; } // collect paths of the files that should exist (lowercase for CI checks) var shouldExist = new Dictionary<string, bool>(); // get all the folders in the local directory var dirListing = Directory.GetDirectories(localFolder, "*.*", SearchOption.AllDirectories); // get all the already existing files var remoteListing = checkFileExistence ? GetListing(remoteFolder, FtpListOption.Recursive) : null; // loop through each folder and ensure it exists var dirsToUpload = GetSubDirectoriesToUpload(localFolder, remoteFolder, rules, results, dirListing); CreateSubDirectories(this, dirsToUpload); // get all the files in the local directory var fileListing = Directory.GetFiles(localFolder, "*.*", SearchOption.AllDirectories); // loop through each file and transfer it var filesToUpload = GetFilesToUpload(localFolder, remoteFolder, rules, results, shouldExist, fileListing); UploadDirectoryFiles(filesToUpload, existsMode, verifyOptions, progress, remoteListing); // delete the extra remote files if in mirror mode and the directory was pre-existing DeleteExtraServerFiles(mode, remoteFolder, shouldExist, remoteListing, rules); return results; } /// <summary> /// Create all the sub directories within the main directory /// </summary> protected void CreateSubDirectories(FtpClient client, List<FtpResult> dirsToUpload) { foreach (var result in dirsToUpload) { // absorb errors try { // create directory on the server // to ensure we upload the blank remote dirs as well if (client.CreateDirectory(result.RemotePath)) { result.IsSuccess = true; result.IsSkipped = false; } else { result.IsSkipped = true; } } catch (Exception ex) { // mark that the folder failed to upload result.IsFailed = true; result.Exception = ex; } } } /// <summary> /// Upload all the files within the main directory /// </summary> protected void UploadDirectoryFiles(List<FtpResult> filesToUpload, FtpRemoteExists existsMode, FtpVerify verifyOptions, Action<FtpProgress> progress, FtpListItem[] remoteListing) { LogFunction(nameof(UploadDirectoryFiles), new object[] { filesToUpload.Count + " files" }); int r = -1; foreach (var result in filesToUpload) { r++; // absorb errors try { // skip uploading if the file already exists on the server FtpRemoteExists existsModeToUse; if (!CanUploadFile(result, remoteListing, existsMode, out existsModeToUse)) { continue; } // create meta progress to store the file progress var metaProgress = new FtpProgress(filesToUpload.Count, r); // upload the file var transferred = UploadFileFromFile(result.LocalPath, result.RemotePath, false, existsModeToUse, false, false, verifyOptions, progress, metaProgress); result.IsSuccess = transferred.IsSuccess(); result.IsSkipped = transferred == FtpStatus.Skipped; } catch (Exception ex) { LogWithPrefix(FtpTraceLevel.Warn, "File failed to upload: " + result.LocalPath); // mark that the file failed to upload result.IsFailed = true; result.Exception = ex; } } } /// <summary> /// Delete the extra remote files if in mirror mode and the directory was pre-existing /// </summary> protected void DeleteExtraServerFiles(FtpFolderSyncMode mode, string remoteFolder, Dictionary<string, bool> shouldExist, FtpListItem[] remoteListing, List<FtpRule> rules) { if (mode == FtpFolderSyncMode.Mirror && remoteListing != null) { LogFunction(nameof(DeleteExtraServerFiles)); // delete files that are not in listed in shouldExist foreach (var existingServerFile in remoteListing) { if (existingServerFile.Type == FtpObjectType.File) { if (!shouldExist.ContainsKey(existingServerFile.FullName.ToLower())) { // only delete the remote file if its permitted by the configuration if (CanDeleteRemoteFile(rules, existingServerFile)) { LogWithPrefix(FtpTraceLevel.Info, "Delete extra file from server: " + existingServerFile.FullName); // delete the file from the server try { DeleteFile(existingServerFile.FullName); } catch { } } } } } } } } } ```
```turing # # This software may be used and distributed according to the terms of the # directory of this source tree. $ . "${TEST_FIXTURES}/library.sh" $ hook_test_setup \ > block_commit_message_pattern <( > cat <<CONF > log_only=true > config_json='''{ > "pattern": "([@]nocommit)", > "message": "Message contains nocommit marker" > }''' > CONF > ) $ hg up -q tip Push a commit that fails the hook, it is still allowed as the hook is log-only. $ echo "foo" >> foo $ hg ci -Aqm $"Contains @""nocommit" $ hgmn push -r . --to master_bookmark pushing rev d379d7937ea5 to destination mononoke://$LOCALIP:$LOCAL_PORT/repo bookmark master_bookmark searching for changes adding changesets adding manifests adding file changes updating bookmark master_bookmark $ jq < $TESTTMP/hooks-scuba.json -c '[.normal.hook, .int.failed_hooks, .normal.log_only_rejection]' ["block_commit_message_pattern",0,"Message contains nocommit marker"] ```
```scss @import "common.scss"; html { position: relative; min-width: 320px; } html, body { min-height: 100%; height: 100%; } body { font: 12px/16px $font-family; color: $default-text; @include main-background(); display: flex; align-items: center; } .page-not-found-modal { width: 638px; margin: 0 auto; @include bg-translucent-dark(0.5); border-radius: 5px; font-weight: $font-light; color: #ffffff; padding: 32px; text-align: center; h1 { font-weight: $font-light; margin-bottom: 32px; } p { font-size: 16px; line-height: 24px; } a { text-decoration: none; outline: none; transition: all 0.2s ease; color: $primary; display: inline-block; &:hover { color: $primary-dark; } } } ```
Srilankametrus gravimanus is a species of scorpion belonging to the family Scorpionidae. It is native to India and Sri Lanka. Description This large scorpion has a total length of about 75 to 110 mm. Adults are uniformly reddish brown in color. Male has 13 to 16 pectinal teeth, whereas female has 11 to 13 pectinal teeth. Male has slightly longer pedipalp femur and patella than female. Chela lobiform, which is narrow in male. Manus covered by rounded granules. Pedipalp patella is smooth, and without pronounced internal tubercle. Carapace smooth, and glossy. Telson elongate. Hemispermatophore is lamelliform. During the hemolytic and enzymic investigations of the crude venom, both direct and indirect (phospholipase A) hemolysins were identified from the species. References External links Animal World Scorpionidae Endemic fauna of India Endemic fauna of Sri Lanka Animals described in 1894
Standings and results for Group F of the regular season phase of the 2010–11 Eurocup basketball tournament. Standings Fixtures and results All times given below are in Central European Time. Game 1 Game 2 Game 3 Game 4 Game 5 Game 6 External links Standings 2010–11 Eurocup Basketball
```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 { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { NzSafeAny } from 'ng-zorro-antd/core/types'; import { Observable } from 'rxjs'; import { Message } from '../entity/Message'; import { Users } from '../entity/Users'; import { BaseService } from './base.service'; @Injectable({ providedIn: 'root' }) export class UsersService extends BaseService<Users> { constructor(private _httpClient: HttpClient) { super(_httpClient, '/users'); } generatePassword(params: NzSafeAny): Observable<Message<Users>> { return this.http.get<Message<Users>>(`${this.server.urls.base}/randomPassword`, { params: this.parseParams(params) }); } getProfile(): Observable<Message<Users>> { return this.http.get<Message<Users>>('/users/profile/get', {}); } updateProfile(body: any): Observable<Message<Users>> { return this.http.put<Message<Users>>('/users/profile/update', body); } } ```
```c++ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Platform-specific code for FreeBSD goes here. For the POSIX-compatible // parts, the implementation is in platform-posix.cc. #include <pthread.h> #include <semaphore.h> #include <signal.h> #include <stdlib.h> #include <sys/resource.h> #include <sys/time.h> #include <sys/types.h> #include <sys/ucontext.h> #include <sys/fcntl.h> // open #include <sys/mman.h> // mmap & munmap #include <sys/stat.h> // open #include <sys/types.h> // mmap & munmap #include <unistd.h> // getpagesize // If you don't have execinfo.h then you need devel/libexecinfo from ports. #include <errno.h> #include <limits.h> #include <stdarg.h> #include <strings.h> // index #include <cmath> #undef MAP_TYPE #include "src/base/macros.h" #include "src/base/platform/platform.h" namespace v8 { namespace base { const char* OS::LocalTimezone(double time, TimezoneCache* cache) { if (std::isnan(time)) return ""; time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); struct tm* t = localtime(&tv); if (NULL == t) return ""; return t->tm_zone; } double OS::LocalTimeOffset(TimezoneCache* cache) { time_t tv = time(NULL); struct tm* t = localtime(&tv); // tm_gmtoff includes any daylight savings offset, so subtract it. return static_cast<double>(t->tm_gmtoff * msPerSecond - (t->tm_isdst > 0 ? 3600 * msPerSecond : 0)); } void* OS::Allocate(const size_t requested, size_t* allocated, bool executable) { const size_t msize = RoundUp(requested, getpagesize()); int prot = PROT_READ | PROT_WRITE | (executable ? PROT_EXEC : 0); void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0); if (mbase == MAP_FAILED) return NULL; *allocated = msize; return mbase; } static unsigned StringToLong(char* buffer) { return static_cast<unsigned>(strtol(buffer, NULL, 16)); // NOLINT } std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() { std::vector<SharedLibraryAddress> result; static const int MAP_LENGTH = 1024; int fd = open("/proc/self/maps", O_RDONLY); if (fd < 0) return result; while (true) { char addr_buffer[11]; addr_buffer[0] = '0'; addr_buffer[1] = 'x'; addr_buffer[10] = 0; ssize_t bytes_read = read(fd, addr_buffer + 2, 8); if (bytes_read < 8) break; unsigned start = StringToLong(addr_buffer); bytes_read = read(fd, addr_buffer + 2, 1); if (bytes_read < 1) break; if (addr_buffer[2] != '-') break; bytes_read = read(fd, addr_buffer + 2, 8); if (bytes_read < 8) break; unsigned end = StringToLong(addr_buffer); char buffer[MAP_LENGTH]; bytes_read = -1; do { bytes_read++; if (bytes_read >= MAP_LENGTH - 1) break; bytes_read = read(fd, buffer + bytes_read, 1); if (bytes_read < 1) break; } while (buffer[bytes_read] != '\n'); buffer[bytes_read] = 0; // Ignore mappings that are not executable. if (buffer[3] != 'x') continue; char* start_of_path = index(buffer, '/'); // There may be no filename in this line. Skip to next. if (start_of_path == NULL) continue; buffer[bytes_read] = 0; result.push_back(SharedLibraryAddress(start_of_path, start, end)); } close(fd); return result; } void OS::SignalCodeMovingGC() { } // Constants used for mmap. static const int kMmapFd = -1; static const int kMmapFdOffset = 0; VirtualMemory::VirtualMemory() : address_(NULL), size_(0) { } VirtualMemory::VirtualMemory(size_t size) : address_(ReserveRegion(size)), size_(size) { } VirtualMemory::VirtualMemory(size_t size, size_t alignment) : address_(NULL), size_(0) { DCHECK((alignment % OS::AllocateAlignment()) == 0); size_t request_size = RoundUp(size + alignment, static_cast<intptr_t>(OS::AllocateAlignment())); void* reservation = mmap(OS::GetRandomMmapAddr(), request_size, PROT_NONE, MAP_PRIVATE | MAP_ANON, kMmapFd, kMmapFdOffset); if (reservation == MAP_FAILED) return; uint8_t* base = static_cast<uint8_t*>(reservation); uint8_t* aligned_base = RoundUp(base, alignment); DCHECK_LE(base, aligned_base); // Unmap extra memory reserved before and after the desired block. if (aligned_base != base) { size_t prefix_size = static_cast<size_t>(aligned_base - base); OS::Free(base, prefix_size); request_size -= prefix_size; } size_t aligned_size = RoundUp(size, OS::AllocateAlignment()); DCHECK_LE(aligned_size, request_size); if (aligned_size != request_size) { size_t suffix_size = request_size - aligned_size; OS::Free(aligned_base + aligned_size, suffix_size); request_size -= suffix_size; } DCHECK(aligned_size == request_size); address_ = static_cast<void*>(aligned_base); size_ = aligned_size; } VirtualMemory::~VirtualMemory() { if (IsReserved()) { bool result = ReleaseRegion(address(), size()); DCHECK(result); USE(result); } } bool VirtualMemory::IsReserved() { return address_ != NULL; } void VirtualMemory::Reset() { address_ = NULL; size_ = 0; } bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { return CommitRegion(address, size, is_executable); } bool VirtualMemory::Uncommit(void* address, size_t size) { return UncommitRegion(address, size); } bool VirtualMemory::Guard(void* address) { OS::Guard(address, OS::CommitPageSize()); return true; } void* VirtualMemory::ReserveRegion(size_t size) { void* result = mmap(OS::GetRandomMmapAddr(), size, PROT_NONE, MAP_PRIVATE | MAP_ANON, kMmapFd, kMmapFdOffset); if (result == MAP_FAILED) return NULL; return result; } bool VirtualMemory::CommitRegion(void* base, size_t size, bool is_executable) { int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0); if (MAP_FAILED == mmap(base, size, prot, MAP_PRIVATE | MAP_ANON | MAP_FIXED, kMmapFd, kMmapFdOffset)) { return false; } return true; } bool VirtualMemory::UncommitRegion(void* base, size_t size) { return mmap(base, size, PROT_NONE, MAP_PRIVATE | MAP_ANON | MAP_FIXED, kMmapFd, kMmapFdOffset) != MAP_FAILED; } bool VirtualMemory::ReleaseRegion(void* base, size_t size) { return munmap(base, size) == 0; } bool VirtualMemory::HasLazyCommits() { // TODO(alph): implement for the platform. return false; } } } // namespace v8::base ```
```javascript 'use strict'; require('../common'); const fixtures = require('../common/fixtures'); const { execFileSync } = require('child_process'); const cjsModuleWrapTest = fixtures.path('cjs-module-wrapper.js'); const node = process.execPath; execFileSync(node, [cjsModuleWrapTest], { stdio: 'pipe' }); ```
```html <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Class template basic_event_log_backend</title> <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Boost.Log v2"> <link rel="up" href="../../../sinks.html#header.boost.log.sinks.event_log_backend_hpp" title="Header &lt;boost/log/sinks/event_log_backend.hpp&gt;"> <link rel="prev" href="basic_simple_e_idp38278304.html" title="Class template basic_simple_event_log_backend"> <link rel="next" href="event_log/make_event_id.html" title="Function make_event_id"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="basic_simple_e_idp38278304.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../sinks.html#header.boost.log.sinks.event_log_backend_hpp"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="event_log/make_event_id.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="refentry"> <a name="boost.log.sinks.basic_event_log_backend"></a><div class="titlepage"></div> <div class="refnamediv"> <h2><span class="refentrytitle">Class template basic_event_log_backend</span></h2> <p>boost::log::sinks::basic_event_log_backend &#8212; An implementation of a logging sink backend that emits events into Windows NT event log. </p> </div> <h2 xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> <div xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../sinks.html#header.boost.log.sinks.event_log_backend_hpp" title="Header &lt;boost/log/sinks/event_log_backend.hpp&gt;">boost/log/sinks/event_log_backend.hpp</a>&gt; </span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">&gt;</span> <span class="keyword">class</span> <a class="link" href="basic_event_log_backend.html" title="Class template basic_event_log_backend">basic_event_log_backend</a> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">basic_sink_backend</span><span class="special">&lt;</span> <span class="identifier">synchronized_feeding</span> <span class="special">&gt;</span> <span class="special">{</span> <span class="keyword">public</span><span class="special">:</span> <span class="comment">// types</span> <span class="keyword">typedef</span> <span class="identifier">CharT</span> <a name="boost.log.sinks.basic_event_log_backend.char_type"></a><span class="identifier">char_type</span><span class="special">;</span> <span class="comment">// Character type. </span> <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <a name="boost.log.sinks.basic_event_log_backend.string_type"></a><span class="identifier">string_type</span><span class="special">;</span> <span class="comment">// String type. </span> <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> <a name="boost.log.sinks.basic_event_log_backend.insertion_list"></a><span class="identifier">insertion_list</span><span class="special">;</span> <span class="comment">// Type of the composed insertions list. </span> <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a name="boost.log.sinks.basic_event_log_backend.event_type_mapper_type"></a><span class="identifier">event_type_mapper_type</span><span class="special">;</span> <span class="comment">// Mapper type for the event type. </span> <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a name="boost.log.sinks.basic_event_log_backend.event_category_mapper_type"></a><span class="identifier">event_category_mapper_type</span><span class="special">;</span> <span class="comment">// Mapper type for the event category. </span> <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a name="boost.log.sinks.basic_event_log_backend.event_composer_type"></a><span class="identifier">event_composer_type</span><span class="special">;</span> <span class="comment">// Event composer type. </span> <span class="comment">// <a class="link" href="basic_event_log_backend.html#boost.log.sinks.basic_event_log_backendconstruct-copy-destruct">construct/copy/destruct</a></span> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">explicit</span> <a class="link" href="basic_event_log_backend.html#idp38333824-bb"><span class="identifier">basic_event_log_backend</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span> <span class="keyword">explicit</span> <a class="link" href="basic_event_log_backend.html#idp38336512-bb"><span class="identifier">basic_event_log_backend</span></a><span class="special">(</span><span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span><span class="special">...</span> ArgsT<span class="special">&gt;</span> <span class="keyword">explicit</span> <a class="link" href="basic_event_log_backend.html#idp38338352-bb"><span class="identifier">basic_event_log_backend</span></a><span class="special">(</span><span class="identifier">ArgsT</span><span class="special">...</span><span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span> <a class="link" href="basic_event_log_backend.html#idp38349760-bb"><span class="special">~</span><span class="identifier">basic_event_log_backend</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> <span class="comment">// <a class="link" href="basic_event_log_backend.html#idp38324176-bb">public member functions</a></span> <span class="keyword">void</span> <a class="link" href="basic_event_log_backend.html#idp38324736-bb"><span class="identifier">consume</span></a><span class="special">(</span><span class="identifier">record_view</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span> <span class="keyword">void</span> <a class="link" href="basic_event_log_backend.html#idp38327424-bb"><span class="identifier">set_event_type_mapper</span></a><span class="special">(</span><span class="identifier">event_type_mapper_type</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span> <span class="keyword">void</span> <a class="link" href="basic_event_log_backend.html#idp38329472-bb"><span class="identifier">set_event_category_mapper</span></a><span class="special">(</span><span class="identifier">event_category_mapper_type</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span> <span class="keyword">void</span> <a class="link" href="basic_event_log_backend.html#idp38331536-bb"><span class="identifier">set_event_composer</span></a><span class="special">(</span><span class="identifier">event_composer_type</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span> <span class="comment">// <a class="link" href="basic_event_log_backend.html#idp38350560-bb">public static functions</a></span> <span class="keyword">static</span> <span class="identifier">string_type</span> <a class="link" href="basic_event_log_backend.html#idp38351120-bb"><span class="identifier">get_default_log_name</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> <span class="keyword">static</span> <span class="identifier">string_type</span> <a class="link" href="basic_event_log_backend.html#idp38353088-bb"><span class="identifier">get_default_source_name</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> <span class="special">}</span><span class="special">;</span></pre></div> <div class="refsect1"> <a name="idp109031600"></a><h2>Description</h2> <p>The sink uses Windows NT 5 (Windows 2000) and later event log API to emit events to an event log. The sink acts as an event source. Unlike <code class="computeroutput"><a class="link" href="basic_simple_e_idp38278304.html" title="Class template basic_simple_event_log_backend">basic_simple_event_log_backend</a></code>, this sink backend allows users to specify the custom event message file and supports mapping attribute values onto several insertion strings. Although it requires considerably more scaffolding than the simple backend, this allows to support localizable event descriptions.</p> <p>Besides the file name of the module with event resources, the backend provides the following customizations: </p> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>Remote server UNC address, log name and source name. These parameters have similar meaning to <code class="computeroutput"><a class="link" href="basic_simple_e_idp38278304.html" title="Class template basic_simple_event_log_backend">basic_simple_event_log_backend</a></code>. </p></li> <li class="listitem"><p>Event type and category mappings. These are function object that allow to map attribute values to the according event parameters. One can use mappings in the <code class="computeroutput">event_log</code> namespace. </p></li> <li class="listitem"><p>Event composer. This function object extracts event identifier and formats string insertions, that will be used by the API to compose the final event message text. </p></li> </ul></div> <p> </p> <div class="refsect2"> <a name="idp109038832"></a><h3> <a name="boost.log.sinks.basic_event_log_backendconstruct-copy-destruct"></a><code class="computeroutput">basic_event_log_backend</code> public construct/copy/destruct</h3> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem"> <pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">explicit</span> <a name="idp38333824-bb"></a><span class="identifier">basic_event_log_backend</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> message_file_name<span class="special">)</span><span class="special">;</span></pre> <p>Constructor. Registers event source with name based on the application executable file name in the Application log. If such a registration is already present, it is not overridden. </p> </li> <li class="listitem"> <pre class="literallayout"><span class="keyword">explicit</span> <a name="idp38336512-bb"></a><span class="identifier">basic_event_log_backend</span><span class="special">(</span><span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="keyword">const</span> <span class="special">&amp;</span> message_file_name<span class="special">)</span><span class="special">;</span></pre> <p>Constructor. Registers event source with name based on the application executable file name in the Application log. If such a registration is already present, it is not overridden. </p> </li> <li class="listitem"> <pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span><span class="special">...</span> ArgsT<span class="special">&gt;</span> <span class="keyword">explicit</span> <a name="idp38338352-bb"></a><span class="identifier">basic_event_log_backend</span><span class="special">(</span><span class="identifier">ArgsT</span><span class="special">...</span><span class="keyword">const</span> <span class="special">&amp;</span> args<span class="special">)</span><span class="special">;</span></pre> <p>Constructor. Registers event log source with the specified parameters. The following named parameters are supported:</p> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p><code class="computeroutput">message_file</code> - Specifies the file name that contains resources that describe events and categories. This parameter is mandatory unless <code class="computeroutput">registration</code> is <code class="computeroutput">never</code>. </p></li> <li class="listitem"><p><code class="computeroutput">target</code> - Specifies an UNC path to the remote server to which log records should be sent to. The local machine will be used to process log records, if not specified. </p></li> <li class="listitem"><p><code class="computeroutput">log_name</code> - Specifies the log in which the source should be registered. The result of <code class="computeroutput">get_default_log_name</code> is used, if the parameter is not specified. </p></li> <li class="listitem"><p><code class="computeroutput">log_source</code> - Specifies the source name. The result of <code class="computeroutput">get_default_source_name</code> is used, if the parameter is not specified. </p></li> <li class="listitem"><p><code class="computeroutput">registration</code> - Specifies the event source registration mode in the Windows registry. Can have values of the <code class="computeroutput">registration_mode</code> enum. Default value: <code class="computeroutput">on_demand</code>.</p></li> </ul></div> <p> </p> <div class="variablelist"><table border="0" class="variablelist compact"> <colgroup> <col align="left" valign="top"> <col> </colgroup> <tbody><tr> <td><p><span class="term">Parameters:</span></p></td> <td><div class="variablelist"><table border="0" class="variablelist compact"> <colgroup> <col align="left" valign="top"> <col> </colgroup> <tbody><tr> <td><p><span class="term"><code class="computeroutput">args</code></span></p></td> <td><p>A set of named parameters. </p></td> </tr></tbody> </table></div></td> </tr></tbody> </table></div> </li> <li class="listitem"> <pre class="literallayout"><a name="idp38349760-bb"></a><span class="special">~</span><span class="identifier">basic_event_log_backend</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre> <p>Destructor. Unregisters event source. The log source description is not removed from the Windows registry. </p> </li> </ol></div> </div> <div class="refsect2"> <a name="idp109089936"></a><h3> <a name="idp38324176-bb"></a><code class="computeroutput">basic_event_log_backend</code> public member functions</h3> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem"> <pre class="literallayout"><span class="keyword">void</span> <a name="idp38324736-bb"></a><span class="identifier">consume</span><span class="special">(</span><span class="identifier">record_view</span> <span class="keyword">const</span> <span class="special">&amp;</span> rec<span class="special">)</span><span class="special">;</span></pre> <p>The method creates an event in the event log</p> <p> </p> <div class="variablelist"><table border="0" class="variablelist compact"> <colgroup> <col align="left" valign="top"> <col> </colgroup> <tbody><tr> <td><p><span class="term">Parameters:</span></p></td> <td><div class="variablelist"><table border="0" class="variablelist compact"> <colgroup> <col align="left" valign="top"> <col> </colgroup> <tbody><tr> <td><p><span class="term"><code class="computeroutput">rec</code></span></p></td> <td><p>Log record to consume </p></td> </tr></tbody> </table></div></td> </tr></tbody> </table></div> </li> <li class="listitem"> <pre class="literallayout"><span class="keyword">void</span> <a name="idp38327424-bb"></a><span class="identifier">set_event_type_mapper</span><span class="special">(</span><span class="identifier">event_type_mapper_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> mapper<span class="special">)</span><span class="special">;</span></pre> <p>The method installs the function object that maps application severity levels to WinAPI event types </p> </li> <li class="listitem"> <pre class="literallayout"><span class="keyword">void</span> <a name="idp38329472-bb"></a><span class="identifier">set_event_category_mapper</span><span class="special">(</span><span class="identifier">event_category_mapper_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> mapper<span class="special">)</span><span class="special">;</span></pre> <p>The method installs the function object that extracts event category from attribute values </p> </li> <li class="listitem"> <pre class="literallayout"><span class="keyword">void</span> <a name="idp38331536-bb"></a><span class="identifier">set_event_composer</span><span class="special">(</span><span class="identifier">event_composer_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> composer<span class="special">)</span><span class="special">;</span></pre> <p>The method installs the function object that extracts event identifier from the attributes and creates insertion strings that will replace placeholders in the event message. </p> </li> </ol></div> </div> <div class="refsect2"> <a name="idp109122272"></a><h3> <a name="idp38350560-bb"></a><code class="computeroutput">basic_event_log_backend</code> public static functions</h3> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem"> <pre class="literallayout"><span class="keyword">static</span> <span class="identifier">string_type</span> <a name="idp38351120-bb"></a><span class="identifier">get_default_log_name</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre> <p> </p> <div class="variablelist"><table border="0" class="variablelist compact"> <colgroup> <col align="left" valign="top"> <col> </colgroup> <tbody><tr> <td><p><span class="term">Returns:</span></p></td> <td><p>Default log name: Application </p></td> </tr></tbody> </table></div> </li> <li class="listitem"> <pre class="literallayout"><span class="keyword">static</span> <span class="identifier">string_type</span> <a name="idp38353088-bb"></a><span class="identifier">get_default_source_name</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre> <p> </p> <div class="variablelist"><table border="0" class="variablelist compact"> <colgroup> <col align="left" valign="top"> <col> </colgroup> <tbody><tr> <td><p><span class="term">Returns:</span></p></td> <td><p>Default log source name that is based on the application executable file name and the sink name </p></td> </tr></tbody> </table></div> </li> </ol></div> </div> </div> </div> <table xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> file LICENSE_1_0.txt or copy at <a href="path_to_url" target="_top">path_to_url </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="basic_simple_e_idp38278304.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../sinks.html#header.boost.log.sinks.event_log_backend_hpp"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="event_log/make_event_id.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html> ```
William Burton (died 1438), was an English Member of Parliament. He was a Member (MP) of the Parliament of England for City of London in April 1414 and May 1421. Details of his origins and early life are unclear. There is information that in 1395 he acted as chief manager for another member of his livery company. He played a leading role in the affairs of this, one of the city's most powerful guilds, for the next 38 years. During his service at the court, he held the positions of purveyor and sergeant of the king's spices. William Burton served four terms as a director of the Grocers' Company and at least three on the advisory board. He was involved in numerous court processes. Burton invested part of his wealth in real estate. He was the owner of apartments and shops in the London parishes of St. Bride, Fleet Street, St. Mary Colechurch and St. Mildred in the Poultry. His property in the city was worth 12 pounds a year in 1436. He married three times. Burton was a member of numerous juries and participated in 8 parliamentary elections. He died between 10 March and 23 May 1438 and was buried in the church of the Friars Minor next to his second wife, Agnes. References 14th-century births 1438 deaths 15th-century English people Politicians from London Members of the Parliament of England (pre-1707)
```html <!DOCTYPE html> <html class="writer-html5" lang="en" > <head> <meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: path_to_url" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>What is new in Ring 1.16? &mdash; Ring 1.21 documentation</title> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="_static/css/custom.css" type="text/css" /> <!--[if lt IE 9]> <script src="_static/js/html5shiv.min.js"></script> <![endif]--> <script src="_static/jquery.js"></script> <script src="_static/_sphinx_javascript_frameworks_compat.js"></script> <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script> <script src="_static/doctools.js"></script> <script src="_static/sphinx_highlight.js"></script> <script src="_static/js/theme.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="next" title="What is new in Ring 1.17" href="whatisnew17.html" /> <link rel="prev" title="What is new in Ring 1.15?" href="whatisnew15.html" /> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > <a href="index.html"> <img src="_static/ringdoclogo.jpg" class="logo" alt="Logo"/> </a> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="ringapps.html">Applications developed in a few hours</a></li> <li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li> <li class="toctree-l1"><a class="reference internal" href="ringnotepad.html">Using Ring Notepad</a></li> <li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started - First Style</a></li> <li class="toctree-l1"><a class="reference internal" href="getting_started2.html">Getting Started - Second Style</a></li> <li class="toctree-l1"><a class="reference internal" href="getting_started3.html">Getting Started - Third Style</a></li> <li class="toctree-l1"><a class="reference internal" href="variables.html">Variables</a></li> <li class="toctree-l1"><a class="reference internal" href="operators.html">Operators</a></li> <li class="toctree-l1"><a class="reference internal" href="controlstructures.html">Control Structures - First Style</a></li> <li class="toctree-l1"><a class="reference internal" href="controlstructures2.html">Control Structures - Second Style</a></li> <li class="toctree-l1"><a class="reference internal" href="controlstructures3.html">Control Structures - Third Style</a></li> <li class="toctree-l1"><a class="reference internal" href="getinput.html">Getting Input</a></li> <li class="toctree-l1"><a class="reference internal" href="functions.html">Functions - First Style</a></li> <li class="toctree-l1"><a class="reference internal" href="functions2.html">Functions - Second Style</a></li> <li class="toctree-l1"><a class="reference internal" href="functions3.html">Functions - Third Style</a></li> <li class="toctree-l1"><a class="reference internal" href="programstructure.html">Program Structure</a></li> <li class="toctree-l1"><a class="reference internal" href="lists.html">Lists</a></li> <li class="toctree-l1"><a class="reference internal" href="strings.html">Strings</a></li> <li class="toctree-l1"><a class="reference internal" href="dateandtime.html">Date and Time</a></li> <li class="toctree-l1"><a class="reference internal" href="checkandconvert.html">Check Data Type and Conversion</a></li> <li class="toctree-l1"><a class="reference internal" href="mathfunc.html">Mathematical Functions</a></li> <li class="toctree-l1"><a class="reference internal" href="files.html">Files</a></li> <li class="toctree-l1"><a class="reference internal" href="systemfunc.html">System Functions</a></li> <li class="toctree-l1"><a class="reference internal" href="evaldebug.html">Eval() and Debugging</a></li> <li class="toctree-l1"><a class="reference internal" href="demo.html">Demo Programs</a></li> <li class="toctree-l1"><a class="reference internal" href="odbc.html">ODBC Functions</a></li> <li class="toctree-l1"><a class="reference internal" href="mysql.html">MySQL Functions</a></li> <li class="toctree-l1"><a class="reference internal" href="sqlite.html">SQLite Functions</a></li> <li class="toctree-l1"><a class="reference internal" href="postgresql.html">PostgreSQL Functions</a></li> <li class="toctree-l1"><a class="reference internal" href="secfunc.html">Security and Internet Functions</a></li> <li class="toctree-l1"><a class="reference internal" href="oop.html">Object Oriented Programming (OOP)</a></li> <li class="toctree-l1"><a class="reference internal" href="fp.html">Functional Programming (FP)</a></li> <li class="toctree-l1"><a class="reference internal" href="metaprog.html">Reflection and Meta-programming</a></li> <li class="toctree-l1"><a class="reference internal" href="declarative.html">Declarative Programming using Nested Structures</a></li> <li class="toctree-l1"><a class="reference internal" href="natural.html">Natural language programming</a></li> <li class="toctree-l1"><a class="reference internal" href="naturallibrary.html">Using the Natural Library</a></li> <li class="toctree-l1"><a class="reference internal" href="scope.html">Scope Rules for Variables and Attributes</a></li> <li class="toctree-l1"><a class="reference internal" href="scope2.html">Scope Rules for Functions and Methods</a></li> <li class="toctree-l1"><a class="reference internal" href="syntaxflexibility.html">Syntax Flexibility</a></li> <li class="toctree-l1"><a class="reference internal" href="typehints.html">The Type Hints Library</a></li> <li class="toctree-l1"><a class="reference internal" href="debug.html">The Trace Library and the Interactive Debugger</a></li> <li class="toctree-l1"><a class="reference internal" href="ringemb.html">Embedding Ring Language in Ring Programs</a></li> <li class="toctree-l1"><a class="reference internal" href="stdlib.html">Stdlib Functions</a></li> <li class="toctree-l1"><a class="reference internal" href="stdlibclasses.html">Stdlib Classes</a></li> <li class="toctree-l1"><a class="reference internal" href="qt.html">Desktop, WebAssembly and Mobile development using RingQt</a></li> <li class="toctree-l1"><a class="reference internal" href="formdesigner.html">Using the Form Designer</a></li> <li class="toctree-l1"><a class="reference internal" href="qt3d.html">Graphics Programming using RingQt3D</a></li> <li class="toctree-l1"><a class="reference internal" href="ringqtobjects.html">Objects Library for RingQt Application</a></li> <li class="toctree-l1"><a class="reference internal" href="multilanguage.html">Multi-language Applications</a></li> <li class="toctree-l1"><a class="reference internal" href="qtmobile.html">Building RingQt Applications for Mobile</a></li> <li class="toctree-l1"><a class="reference internal" href="qtwebassembly.html">Building RingQt Applications for WebAssembly</a></li> <li class="toctree-l1"><a class="reference internal" href="web.html">Web Development (CGI Library)</a></li> <li class="toctree-l1"><a class="reference internal" href="deployincloud.html">Deploying Web Applications in the Cloud</a></li> <li class="toctree-l1"><a class="reference internal" href="allegro.html">Graphics and 2D Games programming using RingAllegro</a></li> <li class="toctree-l1"><a class="reference internal" href="gameengine.html">Demo Project - Game Engine for 2D Games</a></li> <li class="toctree-l1"><a class="reference internal" href="gameengineandorid.html">Building Games For Android</a></li> <li class="toctree-l1"><a class="reference internal" href="ringraylib.html">Developing Games using RingRayLib</a></li> <li class="toctree-l1"><a class="reference internal" href="usingopengl.html">Using RingOpenGL and RingFreeGLUT for 3D Graphics</a></li> <li class="toctree-l1"><a class="reference internal" href="usingopengl2.html">Using RingOpenGL and RingAllegro for 3D Graphics</a></li> <li class="toctree-l1"><a class="reference internal" href="goldmagic800.html">Demo Project - The Gold Magic 800 Game</a></li> <li class="toctree-l1"><a class="reference internal" href="tilengine.html">Using RingTilengine</a></li> <li class="toctree-l1"><a class="reference internal" href="performancetips.html">Performance Tips</a></li> <li class="toctree-l1"><a class="reference internal" href="compiler.html">Command Line Options</a></li> <li class="toctree-l1"><a class="reference internal" href="distribute.html">Distributing Ring Applications (Manual)</a></li> <li class="toctree-l1"><a class="reference internal" href="distribute_ring2exe.html">Distributing Ring Applications using Ring2EXE</a></li> <li class="toctree-l1"><a class="reference internal" href="ringpm.html">The Ring Package Manager (RingPM)</a></li> <li class="toctree-l1"><a class="reference internal" href="zerolib.html">ZeroLib Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="foxringfuncsdoc.html">FoxRing Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="bignumber.html">BigNumber Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="csvlib.html">CSVLib Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="jsonlib.html">JSONLib Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="httplib.html">HTTPLib Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="tokenslib.html">TokensLib Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="libcurl.html">Using RingLibCurl</a></li> <li class="toctree-l1"><a class="reference internal" href="ringlibcurlfuncsdoc.html">RingLibCurl Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="socket.html">Using RingSockets</a></li> <li class="toctree-l1"><a class="reference internal" href="threads.html">Using RingThreads</a></li> <li class="toctree-l1"><a class="reference internal" href="libui.html">Using RingLibui</a></li> <li class="toctree-l1"><a class="reference internal" href="ringzip.html">Using RingZip</a></li> <li class="toctree-l1"><a class="reference internal" href="ringlibzipfuncsdoc.html">RingLibZip Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="ringmurmurhashfuncsdoc.html">RingMurmurHash Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="ringconsolecolorsfuncsdoc.html">RingConsoleColors Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="usingrogueutil.html">Using RingRogueUtil</a></li> <li class="toctree-l1"><a class="reference internal" href="ringallegrofuncsdoc.html">RingAllegro Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="libsdl.html">Using RingLibSDL</a></li> <li class="toctree-l1"><a class="reference internal" href="ringlibsdlfuncsdoc.html">RingLibSDL Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="libuv.html">Using Ringlibuv</a></li> <li class="toctree-l1"><a class="reference internal" href="ringlibuvfuncsdoc.html">RingLibuv Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="ringfreeglutfuncsdoc.html">RingFreeGLUT Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="ringstbimage.html">RingStbImage Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="ringopengl32funcsdoc.html">RingOpenGL (OpenGL 3.2) Functions Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="qtclassesdoc.html">RingQt Classes and Methods Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="usingfastpro.html">Using FastPro Extension</a></li> <li class="toctree-l1"><a class="reference internal" href="usingref.html">Using References</a></li> <li class="toctree-l1"><a class="reference internal" href="lowlevel.html">Low Level Functions</a></li> <li class="toctree-l1"><a class="reference internal" href="extension_tutorial.html">Tutorial: Ring Extensions in C/C++</a></li> <li class="toctree-l1"><a class="reference internal" href="extension.html">Extension using the C/C++ languages</a></li> <li class="toctree-l1"><a class="reference internal" href="embedding.html">Embedding Ring Language in C/C++ Programs</a></li> <li class="toctree-l1"><a class="reference internal" href="codegenerator.html">Code Generator for wrapping C/C++ Libraries</a></li> <li class="toctree-l1"><a class="reference internal" href="ringbeep.html">Create your first extension using the Code Generator</a></li> <li class="toctree-l1"><a class="reference internal" href="languagedesign.html">Release Notes: Version 1.0</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew.html">Release Notes: Version 1.1</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew2.html">Release Notes: Version 1.2</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew3.html">Release Notes: Version 1.3</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew4.html">Release Notes: Version 1.4</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew5.html">Release Notes: Version 1.5</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew6.html">Release Notes: Version 1.6</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew7.html">Release Notes: Version 1.7</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew8.html">Release Notes: Version 1.8</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew9.html">Release Notes: Version 1.9</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew10.html">Release Notes: Version 1.10</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew11.html">Release Notes: Version 1.11</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew12.html">Release Notes: Version 1.12</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew13.html">Release Notes: Version 1.13</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew14.html">Release Notes: Version 1.14</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew15.html">Release Notes: Version 1.15</a></li> <li class="toctree-l1 current"><a class="current reference internal" href="#">Release Notes: Version 1.16</a><ul> <li class="toctree-l2"><a class="reference internal" href="#list-of-changes-and-new-features">List of changes and new features</a></li> <li class="toctree-l2"><a class="reference internal" href="#light-guilib">Light GUILib</a></li> <li class="toctree-l2"><a class="reference internal" href="#utf-8-file-names-in-microsoft-windows">UTF-8 File Names in Microsoft Windows</a></li> <li class="toctree-l2"><a class="reference internal" href="#nested-methods-call-in-separate-lines">Nested Methods Call in Separate Lines</a></li> <li class="toctree-l2"><a class="reference internal" href="#code-runner-extension-support-ring">Code Runner Extension support Ring</a></li> <li class="toctree-l2"><a class="reference internal" href="#zero-and-strings">Zero and Strings</a></li> <li class="toctree-l2"><a class="reference internal" href="#better-installation-scripts">Better Installation Scripts</a></li> <li class="toctree-l2"><a class="reference internal" href="#better-documentation">Better Documentation</a></li> <li class="toctree-l2"><a class="reference internal" href="#mdi-windows-sample">MDI Windows Sample</a></li> <li class="toctree-l2"><a class="reference internal" href="#more-improvements">More Improvements</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="whatisnew17.html">Release Notes: Version 1.17</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew18.html">Release Notes: Version 1.18</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew19.html">Release Notes: Version 1.19</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew20.html">Release Notes: Version 1.20</a></li> <li class="toctree-l1"><a class="reference internal" href="whatisnew21.html">Release Notes: Version 1.21</a></li> <li class="toctree-l1"><a class="reference internal" href="codeeditors.html">Using Other Code Editors</a></li> <li class="toctree-l1"><a class="reference internal" href="faq.html">Frequently Asked Questions (FAQ)</a></li> <li class="toctree-l1"><a class="reference internal" href="sourcecode.html">Building From Source Code</a></li> <li class="toctree-l1"><a class="reference internal" href="contribute.html">How to contribute?</a></li> <li class="toctree-l1"><a class="reference internal" href="reference.html">Language Specification</a></li> <li class="toctree-l1"><a class="reference internal" href="resources.html">Resources</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">Ring</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li> <li class="breadcrumb-item active">What is new in Ring 1.16?</li> <li class="wy-breadcrumbs-aside"> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="path_to_url"> <div itemprop="articleBody"> <section id="what-is-new-in-ring-1-16"> <span id="index-0"></span><h1>What is new in Ring 1.16?<a class="headerlink" href="#what-is-new-in-ring-1-16" title="Permalink to this heading"></a></h1> <p>In this chapter we will learn about the changes and new features in Ring 1.16 release.</p> <section id="list-of-changes-and-new-features"> <span id="index-1"></span><h2>List of changes and new features<a class="headerlink" href="#list-of-changes-and-new-features" title="Permalink to this heading"></a></h2> <p>Ring 1.16 comes with the next features!</p> <ul class="simple"> <li><p>Light GUILib</p></li> <li><p>UTF-8 File Names in Microsoft Windows</p></li> <li><p>Nested Methods Call in Separate Lines</p></li> <li><p>Code Runner Extension support Ring</p></li> <li><p>Zero and Strings</p></li> <li><p>Better Installation Scripts</p></li> <li><p>Better Documentation</p></li> <li><p>MDI Windows Sample</p></li> <li><p>More Improvements</p></li> </ul> </section> <section id="light-guilib"> <span id="index-2"></span><h2>Light GUILib<a class="headerlink" href="#light-guilib" title="Permalink to this heading"></a></h2> <p>A lot of RingQt applications uses only QtCore, QtGui &amp; QtWidget modules</p> <p>These applications could use</p> <div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="k">load</span> <span class="s">&quot;lightguilib.ring&quot;</span> </pre></div> </div> <p>Instead of</p> <div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="k">load</span> <span class="s">&quot;guilib.ring&quot;</span> </pre></div> </div> <p>Also Ring Notepad, Distribute menu comes with a new option : Distribute light RingQt application</p> <p>Using this option we can distribute lightguilib applications</p> <p>For example, Distributing (Game of Life) using this option provides : target/windows folder</p> <img alt="lightguilib" src="_images/lightguilib.png" /> <ul class="simple"> <li><p>Size : 35 MB (Uncompressed)</p></li> <li><p>Size : 13 MB (zip)</p></li> <li><p>Size : 9 MB (exe) compressed using 7zip</p></li> </ul> <p>So we can distribute these GUI applications using an installer less than 10 MB</p> <div class="admonition tip"> <p class="admonition-title">Tip</p> <p>if you need something smaller than that (1 MB) then switch to other libraries like LibUI</p> </div> </section> <section id="utf-8-file-names-in-microsoft-windows"> <span id="index-3"></span><h2>UTF-8 File Names in Microsoft Windows<a class="headerlink" href="#utf-8-file-names-in-microsoft-windows" title="Permalink to this heading"></a></h2> <p>In Ring 1.16, The Load command support using UTF-8 in the file name.</p> <p>For example, We can write Arabic letters in the File Name!</p> <p>Also the next functions support this feature</p> <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>read() write() fopen() </pre></div> </div> </section> <section id="nested-methods-call-in-separate-lines"> <span id="index-4"></span><h2>Nested Methods Call in Separate Lines<a class="headerlink" href="#nested-methods-call-in-separate-lines" title="Permalink to this heading"></a></h2> <p>In Ring 1.16, the Compiler support adding new lines after the method call and before the dot operator</p> <p>Example:</p> <div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="n">myobj</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Start</span> <span class="n">myobj</span><span class="p">.</span><span class="n">one</span><span class="p">()</span> <span class="p">.</span><span class="n">two</span><span class="p">()</span> <span class="p">.</span><span class="n">three</span><span class="p">()</span> <span class="p">.</span><span class="n">go</span><span class="p">()</span> <span class="k">class</span> <span class="n">start</span> <span class="k">func</span> <span class="n">one</span> <span class="o">?</span> <span class="s">&quot;One&quot;</span> <span class="k">return</span> <span class="k">new</span> <span class="n">one</span> <span class="k">class</span> <span class="n">one</span> <span class="k">func</span> <span class="n">two</span> <span class="o">?</span> <span class="s">&quot;Two&quot;</span> <span class="k">return</span> <span class="k">new</span> <span class="n">two</span> <span class="k">class</span> <span class="n">two</span> <span class="k">func</span> <span class="n">three</span> <span class="o">?</span> <span class="s">&quot;Three&quot;</span> <span class="k">return</span> <span class="k">new</span> <span class="n">three</span> <span class="k">class</span> <span class="n">three</span> <span class="k">func</span> <span class="n">go</span> <span class="o">?</span> <span class="s">&quot;Go!&quot;</span> </pre></div> </div> <p>Output:</p> <div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="n">One</span> <span class="n">Two</span> <span class="n">Three</span> <span class="n">Go</span><span class="o">!</span> </pre></div> </div> </section> <section id="code-runner-extension-support-ring"> <span id="index-5"></span><h2>Code Runner Extension support Ring<a class="headerlink" href="#code-runner-extension-support-ring" title="Permalink to this heading"></a></h2> <p>If you are using Microsoft Visual Studio Code, We have good news for you!</p> <p>The Code Runner Extension added support for the Ring programming language</p> <img alt="coderunner" src="_images/coderunner.png" /> <p>After installing Code Runner</p> <p>Its recommended to modify this file :</p> <p>C:/Users/YOURUSERNAME/.vscode/extensions/formulahendry.code-runner-0.11.6/package.json</p> <p>Set the property (code-runner.fileDirectoryAsCwd) to (True)</p> <p>So Code Runner can move to the file directory when we run it using (Ctrl+Alt+N)</p> <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>&quot;code-runner.fileDirectoryAsCwd&quot;: { &quot;type&quot;: &quot;boolean&quot;, &quot;default&quot;: true, &quot;description&quot;: &quot;Whether to use the directory of the file to be executed as the working directory.&quot;, &quot;scope&quot;: &quot;resource&quot; }, </pre></div> </div> <div class="admonition tip"> <p class="admonition-title">Tip</p> <p>Check ring/tools/editors/vscode folder to support Ring in VSCode</p> </div> <img alt="tetrisvscode" src="_images/tetrisvscode.png" /> </section> <section id="zero-and-strings"> <span id="index-6"></span><h2>Zero and Strings<a class="headerlink" href="#zero-and-strings" title="Permalink to this heading"></a></h2> <p>From Ring 1.0, the language do implicit conversion between numbers and strings</p> <p>This is useful when we mix them in some situations like printing something on the screen</p> <div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="mi">10</span> <span class="c"># Number</span> <span class="o">?</span> <span class="s">&quot;x = &quot;</span> <span class="o">+</span> <span class="n">x</span> <span class="c"># x converted from Number to String</span> </pre></div> </div> <p>Also we can do arithmetic operations</p> <div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="s">&quot;10&quot;</span> <span class="c"># String</span> <span class="o">?</span> <span class="mi">5</span> <span class="o">+</span> <span class="n">x</span> <span class="c"># x converted from String to Number</span> </pre></div> </div> <p>The question is What happens if x content is not a number?</p> <p>The answer : The result of the conversion will be (Zero)</p> <div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="s">&quot;Test&quot;</span> <span class="c"># String - The content is not a number</span> <span class="o">?</span> <span class="mi">5</span> <span class="o">+</span> <span class="n">x</span> <span class="c"># print (5) - x converted from String to Number (Zero)</span> </pre></div> </div> <p>The other operators like = and != do the conversion too</p> <p>Starting from Ring 1.16, They will be careful when we compare things to Zero</p> <p>Example:</p> <div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="s">&quot;Test&quot;</span> <span class="o">?</span> <span class="mi">0</span> <span class="o">=</span> <span class="n">x</span> <span class="c"># The result will be FALSE</span> <span class="o">?</span> <span class="mi">0</span> <span class="o">!=</span> <span class="n">x</span> <span class="c"># The result will be TRUE</span> </pre></div> </div> <p>This is useful when we compare between values inside Empty Lists and Strings</p> <div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="n">aList</span> <span class="o">=</span> <span class="kt">list</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span> <span class="c"># 10 items - Each item is Zero</span> <span class="o">?</span> <span class="n">aList</span><span class="o">[</span><span class="mi">1</span><span class="o">]</span> <span class="o">+</span> <span class="mi">5</span> <span class="c"># print (5)</span> <span class="o">?</span> <span class="n">aList</span><span class="o">[</span><span class="mi">1</span><span class="o">]</span> <span class="o">=</span> <span class="s">&quot;Test&quot;</span> <span class="c"># False</span> <span class="o">?</span> <span class="n">aList</span><span class="o">[</span><span class="mi">1</span><span class="o">]</span> <span class="o">=</span> <span class="mi">0</span> <span class="c"># True</span> </pre></div> </div> <p>The other values (Not Zero) will follow the normal conversion rules</p> <div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="s">&quot;5&quot;</span> <span class="o">?</span> <span class="mi">5</span> <span class="o">=</span> <span class="n">x</span> <span class="c"># True</span> <span class="o">?</span> <span class="mi">6</span> <span class="o">!=</span> <span class="n">x</span> <span class="c"># True</span> </pre></div> </div> </section> <section id="better-installation-scripts"> <span id="index-7"></span><h2>Better Installation Scripts<a class="headerlink" href="#better-installation-scripts" title="Permalink to this heading"></a></h2> <p>Ring 1.16 comes with better installation scripts on Linux and macOS</p> <ul class="simple"> <li><p>install.sh - Force creation of symlinks in case they already exist</p></li> <li><p>install.sh - Remove quarantine flag</p></li> <li><p>uninstall.sh - Delete symlinks from /usr/local accordingly</p></li> </ul> </section> <section id="better-documentation"> <span id="index-8"></span><h2>Better Documentation<a class="headerlink" href="#better-documentation" title="Permalink to this heading"></a></h2> <p>All of the documentation chapters are revised and improved</p> </section> <section id="mdi-windows-sample"> <span id="index-9"></span><h2>MDI Windows Sample<a class="headerlink" href="#mdi-windows-sample" title="Permalink to this heading"></a></h2> <p>The next sample is added to the samples folder</p> <blockquote> <div><ul class="simple"> <li><p>samples/UsingQt/MDIWindows/mdi_windows.ring</p></li> </ul> </div></blockquote> <img alt="mdiwindowssample" src="_images/mdiwindowssample.png" /> </section> <section id="more-improvements"> <span id="index-10"></span><h2>More Improvements<a class="headerlink" href="#more-improvements" title="Permalink to this heading"></a></h2> <ul class="simple"> <li><p>Sample: samples/AQuickStart/GUILib/gui1.ring - Better Code</p></li> <li><p>Form Designer - Set the Button Event (If its Empty) from the Button Text</p></li> <li><p>Form Designer - Order the controls based on the position (Not the Creation Order)</p></li> <li><p>Form Designer - File System - File Name Encoding</p></li> <li><p>Form Designer - Properties Window - Property Name Column - Better Colors</p></li> <li><p>StdLib - IsPrime() Function - Better Code</p></li> <li><p>RingQt - QListWidget Class - AddItem() Method - Convert Number to String</p></li> <li><p>RingQt - More Qt constants are defined</p></li> <li><p>Ring2EXE - Display usage information</p></li> <li><p>Ring2EXE - Support Creating folders when copying files</p></li> <li><p>Ring VM - ring_vm_error() - Better Code</p></li> <li><p>Ring Compiler - Dont display (Unrecognized Option) if we have a source code file</p></li> </ul> </section> </section> </div> </div> <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> <a href="whatisnew15.html" class="btn btn-neutral float-left" title="What is new in Ring 1.15?" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="whatisnew17.html" class="btn btn-neutral float-right" title="What is new in Ring 1.17" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> </div> <hr/> <div role="contentinfo"> </div> Built with <a href="path_to_url">Sphinx</a> using a <a href="path_to_url">theme</a> provided by <a href="path_to_url">Read the Docs</a>. </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(false); }); </script> </body> </html> ```
Laccophilus biguttatus is a species of predaceous diving beetle in the family Dytiscidae. It is found in North America and the Palearctic. References Further reading Dytiscidae Articles created by Qbugbot Beetles described in 1837
The 1988 Everest World Matchplay was a professional non-ranking snooker tournament that took place between 2 and 10 December 1988 in Brentwood, England. Established by Barry Hearn, this was the first World Matchplay tournament and was an invitation event for the top twelve players on the provisional ranking list. It was the first snooker event to offer a six-figure prize with the winner of the event sponsored by Everest, the double glazing company, receiving £100,000. Of the 12 players, the top eight seeds received a bye into the quarter-finals. Steve Davis won the event, defeating John Parrott 9–5 in the final. Main draw Final References World Matchplay World Matchplay World Matchplay 1988
```objective-c /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * * by the Xiph.Org Foundation path_to_url * * * ******************************************************************** function: LSP (also called LSF) conversion routines last mod: $Id: lsp.h 16227 2009-07-08 06:58:46Z xiphmont $ ********************************************************************/ #ifndef _V_LSP_H_ #define _V_LSP_H_ extern int vorbis_lpc_to_lsp(float *lpc,float *lsp,int m); extern void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln, float *lsp,int m, float amp,float ampoffset); #endif ```
Bruce Filosa is an American retired college athletics administrator and former football coach. He was the athletics director at Brooklyn College from 1994 to 2023. Filosa served as head football coach at Brooklyn College from 1983 through the schools' final season of football in 1990, compiling a record of 14–54. He came to Brooklyn College in 1981 as an assistant football coach after working in the same capacity at Sheepshead Bay High School. Head coaching record Football References External links Brooklyn profile Year of birth missing (living people) Living people Brooklyn Bulldogs athletic directors Brooklyn Kingsmen football coaches College softball coaches in the United States High school football coaches in New York (state) Sportspeople from Brooklyn Coaches of American football from New York (state)
Omira is an unincorporated community in Lassen County, California. It is located on the Western Pacific Railroad west-northwest of Constantia, at an elevation of 4347 feet (1325 m). A post office operated at Omira from 1910 to 1911 and from 1915 to 1918. The town was named by railroad officials for a woman who promised to build a church there if the town were named for her. The Omira station closed in 1927. References Unincorporated communities in California Unincorporated communities in Lassen County, California
Beatrice Louise "Bea" Maddock (13 September 1934 – 9 April 2016) was an Australian artist. Biography Born in Hobart, Tasmania, Bea Maddock studied art education at the University of Tasmania, Hobart and taught secondary school in her home city before travelling abroad to study at the Slade School of Art, London. Her teachers included William Coldstream, Ceri Richards and Anthony Gross. Maddock visited Paris, Italy, the Netherlands and Germany, where she closely studied the work of the German Expressionists, who were a formative influence. She also stopped in Bombay, India during the return trip by ship to Australia. Maddock returned to Australia to teach in Launceston, Tasmania before settling in the state of Victoria. She taught printmaking at the Victorian College of the Arts for several years from 1970 and returned to Tasmania as Head of the School of Art, Launceston in 1983–84. Maddock was a Creative Arts Fellow at the Australian National University, Canberra in 1976. Maddock lived and worked at Mount Macedon, Victoria until the Ash Wednesday fires of 1983 forced her to flee. Her house, studio and a large archive of many decades' work was destroyed. She later returned to her native state of Tasmania. In 1987 Maddock participated in the 'Artists in Antarctica' program with Jan Senbergs and John Caldwell. While on that voyage, she badly fractured her leg on Heard Island, which compromised her mobility for several years afterwards. She was appointed Member of the Order of Australia in the 1991 Australia Day Honours for "service to art and to art education". Work Maddock is best known as a printmaker, in which area she had a profound impact on contemporary practice in Australia, combining printing with encaustic painting and installation art to explore the natural environment, Aboriginal Australia, and Australian history. She won many prizes and is represented in the National Gallery of Australia, all Australia State galleries, the Museum of Modern Art in New York and the USA's National Gallery in Washington. Maddock's most recent major work, 'Terra Spiritus... With a Darker Shade of Pale', is a 51 part inscribed etching of the entire coastline of Tasmania, each feature labelled with both the English and the Aboriginal Tasmanian topographic names. The pigments used to make the drawing are locally occurring Tasmanian ochres. Staff of the Queen Victoria Museum and Art Gallery in Launceston, Tasmania are currently preparing a catalogue raisonné. It will contain entries on 978 works produced by the artist between 1952 and 1983. Selected individual exhibitions Ingles Building, Launceston, Tasmania: 1964 Crossley Gallery, Melbourne: 1967, 1968, 1971 Queen Victoria Museum and Art Gallery, Launceston, Tasmania: 1970 Gallery A, Sydney: 1974, 1978 National Gallery of Victoria, Melbourne: 1975 (Three Printmakers), 1980 National Art Gallery of New Zealand, Wellington: 1982-3 (touring retrospective) Stuart Gerstman Galleries, Melbourne: 1988 Tasmania Museum and Art Gallery, Hobart: 1988 (Antarctic Journey, with John Caldwell and Jan Senbers), 1990 (Australian Printmakers, with Ray Arnold and Rod Ewins) Australian National Gallery, Canberra: 1992-3 (Being and Nothingness, touring retrospective) In collections Her work is represented in the collections of the National Gallery of Victoria (92 works), the National Gallery of Australia, the Art Gallery of South Australia, the Museum of Modern Art, the National Gallery of Canada (2 works), Te Papa (10 works) and the Lawrence Wilson Art Gallery at UWA. See also Art of Australia References Roger Butler & Anne Kirker (1991) Being and Nothingness: Bea Maddock, Work From Three Decades, Australian National Gallery (This work needs to be cited within the text) Further reading Irena Zdanowicz, ' "Geography with a Purpose": Bea Maddock's Terra Spiritus', Print Quarterly, XXVIII, 2011, pp.  471–77 External links Terra Spiritus Images of 317 prints by Bea Maddock 1934 births 2016 deaths 20th-century Australian women artists 20th-century Australian artists Australian printmakers Australian women painters Members of the Order of Australia Artists from Hobart Women printmakers
```ruby # frozen_string_literal: true require "securerandom" module Decidim module Verifications module Sms # A form object to be used when public users want to get verified using their phone. class MobilePhoneForm < AuthorizationHandler attribute :mobile_phone_number, String validates :mobile_phone_number, :verification_code, :sms_gateway, presence: true def handler_name "sms" end # A mobile phone can only be verified once but it should be private. def unique_id Digest::MD5.hexdigest( "#{mobile_phone_number}-#{Rails.application.secret_key_base}" ) end # When there is a phone number, sanitize it allowing only numbers and +. def mobile_phone_number return unless super super.gsub(/[^+0-9]/, "") end # The verification metadata to validate in the next step. def verification_metadata { verification_code:, code_sent_at: Time.current } end private def verification_code return unless sms_gateway return @verification_code if defined?(@verification_code) return unless sms_gateway.new(mobile_phone_number, generated_code, sms_gateway_context).deliver_code @verification_code = generated_code end def sms_gateway Decidim.sms_gateway_service.to_s.safe_constantize end def sms_gateway_context { organization: user&.organization } end def generated_code @generated_code ||= SecureRandom.random_number(1_000_000).to_s end end end end end ```
John Møller (9 January 1866 – 15 January 1935) was a Norwegian rifle shooter. He was born in Nes, Akershus. He won a silver medal in free rifle team at the 1906 Summer Olympics in Athens, together with Gudbrand Skatteboe, Julius Braathe, Albert Helgerud and Ole Holm. References 1866 births 1935 deaths People from Nes, Akershus People from Akershus Norwegian male sport shooters Shooters at the 1906 Intercalated Games Medalists at the 1906 Intercalated Games Olympic silver medalists for Norway Sportspeople from Viken (county) 20th-century Norwegian people
Estrone methyl ether, or estrone 3-methyl ether, is a synthetic estrogen and estrogen ether – specifically, the C3 methyl ether of estrone – which was never marketed. It has been used to synthesize mestranol (ethinylestradiol 3-methyl ether). See also List of estrogen esters § Ethers of steroidal estrogens References Abandoned drugs Estranes Estrogen ethers Ketones Synthetic estrogens
```javascript // // 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. const config = require('../config'); const Pubsub = require('@google-cloud/pubsub'); const pubsub = Pubsub({ projectId: config.get('GCLOUD_PROJECT') }); const feedbackTopic = pubsub.topic('feedback'); const answersTopic = pubsub.topic('answers'); function publishFeedback(feedback) { return feedbackTopic.publish({ data: feedback }); } function registerFeedbackNotification(cb) { feedbackTopic.subscribe('feedback-subscription', { autoAck: true }) .then(results => { const subscription = results[0]; subscription.on('message', message => { cb(message.data); }); subscription.on('error', err => { console.error(err); }); }); } function registerAnswerNotification(cb) { answersTopic.subscribe('answer-subscription', { autoAck: true }) .then(results => { const subscription = results[0]; subscription.on('message', message => { cb(message.data); }); subscription.on('error', err => { console.error(err); }); }); } function publishAnswer(answer) { return answersTopic.publish({ data: answer }); } // [START exports] module.exports = { publishAnswer, publishFeedback, registerFeedbackNotification, registerAnswerNotification }; // [END exports] ```
Abicht is a German surname derived from "Albrecht". Notable people with the surname include: Adolf Abicht (1793–1860), Polish-Lithuanian physician Albert Abicht (1893–1973), German farmer and politician Henryk Abicht (1835–1863), Polish independence activist Johann Georg Abicht (1672–1740), German theologian Johann Heinrich Abicht (1762–1816), German philosopher See also Abich German-language surnames
The electoral district of Springvale was an electoral district of the Legislative Assembly in the Australian state of Victoria. It was replaced in 2002, by the electoral districts of Lyndhurst and Mulgrave. Members for Springvale Election results See also Parliaments of the Australian states and territories List of members of the Victorian Legislative Assembly References Former electoral districts of Victoria (state) 1976 establishments in Australia 2002 disestablishments in Australia
```python # # This file made available under CC0 1.0 Universal (path_to_url # # Created with the Rule Development Kit: path_to_url # Can be used stand-alone or with the Rule Compliance Engine: path_to_url # ''' #################################### # Gherkin ## #################################### Rule Name: root-no-access-key Description: Ensure no root user access key exists Trigger: Periodic Reports on: AWS::::Account Rule Parameters: None Feature: In order to: restrict privileged user As: a Security Officer I want: to ensure that no access key for the root user exists Scenarios: Scenario 1: Given: Access key for root user present And: Access key is active Then: return NON_COMPLIANT Scenario 2: Given: Access key for root user present And: Access key is inactive Then: return NON_COMPLIANT Scenario 3: Given: Access Key for root user is not present Then: COMPLIANT ''' import json import datetime import boto3 import botocore ############## # Parameters # ############## # Define the default resource to report to Config Rules DEFAULT_RESOURCE_TYPE = 'AWS::::Account' # Set to True to get the lambda to assume the Role attached on the Config Service (useful for cross-account). ASSUME_ROLE_MODE = False ############# # Main Code # ############# def evaluate_compliance(event, configuration_item, valid_rule_parameters): """Form the evaluation(s) to be return to Config Rules Return either: None -- when no result needs to be displayed a string -- either COMPLIANT, NON_COMPLIANT or NOT_APPLICABLE a dictionary -- the evaluation dictionary, usually built by build_evaluation_from_config_item() a list of dictionary -- a list of evaluation dictionary , usually built by build_evaluation() Keyword arguments: event -- the event variable given in the lambda handler configuration_item -- the configurationItem dictionary in the invokingEvent valid_rule_parameters -- the output of the evaluate_parameters() representing validated parameters of the Config Rule Advanced Notes: 1 -- if a resource is deleted and generate a configuration change with ResourceDeleted status, the Boilerplate code will put a NOT_APPLICABLE on this resource automatically. 2 -- if a None or a list of dictionary is returned, the old evaluation(s) which are not returned in the new evaluation list are returned as NOT_APPLICABLE by the Boilerplate code 3 -- if None or an empty string, list or dict is returned, the Boilerplate code will put a "shadow" evaluation to feedback that the evaluation took place properly """ iam_client = get_client('iam', event) acc_summary = iam_client.get_account_summary() if acc_summary['SummaryMap']['AccountAccessKeysPresent'] == 0: return build_evaluation(event['accountId'], 'COMPLIANT', event) return build_evaluation(event['accountId'], 'NON_COMPLIANT', event, annotation='The root user has access key(s).') def evaluate_parameters(rule_parameters): """Evaluate the rule parameters dictionary validity. Raise a ValueError for invalid parameters. Return: anything suitable for the evaluate_compliance() Keyword arguments: rule_parameters -- the Key/Value dictionary of the Config Rules parameters """ valid_rule_parameters = rule_parameters return valid_rule_parameters #################### # Helper Functions # #################### # Build an error to be displayed in the logs when the parameter is invalid. def build_parameters_value_error_response(ex): """Return an error dictionary when the evaluate_parameters() raises a ValueError. Keyword arguments: ex -- Exception text """ return build_error_response(internalErrorMessage="Parameter value is invalid", internalErrorDetails="An ValueError was raised during the validation of the Parameter value", customerErrorCode="InvalidParameterValueException", customerErrorMessage=str(ex)) # This gets the client after assuming the Config service role # either in the same AWS account or cross-account. def get_client(service, event): """Return the service boto client. It should be used instead of directly calling the client. Keyword arguments: service -- the service name used for calling the boto.client() event -- the event variable given in the lambda handler """ if not ASSUME_ROLE_MODE: return boto3.client(service) credentials = get_assume_role_credentials(event["executionRoleArn"]) return boto3.client(service, aws_access_key_id=credentials['AccessKeyId'], aws_secret_access_key=credentials['SecretAccessKey'], aws_session_token=credentials['SessionToken'] ) # This generate an evaluation for config def build_evaluation(resource_id, compliance_type, event, resource_type=DEFAULT_RESOURCE_TYPE, annotation=None): """Form an evaluation as a dictionary. Usually suited to report on scheduled rules. Keyword arguments: resource_id -- the unique id of the resource to report compliance_type -- either COMPLIANT, NON_COMPLIANT or NOT_APPLICABLE event -- the event variable given in the lambda handler resource_type -- the CloudFormation resource type (or AWS::::Account) to report on the rule (default DEFAULT_RESOURCE_TYPE) annotation -- an annotation to be added to the evaluation (default None) """ eval_cc = {} if annotation: eval_cc['Annotation'] = annotation eval_cc['ComplianceResourceType'] = resource_type eval_cc['ComplianceResourceId'] = resource_id eval_cc['ComplianceType'] = compliance_type eval_cc['OrderingTimestamp'] = str(json.loads(event['invokingEvent'])['notificationCreationTime']) return eval_cc def build_evaluation_from_config_item(configuration_item, compliance_type, annotation=None): """Form an evaluation as a dictionary. Usually suited to report on configuration change rules. Keyword arguments: configuration_item -- the configurationItem dictionary in the invokingEvent compliance_type -- either COMPLIANT, NON_COMPLIANT or NOT_APPLICABLE annotation -- an annotation to be added to the evaluation (default None) """ eval_ci = {} if annotation: eval_ci['Annotation'] = annotation eval_ci['ComplianceResourceType'] = configuration_item['resourceType'] eval_ci['ComplianceResourceId'] = configuration_item['resourceId'] eval_ci['ComplianceType'] = compliance_type eval_ci['OrderingTimestamp'] = configuration_item['configurationItemCaptureTime'] return eval_ci #################### # Boilerplate Code # #################### # Helper function used to validate input def check_defined(reference, reference_name): if not reference: raise Exception('Error: ', reference_name, 'is not defined') return reference # Check whether the message is OversizedConfigurationItemChangeNotification or not def is_oversized_changed_notification(message_type): check_defined(message_type, 'messageType') return message_type == 'OversizedConfigurationItemChangeNotification' # Check whether the message is a ScheduledNotification or not. def is_scheduled_notification(message_type): check_defined(message_type, 'messageType') return message_type == 'ScheduledNotification' # Get configurationItem using getResourceConfigHistory API # in case of OversizedConfigurationItemChangeNotification def get_configuration(resource_type, resource_id, configuration_capture_time): result = AWS_CONFIG_CLIENT.get_resource_config_history( resourceType=resource_type, resourceId=resource_id, laterTime=configuration_capture_time, limit=1) configurationItem = result['configurationItems'][0] return convert_api_configuration(configurationItem) # Convert from the API model to the original invocation model def convert_api_configuration(configurationItem): for k, v in configurationItem.items(): if isinstance(v, datetime.datetime): configurationItem[k] = str(v) configurationItem['awsAccountId'] = configurationItem['accountId'] configurationItem['ARN'] = configurationItem['arn'] configurationItem['configurationStateMd5Hash'] = configurationItem['configurationItemMD5Hash'] configurationItem['configurationItemVersion'] = configurationItem['version'] configurationItem['configuration'] = json.loads(configurationItem['configuration']) if 'relationships' in configurationItem: for i in range(len(configurationItem['relationships'])): configurationItem['relationships'][i]['name'] = configurationItem['relationships'][i]['relationshipName'] return configurationItem # Based on the type of message get the configuration item # either from configurationItem in the invoking event # or using the getResourceConfigHistiry API in getConfiguration function. def get_configuration_item(invokingEvent): check_defined(invokingEvent, 'invokingEvent') if is_oversized_changed_notification(invokingEvent['messageType']): configurationItemSummary = check_defined(invokingEvent['configurationItemSummary'], 'configurationItemSummary') return get_configuration(configurationItemSummary['resourceType'], configurationItemSummary['resourceId'], configurationItemSummary['configurationItemCaptureTime']) elif is_scheduled_notification(invokingEvent['messageType']): return None return check_defined(invokingEvent['configurationItem'], 'configurationItem') # Check whether the resource has been deleted. If it has, then the evaluation is unnecessary. def is_applicable(configurationItem, event): try: check_defined(configurationItem, 'configurationItem') check_defined(event, 'event') except: return True status = configurationItem['configurationItemStatus'] eventLeftScope = event['eventLeftScope'] if status == 'ResourceDeleted': print("Resource Deleted, setting Compliance Status to NOT_APPLICABLE.") return (status == 'OK' or status == 'ResourceDiscovered') and not eventLeftScope def get_assume_role_credentials(role_arn): sts_client = boto3.client('sts') try: assume_role_response = sts_client.assume_role(RoleArn=role_arn, RoleSessionName="configLambdaExecution") return assume_role_response['Credentials'] except botocore.exceptions.ClientError as ex: # Scrub error message for any internal account info leaks print(str(ex)) if 'AccessDenied' in ex.response['Error']['Code']: ex.response['Error']['Message'] = "AWS Config does not have permission to assume the IAM role." else: ex.response['Error']['Message'] = "InternalError" ex.response['Error']['Code'] = "InternalError" raise ex # This removes older evaluation (usually useful for periodic rule not reporting on AWS::::Account). def clean_up_old_evaluations(latest_evaluations, event): cleaned_evaluations = [] old_eval = AWS_CONFIG_CLIENT.get_compliance_details_by_config_rule( ConfigRuleName=event['configRuleName'], ComplianceTypes=['COMPLIANT', 'NON_COMPLIANT'], Limit=100) old_eval_list = [] while True: for old_result in old_eval['EvaluationResults']: old_eval_list.append(old_result) if 'NextToken' in old_eval: next_token = old_eval['NextToken'] old_eval = AWS_CONFIG_CLIENT.get_compliance_details_by_config_rule( ConfigRuleName=event['configRuleName'], ComplianceTypes=['COMPLIANT', 'NON_COMPLIANT'], Limit=100, NextToken=next_token) else: break for old_eval in old_eval_list: old_resource_id = old_eval['EvaluationResultIdentifier']['EvaluationResultQualifier']['ResourceId'] newer_founded = False for latest_eval in latest_evaluations: if old_resource_id == latest_eval['ComplianceResourceId']: newer_founded = True if not newer_founded: cleaned_evaluations.append(build_evaluation(old_resource_id, "NOT_APPLICABLE", event)) return cleaned_evaluations + latest_evaluations # This decorates the lambda_handler in rule_code with the actual PutEvaluation call def lambda_handler(event, context): global AWS_CONFIG_CLIENT #print(event) check_defined(event, 'event') invoking_event = json.loads(event['invokingEvent']) rule_parameters = {} if 'ruleParameters' in event: rule_parameters = json.loads(event['ruleParameters']) try: valid_rule_parameters = evaluate_parameters(rule_parameters) except ValueError as ex: return build_parameters_value_error_response(ex) try: AWS_CONFIG_CLIENT = get_client('config', event) if invoking_event['messageType'] in ['ConfigurationItemChangeNotification', 'ScheduledNotification', 'OversizedConfigurationItemChangeNotification']: configuration_item = get_configuration_item(invoking_event) if is_applicable(configuration_item, event): compliance_result = evaluate_compliance(event, configuration_item, valid_rule_parameters) else: compliance_result = "NOT_APPLICABLE" else: return build_internal_error_response('Unexpected message type', str(invoking_event)) except botocore.exceptions.ClientError as ex: if is_internal_error(ex): return build_internal_error_response("Unexpected error while completing API request", str(ex)) return build_error_response("Customer error while making API request", str(ex), ex.response['Error']['Code'], ex.response['Error']['Message']) except ValueError as ex: return build_internal_error_response(str(ex), str(ex)) evaluations = [] latest_evaluations = [] if not compliance_result: latest_evaluations.append(build_evaluation(event['accountId'], "NOT_APPLICABLE", event, resource_type='AWS::::Account')) evaluations = clean_up_old_evaluations(latest_evaluations, event) elif isinstance(compliance_result, str): evaluations.append(build_evaluation_from_config_item(configuration_item, compliance_result)) elif isinstance(compliance_result, list): for evaluation in compliance_result: missing_fields = False for field in ('ComplianceResourceType', 'ComplianceResourceId', 'ComplianceType', 'OrderingTimestamp'): if field not in evaluation: print("Missing " + field + " from custom evaluation.") missing_fields = True if not missing_fields: latest_evaluations.append(evaluation) evaluations = clean_up_old_evaluations(latest_evaluations, event) elif isinstance(compliance_result, dict): missing_fields = False for field in ('ComplianceResourceType', 'ComplianceResourceId', 'ComplianceType', 'OrderingTimestamp'): if field not in compliance_result: print("Missing " + field + " from custom evaluation.") missing_fields = True if not missing_fields: evaluations.append(compliance_result) else: evaluations.append(build_evaluation_from_config_item(configuration_item, 'NOT_APPLICABLE')) # Put together the request that reports the evaluation status resultToken = event['resultToken'] testMode = False if resultToken == 'TESTMODE': # Used solely for RDK test to skip actual put_evaluation API call testMode = True # Invoke the Config API to report the result of the evaluation AWS_CONFIG_CLIENT.put_evaluations(Evaluations=evaluations, ResultToken=resultToken, TestMode=testMode) # Used solely for RDK test to be able to test Lambda function return evaluations def is_internal_error(exception): return ((not isinstance(exception, botocore.exceptions.ClientError)) or exception.response['Error']['Code'].startswith('5') or 'InternalError' in exception.response['Error']['Code'] or 'ServiceError' in exception.response['Error']['Code']) def build_internal_error_response(internalErrorMessage, internalErrorDetails=None): return build_error_response(internalErrorMessage, internalErrorDetails, 'InternalError', 'InternalError') def build_error_response(internalErrorMessage, internalErrorDetails=None, customerErrorCode=None, customerErrorMessage=None): error_response = { 'internalErrorMessage': internalErrorMessage, 'internalErrorDetails': internalErrorDetails, 'customerErrorMessage': customerErrorMessage, 'customerErrorCode': customerErrorCode } print(error_response) return error_response ```
```objective-c /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * file, You can obtain one at path_to_url */ /* Memory reporting infrastructure. */ #ifndef mozilla_MemoryReporting_h #define mozilla_MemoryReporting_h #include <stddef.h> #ifdef __cplusplus namespace mozilla { /* * This is for functions that are like malloc_usable_size. Such functions are * used for measuring the size of data structures. */ typedef size_t (*MallocSizeOf)(const void* p); } /* namespace mozilla */ #endif /* __cplusplus */ typedef size_t (*MozMallocSizeOf)(const void* p); #endif /* mozilla_MemoryReporting_h */ ```
```xml #import "RNSVGFeGaussianBlurManager.h" #import "RNSVGEdgeMode.h" #import "RNSVGFeGaussianBlur.h" @implementation RNSVGFeGaussianBlurManager RCT_EXPORT_MODULE() - (RNSVGFeGaussianBlur *)node { return [RNSVGFeGaussianBlur new]; } RCT_EXPORT_VIEW_PROPERTY(in1, NSString) RCT_EXPORT_VIEW_PROPERTY(stdDeviationX, NSNumber) RCT_EXPORT_VIEW_PROPERTY(stdDeviationY, NSNumber) RCT_EXPORT_VIEW_PROPERTY(edgeMode, RNSVGEdgeMode) @end ```
Hindu denominations, sampradayas, traditions, movements, and sects are traditions and sub-traditions within Hinduism centered on one or more gods or goddesses, such as Vishnu, Shiva, Shakti and so on. The term sampradaya is used for branches with a particular founder-guru with a particular philosophy. Hinduism has no central doctrinal authority and many practising Hindus do not claim to belong to any particular denomination or tradition. Four major traditions are, however, used in scholarly studies: Vaishnavism, Shaivism, Shaktism and Smartism. These are sometimes referred to as the denominations of Hinduism, and they differ in the primary deity at the centre of each tradition. A notable feature of Hindu denominations is that they do not deny other concepts of the divine or deity, and often celebrate the other as henotheistic equivalent. The denominations of Hinduism, states Lipner, are unlike those found in major religions of the world, because Hindu denominations are fuzzy with individuals practising more than one, and he suggests the term "Hindu polycentrism". Although Hinduism contains many denominations and philosophies, it is linked by shared concepts, recognisable rituals, cosmology, shared textual resources, pilgrimage to sacred sites and the questioning of authority. Typology The word Hindu is an exonym. This word Hindu is derived from the Indo-Aryan and Sanskrit word Sindhu, which means "a large body of water", covering "river, ocean". It was used as the name of the Indus River and also referred to its tributaries. The actual term 'hindu' first occurs, states Gavin Flood, as "a Persian geographical term for the people who lived beyond the river Indus (Sanskrit: Sindhu)". Hindus are persons who regard themselves as culturally, ethnically, or religiously adhering to aspects of Hinduism. Historically, the term has also been used as a geographical, cultural, and later religious identifier for people living in the Indian subcontinent. In the 18th century, European merchants and colonists began to refer to the followers of Indian religions collectively as Hindus until about mid 20th century. Hindus subscribe to a diversity of ideas on spirituality and traditions, but have no ecclesiastical order, no unquestionable religious authorities, no governing body, no prophet(s) nor any binding holy book; Hindus can choose to be polytheistic, pantheistic, monotheistic, monistic, agnostic, atheistic or humanist. Hinduism as it is commonly known can be subdivided into a number of major currents. Of the historical division into six darsanas (philosophies), two schools, Vedanta and Yoga, are currently the most prominent. Classified by primary deity or deities, four major Hinduism modern currents are Vaishnavism (Vishnu), Shaivism (Shiva), Shaktism (Shakti) and Smartism (five deities treated as same). These deity-centered denominations feature a synthesis of various philosophies such as Samkhya, Yoga and Vedanta, as well as shared spiritual concepts such as moksha, dharma, karma, samsara, ethical precepts such as ahimsa, texts (Upanishads, Puranas, Mahabharata, Agamas), ritual grammar and rites of passage. Six generic types (McDaniel) McDaniel (2007) distinguishes six generic types of Hinduism, in an attempt to accommodate a variety of views on a rather complex subject: Folk Hinduism, based on local traditions and cults of local deities and extending back to prehistoric times, or at least prior to written Vedas. Shrauta or "Vedic" Hinduism as practised by traditionalist brahmins (Shrautins). Vedantic Hinduism, including Advaita Vedanta (Smartism), based on the philosophical approach of the Upanishads. Yogic Hinduism, especially the sect based on the Yoga Sutras of Patanjali. "Dharmic" Hinduism or "daily morality", based on Karma and upon societal norms such as Vivāha (Hindu marriage customs). Bhakti or devotionalist practices Sampradaya In Hinduism, a sampradaya (IAST ) is a denomination. These are teaching traditions with autonomous practices and monastic centers, with a guru lineage, with ideas developed and transmitted, redefined and reviewed by each successive generation of followers. A particular guru lineage is called parampara. By receiving diksha (initiation) into the parampara of a living guru, one belongs to its proper sampradaya. Number of adherents There are no census data available on demographic history or trends for the traditions within Hinduism. Thus, the Shaivism and Shaktism traditions are difficult to separate, as many Shaiva Hindus revere the goddess Shakti regularly. The denominations of Hinduism, states Julius J. Lipner, are unlike those found in major religions of the world, because Hindu denominations are fuzzy with individuals revering gods and goddesses polycentrically, with many Shaiva and Vaishnava adherents recognizing Sri (Lakshmi), Parvati, Saraswati and other aspects of the goddess Devi. Similarly, Shakta Hindus revere Shiva and goddesses such as Parvati (such as Durga, Radha, Sita and others) and Saraswati important in Shaiva and Vaishnava traditions. Estimates vary on the relative number of adherents in the different traditions of Hinduism. According to a 2010 estimate by Johnson and Grim, the Vaishnavism tradition is the largest group with about 641 million or 67.6% of Hindus, followed by Shaivism with 252 million or 26.6%, Shaktism with 30 million or 3.2% and other traditions including Neo-Hinduism and Reform Hinduism with 25 million or 2.6%. In contrast, according to Jones and Ryan, Shaivism is the largest tradition of Hinduism. Main denominations Vaishnavism Vaishnavism is a devotional stream of Hinduism, which worships the god Vishnu as the Supreme Lord (Svayam Bhagavan). As well as Vishnu himself, followers of the denomination also worship Vishnu's ten incarnations (the Dashavatara). The two most-worshipped incarnations of Vishnu are Krishna (especially within Krishnaism as the Supreme) and Rama, whose stories are told in the Mahabharata and the Ramayana, respectively. The adherents of this sect are generally non-ascetic, monastic and devoted to meditative practice and ecstatic chanting. Vaishnavites are deeply devotional. Their religion is rich in saints, temples and scriptures. Among Historical Vishnuism are known the Bhagavatism, Pancharatra and Vaikhanasa traditions. The major living Vaishnava sampradayas include: Sri Vaishnavism ( Sri-Vaishnava Sampradaya/Sri Sampradaya/Iyengars/Vishistadvaita) is associated with Lakshmi. The principal acharyas are Ramanujacharya and Vedanta Desikan. Sri subsampradayas: Thenkalais. Manavala Mamunigal's sect is the oldest Vaishnava sect in India. This sampradaya was followed by Vyasa, Parasara, Bodhayana. The lineage of Acharya is Lord Narayana, next Lakshmi and then Vishweksenar, Nammalwar, Nathamuni, Uyyakondar, Manakal Nambi, Alavandar, Periya Nambi, Ramanujacharya and finally Vedanta Desikan as per the Vadagalai sampradaya. Vadakalais Munitraya Ramanandi Sampradaya, also known as the Ramayat Sampradaya or the Ramavat Sampradaya adheres to the teachings of the Advaita scholar Ramananda. This is the largest monastic group within Hinduism and in Asia, and these Vaishnava monks are known as Ramanandis, Vairagis or Bairagis. Brahma Sampradaya is associated with Vishnu, who is the Para-Brahma (Universal Creator), not to be confused with the Brahma deity. The founder of this sampradaya was the Dvaita Vedanta philosopher Madhvacharya. Its modern form is Haridasa and Sadh Vaishnavism. Gaudiya Vaishnavism ( Chaitanya Sampradaya) is associated with Brahma Sampradaya, and is associated with Chaitanya Mahaprabhu (Gaurangacharya): Brahmanic traditional lineages Sri Caitanya Prema Samsthana Gaudiya Math reform lineages Gaudiya Mission Gaudiya Vedanta Samiti International Society for Krishna Consciousness (ISKCON) ISKCON Revival Movement Science of Identity Foundation Sri Caitanya Sangha Sri Chaitanya Saraswat Math Sri Sri Radha Govindaji Trust World Vaisnava Association Manipuri Vaishnavism is a regional form of Gaudiya Vaishnavism and continues to be followed across Manipur with well-defined traditions and devotional practices. Kumara Sampradaya ( Nimbarka Sampradaya) is the tradition associated with Four Kumaras and the principal acharya Nimbarkacharya. Rudra Sampradaya. The principal acharya is Vallabhacharya, the founder of Pushtimarg tradition. Warkari Sampradaya, adheres to teaching of prominent bhakti saints of Maharashtra like Namadeva, Jnaneshwara, Eknath, Tukaram as well as Changadeva, Muktabai, Gora Kumbhar, Savata Mali, Narahari Sonar, Janabai, Sena Nhavi and Kanhopatra. The Warkari Sampradaya promotes the worship of god Vithoba, which is a manifestation of Krishna. Minor and regional Vaishnavite schools and the principal acharyas connected with them are: Balmikism, linked to sage Valmiki. Ekasarana Dharma ( Asomiya Vaishnavism), adheres to the teachings of Srimanta Sankaradeva. Kapadi Sampradaya. Mahanam Sampradaya, adheres to the teachings of Prabhu Jagadbandu who is considered to be the incarnation of Chaitanya Mahaprabhu the founder of Gaudiya Vaishnavism considered to be an avatar of Radha Krishna. Mahanubhava panth, adheres to the teachings of Sarvajna Shri Chakradhara. Odia Vaishnavism ( Jagannathism), the regional cult of the god Jagannath as abstract form of Krishna. Pranami (Pranami Sampradaya), adheres to the teachings of Devachandra Maharaj. Radha Vallabh Sampradaya, adheres to the teachings of Hith Harivansh Mahaprabhu, emphasizes on the devotion of goddess Radha as the supreme being. Ramsnehi Sampradaya. Vaishnava-Sahajiya (tantric). Baul. Swaminarayan Sampradya, adheres to the teachings of Sahajanand Swami, otherwise known as Swaminarayan. Shaivism Shaivas or Shaivites are those who primarily worship Shiva as the supreme god, both immanent and transcendent. Shaivism embraces at the same time monism (specifically nondualism) and dualism. To Shaivites, Shiva is both with and without form; he is the Supreme Dancer, Nataraja; and is linga, without beginning or end. Shiva is sometimes depicted as the fierce god Bhairava. Saivists are more attracted to asceticism than devotees of other Hindu sects, and may be found wandering India with ashen faces performing self-purification rituals. They worship in the temple and practice yoga, striving to be one with Shiva within. The major schools of Śaivism include: Saiva Siddhanta, adheres to the teachings of Tirumular/Sundaranatha (Nandinatha Sampradaya, the monistic school) or of Meykandadeva (Meykandar Sampradaya, the dualistic school). Saiva Siddhanta Temple in United States. Shiva Advaita, adheres to the teachings of Nilakantha (Srikantha) and Appayya Dikshitar. Kashmir Shaivism, adheres to the teachings of Vasugupta and his disciplinic lineage, including Abhinavagupta. Pashupata Shaivism, adheres to the teachings of Lakulisa. Aghori. Kapalika. Nath. Adinath Sampradaya or Siddha Siddhanta, adheres to the teachings of Gorakhnatha and Matsyendranatha. Inchegeri Sampradaya. Other branches: Lingayatism or Veerashaivism is a distinct Shaivite tradition in India, established in the 12th century by the philosopher and social reformer Basavanna. It makes several departures from mainstream Hinduism and propounds monotheism through worship centered on Lord Shiva in the form of linga or Ishtalinga. It also rejects the authority of the Vedas and the caste system. Aaiyyanism is a religion claiming to be a form of pure Dravidian Hinduism and identifying as a Shaivite branch. It is incorporated in the Aaiyyan World Forum. Indonesian Shaivism. Shaktism Shaktas worship Goddess as Mother Shakti, in different forms. These forms may include Kali, Parvati/Durga, Lakshmi and Saraswati. The branch of Hinduism that worships the goddess, known as Devi, is called Shaktism. Followers of Shaktism recognize Shakti as the supreme power of the universe. Devi is often depicted as Parvati (the consort of Shiva) or as Lakshmi (the consort of Vishnu). She is also depicted in other manifestations, such as the protective Durga or the violent Kali. Shaktism is closely related with Tantric Hinduism, which teaches rituals and practices for purification of the mind and body. Animal sacrifice of cockerels, goats and to a lesser extent water buffaloes is practiced by Shakti devotees, mainly at temples of Goddesses such as Bhavani or Kali. The main traditions are: Kalikula; Srikula. Caribbean Shaktism of the Caribbean The Goddess-centric traditions within Kashmir Shaivism are Trika and Kubjika. Smartism Smartas treat all deities as the same, and their temples include five deities (Pancopasana) or Panchadevata as personal saguna (divine with form) manifestation of the nirguna (divine without form) Absolute, the Brahman. The choice of the nature of God is up to the individual worshiper since different manifestations of God are held to be equivalent. It is nonsectarian as it encourages the worship of any personal god along with others such as Ganesha, Shiva, Shakti, Vishnu, Surya. The Smarta Tradition accepts two concepts of Brahman, which are the saguna brahman – the Brahman with attributes, and nirguna brahman – the Brahman without attributes. The nirguna Brahman is the unchanging Reality, however, the saguna Brahman is posited as a means to realizing this nirguna Brahman. The concept of the saguna Brahman is considered in this tradition to be a useful symbolism and means for those who are still on their spiritual journey, but the saguna concept is abandoned by the fully enlightened once he or she realizes the identity of their own soul with that of the nirguna Brahman. A Smarta may choose any saguna deity (istadevata) such as Vishnu, Shiva, Shakti, Surya, Ganesha or any other, and this is viewed in Smarta Tradition as an interim step towards meditating on Om and true nature of supreme reality, thereby realizing the nirguna Brahman and its equivalence to one's own Atman, as in Advaita Vedanta. The movement is credited to Shankara (~8th century CE), who is regarded as the greatest teacher and reformer of the Smarta. According to Hiltebeitel, Shankara established the nondualist interpretation of the Upanishads as the touchstone of a revived smarta tradition. The Sringeri Sharada monastery in Karnataka, believed by it's members to be founded by Adi Shankara Acharya, is still the centre of the Smarta sect for its followers. Smartas follow 4 other major Mathas namely, Kanchi Kamakoti Peet, Puri Govardan Peet, Dwaraka Sarada Peet and Jyotir mutt. All institutions are headed by Sankaracharyas . The traditions are: Udasi Sampradaya Panchayatana puja, also known as Pancha Devi Deva Puja is a system of puja (worship) within the Smarta sampradaya. Overlap Halbfass states that, although traditions such as Shaivism and Vaishnavism may be regarded as "self-contained religious constellations", there is a degree of interaction and reference between the "theoreticians and literary representatives" of each tradition which indicates the presence of "a wider sense of identity, a sense of coherence in a shared context and of inclusion in a common framework and horizon". It is common to find Hindus revering Shiva, Vishnu and Shakti, and celebrating festivals related to them at different times of the year. Temples often feature more than one of them, and Hinduism is better understood as polycentric theosophy that leaves the choice of deity and ideas to the individual. The key concepts and practises of the four major denominations of Hinduism can be compared as below: Other denominations Suryaism / Saurism The Suryaites or Sauras are followers of a Hindu denomination that started in Vedic tradition, and worship Surya as the main visible form of the Saguna Brahman. The Saura tradition was influential in South Asia, particularly in the west, north and other regions, with numerous Surya idols and temples built between 800 and 1000 CE. The Konark Sun Temple was built in the mid 13th century. During the iconoclasm of Islamic invasions and Hindu–Muslim wars, the temples dedicated to Sun-god were among those desecrated, images smashed and the resident priests of Saura tradition were killed, states André Wink. The Surya tradition of Hinduism declined in the 12th and 13th century CE and today remains as a very small movement except in Bihar / Jharkhand and Eastern Uttar Pradesh. Sun worship has continued to be a dominant practice in Bihar / Jharkhand and Eastern Uttar Pradesh in the form of Chhath Puja which is considered the primary festival of importance in these regions. Ganapatism Ganapatism is a Hindu denomination in which Lord Ganesha is worshipped as the main form of the Saguna Brahman. This sect was widespread and influential in the past and has remained important in Maharashtra. Indonesian Hinduism Hinduism dominated the island of Java and Sumatra until the late 16th century, when a vast majority of the population converted to Islam. Only the Balinese people who formed a majority on the island of Bali, retained this form of Hinduism over the centuries. Theologically, Balinese or Indonesian Hinduism is closer to Shaivism than to other major sects of Hinduism. The adherents consider Acintya the supreme god, and all other gods as his manifestations. The term "Agama Hindu Dharma", the endonymous Indonesian name for "Indonesian Hinduism" can also refer to the traditional practices in Kalimantan, Sumatra, Sulawesi and other places in Indonesia, where people have started to identify and accept their agamas as Hinduism or Hindu worship has been revived. The revival of Hinduism in Indonesia has given rise to a national organisation, the Parisada Hindu Dharma. Shrautism Shrauta communities are very rare in India, the most well known being the ultra-orthodox Nambudiri Brahmins of Kerala. They follow the "Purva-Mimamsa" (earlier portion of Vedas) in contrast to Vedanta followed by other Brahmins. They place importance on the performance of Vedic Sacrifice (Yajna). The Nambudiri Brahmins are famous for their preservation of the ancient Somayaagam, Agnicayana rituals which have vanished in other parts of India. Kaumaram Kaumaram is a sect of Hindus, especially found in South India and Sri Lanka where Lord Muruga Karttikeya is the Supreme Godhead. Lord Muruga is considered superior to the Trimurti. The worshippers of Lord Muruga are called Kaumaras. Dattatreya Sampradaya Dattatreya Sampradaya is a Hindu denomination associated with the worship of Dattatreya as the supreme god. This denomination found in Indian states like Maharashtra, Andhra Pradesh, Karnataka, Goa, Telangana, Gujarat, Madhya Pradesh, Rajasthan and Uttarakhand. Dattatreya is often considered as an avatara of three Hindu gods Brahma, Vishnu and Shiva, collectively known as the Trimurti. Main traditions linked with Dattatreya Sampradaya are: Gurucharitra tradition - This tradition is named after the Marathi text Gurucharitra and it is based on the teachings of Nrusinha Saraswati as well as Shripada Shrivallabha. This tradition is widespread in Deccan region. Avadhuta Tradition. Sant Mat The Sant Mat was a group of reformer poet-sants and their adherents within Hinduism during the 14th–17th centuries who had desire for religious pluralism and non-ritualistic spirituality. Due to Kabir's affiliation with Vaishnavite Ramanandi Sampradaya and certain aspects of the creed, the Sant Mat is sometimes seen as part of Vaishnavism. Among its living traditions are: Dadupanth Kabir panth Ravidassia religion Sadh Udasi Nirmala Nanak Panth Newer movements The Hindu new religious movements that arose in the 19th to 20th century include: American Meditation Institute Ananda (Ananda Yoga) Ananda Ashrama Ananda Marga Art of Living Foundation Arya Samaj Ayyavazhi Brahma Kumaris Brahmoism (Brahmo Samaj) Adi Dharm Sadharan Brahmo Samaj Chinmaya Mission Datta Yoga Divine Life Society Hanuman Foundation Himalayan Institute of Yoga Science and Philosophy Hindutva Akhil Bharat Hindu Mahasabha Hindu Janajagruti Samiti Sanatan Sanstha Hindu Munnani Hindu Sena Hindu Yuva Vahini Rashtriya Swayamsevak Sangh (a.k.a. Sangh Parivar) Hindu Jagran Manch Vishva Hindu Parishad International Vedanta Society Isha Foundation Kriya Yoga Centers Mahima Dharma Mata Amritanandamayi Math Matua Mahasangha Meivazhi Narayana Dharma Nilachala Saraswata Sangha Oneness Movement Prarthana Samaj Ramakrishna Mission / Ramakrishna Math (a.k.a. Vedanta Society) Sahaja Yoga Sathya Sai Baba movement Satsang Satya Dharma School of Philosophy and Economic Science Self-Realization Fellowship / Yogoda Satsanga Shirdi Sai Baba movement Shri Ram Chandra Mission Shree Shree Anandamayee Sangha Siddha Yoga Sivananda Yoga Vedanta Centres Sri Aurobindo Ashram Sri Chinmoy Centres Sri Ramana Ashram Neo-Advaita Society of Abidance in Truth Swadhyay Parivar Transcendental Meditation Virat Hindustan Sangam Sarnaism Sarna are sacred groves in the Indian religious traditions of the Chota Nagpur Plateau region in the states of Jharkhand, Bihar, Assam and Chhattisgarh. Followers of these rituals primarily belong to the Munda, Bhumij, Kharia, Baiga, Ho, Kurukh and Santal. According to local belief, a Gram deoti or village deity resides in the sarna, where sacrifice is offered twice a year. Their belief system is called "Sarnaism", "Sarna Dharma" or "Religion of the Holy Woods". Kiratism The practice is also known as Kirat Veda, Kirat-Ko Veda or Kirat Ko Ved. According to some scholars, such as Tom Woodhatch, it is shamanism, animistic religion or blend of shamanism, animism (e.g., ancestor worshiping of Yuma Sammang/Tagera Ningwaphumang and Paruhang/Sumnima), and Shaivism. Related denominations Kalash and Nuistani religion The Indo-Aryan Kalash people in Pakistan traditionally practice an indigenous religion which some authors characterise as a form of ancient Hinduism. The Nuristanis of Afghanistan and Pakistan until the late 19th century had followed a religion which was described as a form of ancient Hinduism. Contemporary Sant Mat The contemporary Sant Mat is a 19th-century origin movement. Scholars are divided as to whether to call Radha Soami a 1) Sikh-derived or 2) Hindu–Sikh-synthesed or 3) independent version of the medieval Sant Mat as new universal religion. Advait Mat Radha Soami Radha Soami Satsang Beas Radha Soami Satsang Dayalbagh Radha Swami Satsang Dinod Ruhani Satsang Radha Soami-influenced Ancient Teachings of the Masters Dera Sacha Sauda Eckankar Elan Vital, formerly Divine Light Mission Manavta Mandir Movement of Spiritual Inner Awareness Science of Spirituality Sawan Kirpal Ruhani Mission Slavic Vedism Slavic, Russian, Peterburgian Vedism or simply Vedism are terms used to describe one of the earliest branch of Slavic Native Faith ("Rodnovery")—contemporary indigenous development of Vedic forms of religion in Russia, especially of Saint Petersburg's communities, other Slavic countries, and generally all the post-Soviet states. The word "Vedism" comes from the verb "to know" (vedatʼ)—a semantic root which is shared in Slavic and Sanskrit languages alike. Slavic Vedism involves the worship of Vedic gods, characterised by its use of indigenous Slavic rituals and Slavic names for the deities, distinguishing from other groups which have maintained a stronger bond with modern Hinduism, although Krishnaite groups often identify themselves as "Vedic" too. Also some syncretic groups within Slavic Native Faith (Slavic Neopaganism) use the term "Vedism". Cross-denominational influences Atman Jnana Jñāna is a Sanskrit word that means knowledge. In Vedas it means true knowledge, that (atman) is identical with Brahman. It is also referred to as Atma Jnana which is frequently translated as self-realization. Bhakti movement The Bhakti movement was a theistic devotional trend that originated in the seventh-century Tamil south India (now parts of Tamil Nadu and Kerala), and spread northwards. It swept over east and north India from the fifteenth-century onwards, reaching its zenith between the 15th and 17th century CE. The Bhakti movement regionally developed as Hindu denominations around different gods and goddesses, such as Vaishnavism (Vishnu), Shaivism (Shiva), Shaktism (Shakti goddesses), and Smartism. The movement was inspired by many poet-saints, who championed a wide range of philosophical positions ranging from theistic dualism of Dvaita to absolute monism of Advaita Vedanta. Scriptures of the Bhakti movement include the Bhagavad Gita, Bhagavata Purana and Padma Purana. As part of the legacy of the Alvars, five Vaishnava philosophical traditions (sampradayas) has developed at the later stages. Philosophical schools Hindu philosophy is traditionally divided into six ( "orthodox") schools of thought, or (दर्शनम्, "view"), which accept the Vedas as the supreme revealed scriptures. The schools are: Samkhya, a non theistic and strongly dualist theoretical exposition of consciousness and matter. Yoga, a school emphasizing meditation, contemplation and liberation. Nyaya or logic, explores sources of knowledge. Nyāya Sūtras. Vaisheshika, an empiricist school of atomism Mimāṃsā, an anti-ascetic and anti-mysticist school of orthopraxy Vedanta, the last segment of knowledge in the Vedas, or the 'Jnan' (knowledge) 'Kanda' (section). The nāstika/heterodox schools are (in chronological order): Cārvāka Jainism Ājīvika Buddhism Ajñana However, medieval philosophers like Vidyāraṇya classified Indian philosophy into sixteen schools, where schools belonging to Saiva, Pāṇini and Raseśvara thought are included with others, and the three Vedantic schools Advaita, Vishishtadvaita and Dvaita (which had emerged as distinct schools by then) are classified separately. In Hindu history, the distinction of the six orthodox schools was current in the Gupta period "golden age" of Hinduism. With the disappearance of Vaisheshika and Mimamsa, it was obsolete by the later Middle Ages and modern times, when the various sub-schools of Vedanta began to rise to prominence as the main divisions of religious philosophy, as follows: Advaita Vedanta Akshar-Purushottam Darshan Bhedabheda Achintya Bheda Abheda Dvaitadvaita Dvaita Vedanta Integral yoga Pratyabhijna Shaiva Siddhanta Shiva Advaita Shuddhadvaita Vishishtadvaita Nyaya survived into the 17th century as Navya Nyaya "Neo-Nyaya", while Samkhya gradually lost its status as an independent school, its tenets absorbed into Yoga and Vedanta. Yoga varieties Ananda Yoga Bhakti yoga Hatha yoga Bihar School of Yoga Integral Yoga Jivamukti Yoga Jnana yoga Karma yoga Kripalu Yoga Kriya Yoga Kundalini yoga Raja yoga Sahaja Yoga Siddha Yoga Sivananda yoga Surat Shabd Yoga Tantric Yoga See also Donyipoloism Sanamahism Shanmata List of Hindu organisations Notes References Sources Vol. 1 | Vol. 2 | Vol. 3 | Vol. 4 | Vol. 5. External links Overview of the four divisions of Hinduism Description of four denominations Religious denominations
```php <?php /** * Twenty Nineteen: Customizer * * @package WordPress * @subpackage Twenty_Nineteen * @since Twenty Nineteen 1.0 */ /** * Add postMessage support for site title and description for the Theme Customizer. * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ function twentynineteen_customize_register( $wp_customize ) { $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; if ( isset( $wp_customize->selective_refresh ) ) { $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.site-title a', 'render_callback' => 'twentynineteen_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'render_callback' => 'twentynineteen_customize_partial_blogdescription', ) ); } /** * Primary color. */ $wp_customize->add_setting( 'primary_color', array( 'default' => 'default', 'transport' => 'postMessage', 'sanitize_callback' => 'twentynineteen_sanitize_color_option', ) ); $wp_customize->add_control( 'primary_color', array( 'type' => 'radio', 'label' => __( 'Primary Color', 'twentynineteen' ), 'choices' => array( 'default' => _x( 'Default', 'primary color', 'twentynineteen' ), 'custom' => _x( 'Custom', 'primary color', 'twentynineteen' ), ), 'section' => 'colors', 'priority' => 5, ) ); // Add primary color hue setting and control. $wp_customize->add_setting( 'primary_color_hue', array( 'default' => 199, 'transport' => 'postMessage', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_color_hue', array( 'description' => __( 'Apply a custom color for buttons, links, featured images, etc.', 'twentynineteen' ), 'section' => 'colors', 'mode' => 'hue', ) ) ); // Add image filter setting and control. $wp_customize->add_setting( 'image_filter', array( 'default' => 1, 'sanitize_callback' => 'absint', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'image_filter', array( 'label' => __( 'Apply a filter to featured images using the primary color', 'twentynineteen' ), 'section' => 'colors', 'type' => 'checkbox', ) ); } add_action( 'customize_register', 'twentynineteen_customize_register' ); /** * Render the site title for the selective refresh partial. * * @return void */ function twentynineteen_customize_partial_blogname() { bloginfo( 'name' ); } /** * Render the site tagline for the selective refresh partial. * * @return void */ function twentynineteen_customize_partial_blogdescription() { bloginfo( 'description' ); } /** * Bind JS handlers to instantly live-preview changes. */ function twentynineteen_customize_preview_js() { wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181214', array( 'in_footer' => true ) ); } add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' ); /** * Load dynamic logic for the customizer controls area. */ function twentynineteen_panels_js() { wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181214', array( 'in_footer' => true ) ); } add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' ); /** * Sanitize custom color choice. * * @param string $choice Whether image filter is active. * @return string */ function twentynineteen_sanitize_color_option( $choice ) { $valid = array( 'default', 'custom', ); if ( in_array( $choice, $valid, true ) ) { return $choice; } return 'default'; } ```
```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\Contentwarehouse; class GoogleCloudDocumentaiV1DocumentPageBlock extends \Google\Collection { protected $collection_key = 'detectedLanguages'; protected $detectedLanguagesType = GoogleCloudDocumentaiV1DocumentPageDetectedLanguage::class; protected $detectedLanguagesDataType = 'array'; protected $layoutType = GoogleCloudDocumentaiV1DocumentPageLayout::class; protected $layoutDataType = ''; protected $provenanceType = GoogleCloudDocumentaiV1DocumentProvenance::class; protected $provenanceDataType = ''; /** * @param GoogleCloudDocumentaiV1DocumentPageDetectedLanguage[] */ public function setDetectedLanguages($detectedLanguages) { $this->detectedLanguages = $detectedLanguages; } /** * @return GoogleCloudDocumentaiV1DocumentPageDetectedLanguage[] */ public function getDetectedLanguages() { return $this->detectedLanguages; } /** * @param GoogleCloudDocumentaiV1DocumentPageLayout */ public function setLayout(GoogleCloudDocumentaiV1DocumentPageLayout $layout) { $this->layout = $layout; } /** * @return GoogleCloudDocumentaiV1DocumentPageLayout */ public function getLayout() { return $this->layout; } /** * @param GoogleCloudDocumentaiV1DocumentProvenance */ public function setProvenance(GoogleCloudDocumentaiV1DocumentProvenance $provenance) { $this->provenance = $provenance; } /** * @return GoogleCloudDocumentaiV1DocumentProvenance */ public function getProvenance() { return $this->provenance; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(GoogleCloudDocumentaiV1DocumentPageBlock::class, your_sha256_hashageBlock'); ```
```c /****************************************************************************** * * Name: hwtimer.c - ACPI Power Management Timer Interface * *****************************************************************************/ /****************************************************************************** * * * All rights reserved. * * * 2.1. This is your license from Intel Corp. under its intellectual property * rights. You may have additional license terms from the party that provided * you this software, covering your right to use that party's intellectual * property rights. * * copy of the source code appearing in this file ("Covered Code") an * irrevocable, perpetual, worldwide license under Intel's copyrights in the * base code distributed originally by Intel ("Original Intel Code") to copy, * make derivatives, distribute, use and display any portion of the Covered * Code in any form, with the right to sublicense such rights; and * * license (with the right to sublicense), under only those claims of Intel * patents that are infringed by the Original Intel Code, to make, use, sell, * offer to sell, and import the Covered Code and derivative works thereof * solely to the minimum extent necessary to exercise the above copyright * license, and in no event shall the patent license extend to any additions * to or modifications of the Original Intel Code. No other license or right * is granted directly or by implication, estoppel or otherwise; * * The above copyright and patent license is granted only if the following * conditions are met: * * 3. Conditions * * 3.1. Redistribution of Source with Rights to Further Distribute Source. * Redistribution of source code of any substantial portion of the Covered * Code or modification with rights to further distribute source must include * and the following Disclaimer and Export Compliance provision. In addition, * must include a prominent statement that the modification is derived, * directly or indirectly, from Original Intel Code. * * 3.2. Redistribution of Source with no Rights to Further Distribute Source. * Redistribution of source code of any substantial portion of the Covered * Code or modification without rights to further distribute source must * include the following Disclaimer and Export Compliance provision in the * documentation and/or other materials provided with distribution. In * portion of the Covered Code, and must include terms to the effect that the * not to intellectual property embodied in modifications its licensee may * make. * * 3.3. Redistribution of Executable. Redistribution in executable form of any * substantial portion of the Covered Code or modification must reproduce the * provision in the documentation and/or other materials provided with the * distribution. * * 3.4. Intel retains all right, title, and interest in and to the Original * Intel Code. * * 3.5. Neither the name Intel nor any other trademark owned or controlled by * Intel shall be used in advertising or otherwise to promote the sale, use or * other dealings in products derived from or relating to the Covered Code * without prior written authorization from Intel. * * 4. Disclaimer and Export Compliance * * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A * PARTICULAR PURPOSE. * * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY * LIMITED REMEDY. * * software or system incorporating such software without first obtaining any * required license or other approval from the U. S. Department of Commerce or * any other agency or department of the United States Government. In the * ensure that the distribution and export/re-export of the software is in * compliance with all laws, regulations, orders, or other restrictions of the * any of its subsidiaries will export/re-export any technical data, process, * software, or service, directly or indirectly, to any country for which the * United States government or any agency thereof requires an export license, * other governmental approval, or letter of assurance, without first obtaining * such license, approval or letter. * ***************************************************************************** * * Alternatively, you may choose to be licensed under the terms of the * following license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions, and the following disclaimer, * without modification. * 2. Redistributions in binary form must reproduce at minimum a disclaimer * substantially similar to the "NO WARRANTY" disclaimer below * ("Disclaimer") and any redistribution must be conditioned upon * including a substantially similar Disclaimer requirement for further * binary redistribution. * 3. Neither the names of the above-listed copyright holders nor the names * of any contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * 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. * * Alternatively, you may choose to be licensed under the terms of the * Software Foundation. * *****************************************************************************/ #define EXPORT_ACPI_INTERFACES #include "acpi.h" #include "accommon.h" #define _COMPONENT ACPI_HARDWARE ACPI_MODULE_NAME ("hwtimer") #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ /****************************************************************************** * * FUNCTION: AcpiGetTimerResolution * * PARAMETERS: Resolution - Where the resolution is returned * * RETURN: Status and timer resolution * * DESCRIPTION: Obtains resolution of the ACPI PM Timer (24 or 32 bits). * ******************************************************************************/ ACPI_STATUS AcpiGetTimerResolution ( UINT32 *Resolution) { ACPI_FUNCTION_TRACE (AcpiGetTimerResolution); if (!Resolution) { return_ACPI_STATUS (AE_BAD_PARAMETER); } if ((AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER) == 0) { *Resolution = 24; } else { *Resolution = 32; } return_ACPI_STATUS (AE_OK); } ACPI_EXPORT_SYMBOL (AcpiGetTimerResolution) /****************************************************************************** * * FUNCTION: AcpiGetTimer * * PARAMETERS: Ticks - Where the timer value is returned * * RETURN: Status and current timer value (ticks) * * DESCRIPTION: Obtains current value of ACPI PM Timer (in ticks). * ******************************************************************************/ ACPI_STATUS AcpiGetTimer ( UINT32 *Ticks) { ACPI_STATUS Status; UINT64 TimerValue; ACPI_FUNCTION_TRACE (AcpiGetTimer); if (!Ticks) { return_ACPI_STATUS (AE_BAD_PARAMETER); } /* ACPI 5.0A: PM Timer is optional */ if (!AcpiGbl_FADT.XPmTimerBlock.Address) { return_ACPI_STATUS (AE_SUPPORT); } Status = AcpiHwRead (&TimerValue, &AcpiGbl_FADT.XPmTimerBlock); if (ACPI_SUCCESS (Status)) { /* ACPI PM Timer is defined to be 32 bits (PM_TMR_LEN) */ *Ticks = (UINT32) TimerValue; } return_ACPI_STATUS (Status); } ACPI_EXPORT_SYMBOL (AcpiGetTimer) /****************************************************************************** * * FUNCTION: AcpiGetTimerDuration * * PARAMETERS: StartTicks - Starting timestamp * EndTicks - End timestamp * TimeElapsed - Where the elapsed time is returned * * RETURN: Status and TimeElapsed * * DESCRIPTION: Computes the time elapsed (in microseconds) between two * PM Timer time stamps, taking into account the possibility of * rollovers, the timer resolution, and timer frequency. * * The PM Timer's clock ticks at roughly 3.6 times per * _microsecond_, and its clock continues through Cx state * transitions (unlike many CPU timestamp counters) -- making it * a versatile and accurate timer. * * Note that this function accommodates only a single timer * rollover. Thus for 24-bit timers, this function should only * be used for calculating durations less than ~4.6 seconds * (~20 minutes for 32-bit timers) -- calculations below: * * 2**24 Ticks / 3,600,000 Ticks/Sec = 4.66 sec * 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes * ******************************************************************************/ ACPI_STATUS AcpiGetTimerDuration ( UINT32 StartTicks, UINT32 EndTicks, UINT32 *TimeElapsed) { ACPI_STATUS Status; UINT64 DeltaTicks; UINT64 Quotient; ACPI_FUNCTION_TRACE (AcpiGetTimerDuration); if (!TimeElapsed) { return_ACPI_STATUS (AE_BAD_PARAMETER); } /* ACPI 5.0A: PM Timer is optional */ if (!AcpiGbl_FADT.XPmTimerBlock.Address) { return_ACPI_STATUS (AE_SUPPORT); } if (StartTicks == EndTicks) { *TimeElapsed = 0; return_ACPI_STATUS (AE_OK); } /* * Compute Tick Delta: * Handle (max one) timer rollovers on 24-bit versus 32-bit timers. */ DeltaTicks = EndTicks; if (StartTicks > EndTicks) { if ((AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER) == 0) { /* 24-bit Timer */ DeltaTicks |= (UINT64) 1 << 24; } else { /* 32-bit Timer */ DeltaTicks |= (UINT64) 1 << 32; } } DeltaTicks -= StartTicks; /* * Compute Duration (Requires a 64-bit multiply and divide): * * TimeElapsed (microseconds) = * (DeltaTicks * ACPI_USEC_PER_SEC) / ACPI_PM_TIMER_FREQUENCY; */ Status = AcpiUtShortDivide (DeltaTicks * ACPI_USEC_PER_SEC, ACPI_PM_TIMER_FREQUENCY, &Quotient, NULL); *TimeElapsed = (UINT32) Quotient; return_ACPI_STATUS (Status); } ACPI_EXPORT_SYMBOL (AcpiGetTimerDuration) #endif /* !ACPI_REDUCED_HARDWARE */ ```
The Archdeacon of Ross was the only archdeacon in the medieval Diocese of Ross, acting as a deputy of the Bishop of Ross. The following is a list of archdeacons: List of archdeacons of Ross Robert, x 1223-1249 x 1250 Robert de Fyvie, x 1269-1275 John de Musselburgh, fl. 1279 ? Alexander Stewart, x 1343-1350 Thomas de Urquhart, x 1358-1365 x 1376 Alexander Man, x 1376-1381 Alexander de Waghorn, 1381 x 1398-1398 David Seton, x 1399-1418 x 1422 John de Inchmartin, 1409-1421 x 1422 Andrew Munro, 1422-1451 x 1454 Alexander Seton, fl. 1424 x 1430 William Ross, 1451 x 1454-1455 Richard Forbes, 1455-1460 Patrick Vaus, 1460-1466 Alexander Stewart, fl. 1472 Gilbert MacDowell, x 1480 Donald MacCulloch, fl. 1480 David Lichton, 1483-1484 Richard Muirhead, 1484-1488 x 1492 John Scherar, fl. 1492-1506 Robert Elphinstone, fl. 1510 Mungo (Kentigern) Monypenny, fl. 1537-1545 Donald Fraser, 1545 x 1546-1572 x 1573 Robert Graham, 1573-1598 x 1602 George Graham, 1602 John MacKenzie, 1602-1636 x 1642 Notes Bibliography Watt, D.E.R., Fasti Ecclesiae Scotinanae Medii Aevi ad annum 1638, 2nd Draft, (St Andrews, 1969), pp. 285–7 See also Bishop of Ross (Scotland) Ross History of the Scottish Highlands People associated with Highland (council area) Ross and Cromarty
The Blindman River is in south-central Alberta. It forms south of Winfield and flows southeastward before joining the Red Deer River near Red Deer. The Blindman is bridged by Alberta Highway 20 a number of times in its upper reaches, before passing near the town of Rimbey. The river then takes on the outflow of Gull Lake. It is bridged by Alberta Highway 2 at Red Deer before flowing into the Red Deer River. There are two competing theories regarding the name of the river. One theory suggests a Cree hunting party became snowblind while travelling and had to rest on the river banks until their eyes healed. The hunting party applied the name to the river, which translates as 'He is blind'. The second theory argues that Blindman is a descriptive term, applied to the river because of its numerous meanders and curves. The Paskapoo Formation, first described in its banks, takes its name from the Cree name for the Blindman. Tributaries Anderson Creek Lloyd Creek Boyd Creek Potter Creek Gull Lake See also List of Alberta rivers References Rivers of Alberta
```java server pages <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <link href="js/kindeditor-4.1.10/themes/default/default.css" type="text/css" rel="stylesheet"> <link href="css/uploadfile.css" rel="stylesheet"> <script src="js/jquery.uploadfile.js"></script> <script type="text/javascript" charset="utf-8" src="js/kindeditor-4.1.10/kindeditor-all-min.js"></script> <script type="text/javascript" charset="utf-8" src="js/kindeditor-4.1.10/lang/zh_CN.js"></script> <div style="padding:10px 10px 10px 10px"> <form id="userEditForm" class="userForm" method="post"> <input type="hidden" name="id"/> <table cellpadding="5"> <tr> <td>:</td> <td> <input class="easyui-textbox" type="text" name="username"/> </td> </tr> <tr> <td>:</td> <td> <input class="easyui-textbox" type="text" name="password"/> </td> </tr> <tr> <td>:</td> <td> <input class="easyui-combobox" name="roleId" panelHeight="auto" data-options="valueField:'roleId',textField:'roleName',url:'role/get_data',required:true, editable:false" /> </td> </tr> <tr> <td>:</td> <td> <select id="cc" class="easyui-combobox" panelHeight="auto" name="locked" data-options="width:150, editable:false"> <option value="1"></option> <option value="2"></option> </select> </td> </tr> </table> </form> <br><br> <div style="padding:5px"> <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitUserEditForm()"></a> </div> </div> <script type="text/javascript"> function submitUserEditForm(){ if(!$('#userEditForm').form('validate')){ $.messager.alert('','!'); return ; } $.post("user/update_all",$("#userEditForm").serialize(), function(data){ if(data.status == 200){ $.messager.alert('', data.msg); $("#userEditWindow").window('close'); $("#userList").datagrid("reload"); }else{ $.messager.alert('', data.msg); } }); } </script> ```
is a supernatural fiction literary series about the exploits of a group of feng shui experts and their conflicts with various spiritual disturbances across Japan. Volume 4.0 of the series has been adapted into a live action film and a video game for the PlayStation. The series is a spin off of Hiroshi Aramata's Teito Monogatari series. Characters Tatsuto Kuroda: the grandson of Shigemaru Kuroda, a feng shui practitioner. Mizuchi Ariyoshi: a female psychic who helps Kuroda. Otsu: Mizuchi's animal companion, a black cat. Volumes in the main series Version 1.0: ワタシnoイエ Version 2.0: 二色人(ニイルピト)の夜 Version 3.0: 新宿チャンスン Version 4.0: 闇吹く夏 Version 5.0: 絶の島事件 Tokyo Dragon In 1997, Version 4.0 of the series was adapted into a made for TV film entitled Tokyo Dragon (東京龍) produced and released by Ace Pictures. Video game Volume 4.0 (闇吹く夏) of the series was also adapted into an Action-adventure game for the PlayStation released in 1999. References External links Amazon.co.jp entry on VERSION 1.0 (Volume 1) of the series Japanese Horror Movie Database entry on Tokyo Dragon English language review of the Tokyo Dragon movie Review and information about the PS1 game Youtube Link: Opening Cinematic of PS1 Video Game 1990s fantasy novels Fantasy books by series Japanese fantasy novels Japanese horror novels Japanese novels adapted into films Sequel novels 1999 video games PlayStation (console) games Video games developed in Japan Films based on Japanese novels Japanese fantasy films Japanese horror films 1990s Japanese-language films Tokusatsu films Japanese supernatural horror films Japanese dark fantasy films 1990s Japanese films
```kotlin /* * * * 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. */ package org.springframework.cloud.gateway.route.builder import org.junit.jupiter.api.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.autoconfigure.EnableAutoConfiguration import org.springframework.boot.test.context.SpringBootTest import org.springframework.cloud.gateway.support.ServerWebExchangeUtils import org.springframework.context.annotation.Configuration import org.springframework.mock.http.server.reactive.MockServerHttpRequest import org.springframework.mock.web.server.MockServerWebExchange import org.springframework.web.server.ServerWebExchange import reactor.kotlin.core.publisher.toMono import reactor.test.StepVerifier import java.net.URI @SpringBootTest(classes = [Config::class]) class RouteDslTests { @Autowired lateinit var builder: RouteLocatorBuilder @Test fun sampleRouteDsl() { val routeLocator = builder.routes { route(id = "test") { host("**.abc.org") and path("/image/png") filters { addResponseHeader("X-TestHeader", "foobar") } uri("path_to_url") } route(id = "test2") { path("/image/webp") or path("/image/anotherone") filters { addResponseHeader("X-AnotherHeader", "baz") addResponseHeader("X-AnotherHeader-2", "baz-2") } uri("path_to_url") } } StepVerifier .create(routeLocator.routes) .expectNextMatches({ it.id == "test" && it.filters.size == 1 && it.uri == URI.create("path_to_url") }) .expectNextMatches({ it.id == "test2" && it.filters.size == 2 && it.uri == URI.create("path_to_url") }) .expectComplete() .verify() val sampleExchange: ServerWebExchange = MockServerWebExchange.from(MockServerHttpRequest.get("/image/webp") .header("Host", "test.abc.org").build()) val filteredRoutes = routeLocator.routes.filter({ sampleExchange.attributes.put(ServerWebExchangeUtils.GATEWAY_PREDICATE_ROUTE_ATTR, it.id) it.predicate.apply(sampleExchange).toMono().block() }) StepVerifier.create(filteredRoutes) .expectNextMatches({ it.id == "test2" && it.filters.size == 2 && it.uri == URI.create("path_to_url") }) .expectComplete() .verify() } @Test fun dslWithFunctionParameters() { val routerLocator = builder.routes { route(id = "test1", order = 10, uri = "path_to_url") { host("**.abc.org") } route(id = "test2", order = 10, uri = "path_to_url") { host("**.abc.org") uri("path_to_url") } } StepVerifier.create(routerLocator.routes) .expectNextMatches({ it.id == "test1" && it.uri == URI.create("path_to_url") && it.order == 10 && it.predicate.apply(MockServerWebExchange .from(MockServerHttpRequest .get("/someuri").header("Host", "test.abc.org"))) .toMono().block() }) .expectNextMatches({ it.id == "test2" && it.uri == URI.create("path_to_url") && it.order == 10 && it.predicate.apply(MockServerWebExchange .from(MockServerHttpRequest .get("/someuri").header("Host", "test.abc.org"))) .toMono().block() }) .expectComplete() .verify() } } @Configuration(proxyBeanMethods = false) @EnableAutoConfiguration open class Config {} ```
Madhuca hainanensis is a species of plant in the family Sapotaceae. It is endemic to China. It is threatened by habitat loss. References Flora of China hainanensis Vulnerable plants Taxonomy articles created by Polbot Plants described in 1958
```smalltalk // // NSUrlSessionHandler.cs: // // Authors: // Ani Betts <anais@anaisbetts.org> // Nick Berardi <nick@nickberardi.com> // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // using System; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.IO; using System.Net; using System.Net.Http; using System.Net.Http.Headers; using System.Net.Security; using System.Runtime.InteropServices; using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; using System.Threading; using System.Threading.Tasks; using System.Text; using System.Diagnostics.CodeAnalysis; using CoreFoundation; using Foundation; using Security; #if !MONOMAC using UIKit; #endif #nullable enable #if !MONOMAC && !XAMCORE_5_0 namespace System.Net.Http { #else namespace Foundation { #endif #if !NET public delegate bool NSUrlSessionHandlerTrustOverrideCallback (NSUrlSessionHandler sender, SecTrust trust); #endif public delegate bool NSUrlSessionHandlerTrustOverrideForUrlCallback (NSUrlSessionHandler sender, string url, SecTrust trust); // useful extensions for the class in order to set it in a header static class NSHttpCookieExtensions { static void AppendSegment (StringBuilder builder, string name, string? value) { if (builder.Length > 0) builder.Append ("; "); builder.Append (name); if (value is not null) builder.Append ("=").Append (value); } // returns the header for a cookie public static string GetHeaderValue (this NSHttpCookie cookie) { var header = new StringBuilder (); AppendSegment (header, cookie.Name, cookie.Value); AppendSegment (header, NSHttpCookie.KeyPath.ToString (), cookie.Path.ToString ()); AppendSegment (header, NSHttpCookie.KeyDomain.ToString (), cookie.Domain.ToString ()); AppendSegment (header, NSHttpCookie.KeyVersion.ToString (), cookie.Version.ToString ()); if (cookie.Comment is not null) AppendSegment (header, NSHttpCookie.KeyComment.ToString (), cookie.Comment.ToString ()); if (cookie.CommentUrl is not null) AppendSegment (header, NSHttpCookie.KeyCommentUrl.ToString (), cookie.CommentUrl.ToString ()); if (cookie.Properties.ContainsKey (NSHttpCookie.KeyDiscard)) AppendSegment (header, NSHttpCookie.KeyDiscard.ToString (), null); if (cookie.ExpiresDate is not null) { // Format according to RFC1123; 'r' uses invariant info (DateTimeFormatInfo.InvariantInfo) var dateStr = ((DateTime) cookie.ExpiresDate).ToUniversalTime ().ToString ("r", CultureInfo.InvariantCulture); AppendSegment (header, NSHttpCookie.KeyExpires.ToString (), dateStr); } if (cookie.Properties.ContainsKey (NSHttpCookie.KeyMaximumAge)) { var timeStampString = (NSString) cookie.Properties [NSHttpCookie.KeyMaximumAge]; AppendSegment (header, NSHttpCookie.KeyMaximumAge.ToString (), timeStampString); } if (cookie.IsSecure) AppendSegment (header, NSHttpCookie.KeySecure.ToString (), null); if (cookie.IsHttpOnly) AppendSegment (header, "httponly", null); // Apple does not show the key for the httponly return header.ToString (); } } public partial class NSUrlSessionHandler : HttpMessageHandler { private const string SetCookie = "Set-Cookie"; private const string Cookie = "Cookie"; private CookieContainer? cookieContainer; readonly Dictionary<string, string> headerSeparators = new Dictionary<string, string> { ["User-Agent"] = " ", ["Server"] = " " }; NSUrlSession session; readonly Dictionary<NSUrlSessionTask, InflightData> inflightRequests; readonly object inflightRequestsLock = new object (); readonly NSUrlSessionConfiguration.SessionConfigurationType sessionType; #if !MONOMAC && !__WATCHOS__ NSObject? notificationToken; // needed to make sure we do not hang if not using a background session readonly object notificationTokenLock = new object (); // need to make sure that threads do no step on each other with a dispose and a remove inflight data #endif static NSUrlSessionConfiguration CreateConfig () { // modifying the configuration does not affect future calls var config = NSUrlSessionConfiguration.DefaultSessionConfiguration; // but we want, by default, the timeout from HttpClient to have precedence over the one from NSUrlSession // Double.MaxValue does not work, so default to 24 hours config.TimeoutIntervalForRequest = 24 * 60 * 60; config.TimeoutIntervalForResource = 24 * 60 * 60; return config; } public NSUrlSessionHandler () : this (CreateConfig ()) { } [CLSCompliant (false)] public NSUrlSessionHandler (NSUrlSessionConfiguration configuration) { if (configuration is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (configuration)); // HACK: we need to store the following because session.Configuration gets a copy of the object and the value gets lost sessionType = configuration.SessionType; allowsCellularAccess = configuration.AllowsCellularAccess; AllowAutoRedirect = true; var sp = ServicePointManager.SecurityProtocol; if ((sp & SecurityProtocolType.Ssl3) != 0) configuration.TLSMinimumSupportedProtocol = SslProtocol.Ssl_3_0; else if ((sp & SecurityProtocolType.Tls) != 0) configuration.TLSMinimumSupportedProtocol = SslProtocol.Tls_1_0; else if ((sp & SecurityProtocolType.Tls11) != 0) configuration.TLSMinimumSupportedProtocol = SslProtocol.Tls_1_1; else if ((sp & SecurityProtocolType.Tls12) != 0) configuration.TLSMinimumSupportedProtocol = SslProtocol.Tls_1_2; else if ((sp & (SecurityProtocolType) 12288) != 0) // Tls13 value not yet in monno configuration.TLSMinimumSupportedProtocol = SslProtocol.Tls_1_3; session = NSUrlSession.FromConfiguration (configuration, (INSUrlSessionDelegate) new NSUrlSessionHandlerDelegate (this), null); inflightRequests = new Dictionary<NSUrlSessionTask, InflightData> (); } #if !MONOMAC && !__WATCHOS__ && !NET8_0 void AddNotification () { lock (notificationTokenLock) { if (!bypassBackgroundCheck && sessionType != NSUrlSessionConfiguration.SessionConfigurationType.Background && notificationToken is null) notificationToken = NSNotificationCenter.DefaultCenter.AddObserver (UIApplication.WillResignActiveNotification, BackgroundNotificationCb); } // lock } void RemoveNotification () { NSObject? localNotificationToken; lock (notificationTokenLock) { localNotificationToken = notificationToken; notificationToken = null; } if (localNotificationToken is not null) NSNotificationCenter.DefaultCenter.RemoveObserver (localNotificationToken); } void BackgroundNotificationCb (NSNotification obj) { // the cancelation task of each of the sources will clean the different resources. Each removal is done // inside a lock, but of course, the .Values collection will not like that because it is modified during the // iteration. We split the operation in two, get all the diff cancelation sources, then try to cancel each of them // which will do the correct lock dance. Note that we could be tempted to do a RemoveAll, that will yield the same // runtime issue, this is dull but safe. List<TaskCompletionSource<HttpResponseMessage>> sources; lock (inflightRequestsLock) { // just lock when we iterate sources = new List<TaskCompletionSource<HttpResponseMessage>> (inflightRequests.Count); foreach (var r in inflightRequests.Values) { sources.Add (r.CompletionSource); } } sources.ForEach (source => { source.TrySetCanceled (); }); } #endif public long MaxInputInMemory { get; set; } = long.MaxValue; void RemoveInflightData (NSUrlSessionTask task, bool cancel = true) { lock (inflightRequestsLock) { if (inflightRequests.TryGetValue (task, out var data)) { if (cancel) data.CancellationTokenSource.Cancel (); inflightRequests.Remove (task); } #if !MONOMAC && !__WATCHOS__ && !NET8_0 // do we need to be notified? If we have not inflightData, we do not if (inflightRequests.Count == 0) RemoveNotification (); #endif } if (cancel) task?.Cancel (); task?.Dispose (); } protected override void Dispose (bool disposing) { lock (inflightRequestsLock) { #if !MONOMAC && !__WATCHOS__ && !NET8_0 // remove the notification if present, method checks against null RemoveNotification (); #endif foreach (var pair in inflightRequests) { pair.Key?.Cancel (); pair.Key?.Dispose (); } inflightRequests.Clear (); } base.Dispose (disposing); } bool disableCaching; public bool DisableCaching { get { return disableCaching; } set { EnsureModifiability (); disableCaching = value; } } bool allowAutoRedirect; public bool AllowAutoRedirect { get { return allowAutoRedirect; } set { EnsureModifiability (); allowAutoRedirect = value; } } bool allowsCellularAccess = true; public bool AllowsCellularAccess { get { return allowsCellularAccess; } set { EnsureModifiability (); allowsCellularAccess = value; } } ICredentials? credentials; public ICredentials? Credentials { get { return credentials; } set { EnsureModifiability (); credentials = value; } } #if !NET NSUrlSessionHandlerTrustOverrideCallback? trustOverride; [Obsolete ("Use the 'TrustOverrideForUrl' property instead.")] public NSUrlSessionHandlerTrustOverrideCallback? TrustOverride { get { return trustOverride; } set { EnsureModifiability (); trustOverride = value; } } #endif NSUrlSessionHandlerTrustOverrideForUrlCallback? trustOverrideForUrl; public NSUrlSessionHandlerTrustOverrideForUrlCallback? TrustOverrideForUrl { get { return trustOverrideForUrl; } set { EnsureModifiability (); trustOverrideForUrl = value; } } #if !NET8_0 // we do check if a user does a request and the application goes to the background, but // in certain cases the user does that on purpose (BeingBackgroundTask) and wants to be able // to use the network. In those cases, which are few, we want the developer to explicitly // bypass the check when there are not request in flight bool bypassBackgroundCheck = true; #endif #if !XAMCORE_5_0 [EditorBrowsable (EditorBrowsableState.Never)] #if NET8_0 [Obsolete ("This property is ignored.")] #else [Obsolete ("This property will be ignored in .NET 8.")] #endif public bool BypassBackgroundSessionCheck { get { #if NET8_0 return true; #else return bypassBackgroundCheck; #endif } set { #if !NET8_0 EnsureModifiability (); bypassBackgroundCheck = value; #endif } } #endif // !XAMCORE_5_0 public CookieContainer? CookieContainer { get { return cookieContainer; } set { EnsureModifiability (); cookieContainer = value; } } public bool UseCookies { get { return session.Configuration.HttpCookieStorage is not null; } set { EnsureModifiability (); if (sessionType == NSUrlSessionConfiguration.SessionConfigurationType.Ephemeral) throw new InvalidOperationException ("Cannot set the use of cookies in Ephemeral sessions."); // we have to consider the following table of cases: // 1. Value is set to true and cookie storage is not null -> we do nothing // 2. Value is set to true and cookie storage is null -> we create/set the storage. // 3. Value is false and cookie container is not null -> we clear the cookie storage // 4. Value is false and cookie container is null -> we do nothing var oldSession = session; var configuration = session.Configuration; if (value && configuration.HttpCookieStorage is null) { // create storage because the user wants to use it. Things are not that easy, we have to // consider the following: // 1. Default Session -> uses sharedHTTPCookieStorage // 2. Background Session -> uses sharedHTTPCookieStorage // 3. Ephemeral Session -> no allowed. apple does not provide a way to access to the private implementation of the storage class :/ configuration.HttpCookieStorage = NSHttpCookieStorage.SharedStorage; } if (!value && configuration.HttpCookieStorage is not null) { // remove storage so that it is not used in any of the requests configuration.HttpCookieStorage = null; } session = NSUrlSession.FromConfiguration (configuration, (INSUrlSessionDelegate) new NSUrlSessionHandlerDelegate (this), null); oldSession.Dispose (); } } bool sentRequest; internal void EnsureModifiability () { if (sentRequest) throw new InvalidOperationException ( "This instance has already started one or more requests. " + "Properties can only be modified before sending the first request."); } static Exception createExceptionForNSError (NSError error) { var innerException = new NSErrorException (error); // errors that exists in both share the same error code, so we can use a single switch/case // this also ease watchOS integration as if does not expose CFNetwork but (I would not be // surprised if it)could return some of it's error codes #if __WATCHOS__ if (error.Domain == NSError.NSUrlErrorDomain) { #else if ((error.Domain == NSError.NSUrlErrorDomain) || (error.Domain == NSError.CFNetworkErrorDomain)) { #endif // Apple docs: path_to_url#//apple_ref/doc/constant_group/URL_Loading_System_Error_Codes // .NET docs: path_to_url switch ((NSUrlError) (long) error.Code) { case NSUrlError.Cancelled: case NSUrlError.UserCancelledAuthentication: #if !__WATCHOS__ case (NSUrlError) NSNetServicesStatus.CancelledError: #endif // No more processing is required so just return. return new OperationCanceledException (error.LocalizedDescription, innerException); } } return new HttpRequestException (error.LocalizedDescription, innerException); } string GetHeaderSeparator (string name) { if (!headerSeparators.TryGetValue (name, out var value)) value = ","; return value; } void AddManagedHeaders (NSMutableDictionary nativeHeaders, IEnumerable<KeyValuePair<string, IEnumerable<string>>> managedHeaders) { foreach (var keyValuePair in managedHeaders) { var keyPtr = NSString.CreateNative (keyValuePair.Key); var valuePtr = NSString.CreateNative (string.Join (GetHeaderSeparator (keyValuePair.Key), keyValuePair.Value)); nativeHeaders.LowlevelSetObject (valuePtr, keyPtr); NSString.ReleaseNative (keyPtr); NSString.ReleaseNative (valuePtr); } } async Task<NSUrlRequest> CreateRequest (HttpRequestMessage request) { var stream = Stream.Null; var nativeHeaders = new NSMutableDictionary (); // set header cookies if needed from the managed cookie container if we do use Cookies if (session.Configuration.HttpCookieStorage is not null) { var cookies = cookieContainer?.GetCookieHeader (request.RequestUri!); // as per docs: An HTTP cookie header, with strings representing Cookie instances delimited by semicolons. if (!string.IsNullOrEmpty (cookies)) { var cookiePtr = NSString.CreateNative (Cookie); var cookiesPtr = NSString.CreateNative (cookies); nativeHeaders.LowlevelSetObject (cookiesPtr, cookiePtr); NSString.ReleaseNative (cookiePtr); NSString.ReleaseNative (cookiesPtr); } } AddManagedHeaders (nativeHeaders, request.Headers); if (request.Content is not null) { stream = await request.Content.ReadAsStreamAsync ().ConfigureAwait (false); AddManagedHeaders (nativeHeaders, request.Content.Headers); } var nsrequest = new NSMutableUrlRequest { AllowsCellularAccess = allowsCellularAccess, CachePolicy = DisableCaching ? NSUrlRequestCachePolicy.ReloadIgnoringCacheData : NSUrlRequestCachePolicy.UseProtocolCachePolicy, HttpMethod = request.Method.ToString ().ToUpperInvariant (), Url = NSUrl.FromString (request.RequestUri?.AbsoluteUri), Headers = nativeHeaders, }; if (stream != Stream.Null) { // Rewind the stream to the beginning in case the HttpContent implementation // will be accessed again (e.g. for retry/redirect) and it keeps its stream open behind the scenes. if (stream.CanSeek) stream.Seek (0, SeekOrigin.Begin); // HttpContent.TryComputeLength is `protected internal` :-( but it's indirectly called by headers var length = request.Content?.Headers?.ContentLength; if (length.HasValue && (length <= MaxInputInMemory)) nsrequest.Body = NSData.FromStream (stream); else nsrequest.BodyStream = new WrappedNSInputStream (stream); } return nsrequest; } #if (SYSTEM_NET_HTTP || MONOMAC) && !NET internal #endif protected override async Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken) { Volatile.Write (ref sentRequest, true); var nsrequest = await CreateRequest (request).ConfigureAwait (false); var dataTask = session.CreateDataTask (nsrequest); var inflightData = new InflightData (request.RequestUri?.AbsoluteUri!, cancellationToken, request); lock (inflightRequestsLock) { #if !MONOMAC && !__WATCHOS__ && !NET8_0 // Add the notification whenever needed AddNotification (); #endif inflightRequests.Add (dataTask, inflightData); } if (dataTask.State == NSUrlSessionTaskState.Suspended) dataTask.Resume (); // as per documentation: // If this token is already in the canceled state, the // delegate will be run immediately and synchronously. // Any exception the delegate generates will be // propagated out of this method call. // // The execution of the register ensures that if we // receive a already cancelled token or it is cancelled // just before this call, we will cancel the task. // Other approaches are harder, since querying the state // of the token does not guarantee that in the next // execution a threads cancels it. cancellationToken.Register (() => { RemoveInflightData (dataTask); inflightData.CompletionSource.TrySetCanceled (); }); return await inflightData.CompletionSource.Task.ConfigureAwait (false); } #if NET // Properties that will be called by the default HttpClientHandler // NSUrlSession handler automatically handles decompression, and there doesn't seem to be a way to turn it off. // The available decompression algorithms depend on the OS version we're running on, and maybe the target OS version as well, // so just say we're doing them all, and not do anything in the setter (it doesn't seem to be configurable in NSUrlSession anyways). public DecompressionMethods AutomaticDecompression { get => DecompressionMethods.All; set { } } // We're ignoring this property, just like Xamarin.Android does: // path_to_url#L158 [UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] [EditorBrowsable (EditorBrowsableState.Never)] public bool CheckCertificateRevocationList { get; set; } = false; // We're ignoring this property, just like Xamarin.Android does: // path_to_url#L150 // Note: we can't return null (like Xamarin.Android does), because the return type isn't nullable. [UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] [EditorBrowsable (EditorBrowsableState.Never)] public X509CertificateCollection ClientCertificates { get { return new X509CertificateCollection (); } } // We're ignoring this property, just like Xamarin.Android does: // path_to_url#L148 [UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] [EditorBrowsable (EditorBrowsableState.Never)] public ClientCertificateOption ClientCertificateOptions { get; set; } // We're ignoring this property, just like Xamarin.Android does: // path_to_url#L152 [UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] [EditorBrowsable (EditorBrowsableState.Never)] public ICredentials? DefaultProxyCredentials { get; set; } public int MaxAutomaticRedirections { get => int.MaxValue; set { // I believe it's possible to implement support for MaxAutomaticRedirections (it just has to be done) if (value != int.MaxValue) ObjCRuntime.ThrowHelper.ThrowArgumentOutOfRangeException (nameof (value), value, "It's not possible to lower the max number of automatic redirections.");; } } // We're ignoring this property, just like Xamarin.Android does: // path_to_url#L154 [UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] [EditorBrowsable (EditorBrowsableState.Never)] public int MaxConnectionsPerServer { get; set; } = int.MaxValue; // We're ignoring this property, just like Xamarin.Android does: // path_to_url#L156 [UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] [EditorBrowsable (EditorBrowsableState.Never)] public int MaxResponseHeadersLength { get; set; } = 64; // Units in K (1024) bytes. // We don't support PreAuthenticate, so always return false, and ignore any attempts to change it. [UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] [EditorBrowsable (EditorBrowsableState.Never)] public bool PreAuthenticate { get => false; set { } } // We're ignoring this property, just like Xamarin.Android does: // path_to_url#L167 [UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] [EditorBrowsable (EditorBrowsableState.Never)] public IDictionary<string, object>? Properties { get { return null; } } // We dont support any custom proxies, and don't let anybody wonder why their proxy isn't // being used if they try to assign one (in any case we also return false from 'SupportsProxy'). [UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] [EditorBrowsable (EditorBrowsableState.Never)] public IWebProxy? Proxy { get => null; set => throw new PlatformNotSupportedException (); } // There doesn't seem to be a trivial way to specify the protocols to accept (or not) // It might be possible to reject some protocols in code during the challenge phase, // but accepting earlier (unsafe) protocols requires adding entires to the Info.plist, // which means it's not trivial to detect/accept/reject from code here. // Currently the default for Apple platforms is to accept TLS v1.2 and v1.3, so default // to that value, and ignore any changes to it. [UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] [EditorBrowsable (EditorBrowsableState.Never)] public SslProtocols SslProtocols { get; set; } = SslProtocols.Tls12 | SslProtocols.Tls13; private ServerCertificateCustomValidationCallbackHelper? _serverCertificateCustomValidationCallbackHelper; public Func<HttpRequestMessage, X509Certificate2?, X509Chain?, SslPolicyErrors, bool>? ServerCertificateCustomValidationCallback { get => _serverCertificateCustomValidationCallbackHelper?.Callback; set { if (value is null) { _serverCertificateCustomValidationCallbackHelper = null; } else { _serverCertificateCustomValidationCallbackHelper = new ServerCertificateCustomValidationCallbackHelper (value); } } } // returns false if there's no callback internal bool TryInvokeServerCertificateCustomValidationCallback (HttpRequestMessage request, SecTrust secTrust, out bool trusted) { trusted = false; var helper = _serverCertificateCustomValidationCallbackHelper; if (helper is null) return false; trusted = helper.Invoke (request, secTrust); return true; } sealed class ServerCertificateCustomValidationCallbackHelper { public Func<HttpRequestMessage, X509Certificate2?, X509Chain?, SslPolicyErrors, bool> Callback { get; private set; } public ServerCertificateCustomValidationCallbackHelper (Func<HttpRequestMessage, X509Certificate2?, X509Chain?, SslPolicyErrors, bool> callback) { Callback = callback; } public bool Invoke (HttpRequestMessage request, SecTrust secTrust) { X509Certificate2[] certificates = ConvertCertificates (secTrust); X509Certificate2? certificate = certificates.Length > 0 ? certificates [0] : null; using X509Chain chain = CreateChain (certificates); SslPolicyErrors sslPolicyErrors = EvaluateSslPolicyErrors (certificate, chain, secTrust); return Callback (request, certificate, chain, sslPolicyErrors); } X509Certificate2[] ConvertCertificates (SecTrust secTrust) { var certificates = new X509Certificate2 [secTrust.Count]; if (IsSecTrustGetCertificateChainSupported) { var originalChain = secTrust.GetCertificateChain (); for (int i = 0; i < originalChain.Length; i++) certificates [i] = originalChain [i].ToX509Certificate2 (); } else { for (int i = 0; i < secTrust.Count; i++) certificates [i] = secTrust [i].ToX509Certificate2 (); } return certificates; } static bool? isSecTrustGetCertificateChainSupported = null; static bool IsSecTrustGetCertificateChainSupported { get { if (!isSecTrustGetCertificateChainSupported.HasValue) { #if MONOMAC isSecTrustGetCertificateChainSupported = ObjCRuntime.SystemVersion.CheckmacOS (12, 0); #elif WATCH isSecTrustGetCertificateChainSupported = ObjCRuntime.SystemVersion.CheckWatchOS (8, 0); #elif IOS || TVOS || MACCATALYST isSecTrustGetCertificateChainSupported = ObjCRuntime.SystemVersion.CheckiOS (15, 0); #else #error Unknown platform #endif } return isSecTrustGetCertificateChainSupported.Value; } } X509Chain CreateChain (X509Certificate2[] certificates) { // inspired by path_to_url#L691-L696 var chain = new X509Chain (); chain.ChainPolicy.RevocationMode = X509RevocationMode.Online; chain.ChainPolicy.RevocationFlag = X509RevocationFlag.ExcludeRoot; chain.ChainPolicy.ExtraStore.AddRange (certificates); return chain; } SslPolicyErrors EvaluateSslPolicyErrors (X509Certificate2? certificate, X509Chain chain, SecTrust secTrust) { var sslPolicyErrors = SslPolicyErrors.None; try { if (certificate is null) { sslPolicyErrors |= SslPolicyErrors.RemoteCertificateNotAvailable; } else if (!chain.Build (certificate)) { sslPolicyErrors |= SslPolicyErrors.RemoteCertificateChainErrors; } } catch (ArgumentException) { sslPolicyErrors |= SslPolicyErrors.RemoteCertificateChainErrors; } if (!secTrust.Evaluate (out _)) { sslPolicyErrors |= SslPolicyErrors.RemoteCertificateChainErrors; } return sslPolicyErrors; } } // There's no way to turn off automatic decompression, so yes, we support it public bool SupportsAutomaticDecompression { get => true; } // We don't support using custom proxies, but NSUrlSession will automatically use any proxies configured in the OS. public bool SupportsProxy { get => false; } // We support the AllowAutoRedirect property, but we don't support changing the MaxAutomaticRedirections value, // so be safe here and say we don't support redirect configuration. public bool SupportsRedirectConfiguration { get => false; } // NSUrlSession will automatically use any proxies configured in the OS (so always return true in the getter). // There doesn't seem to be a way to turn this off, so throw if someone attempts to disable this. public bool UseProxy { get => true; set { if (!value) ObjCRuntime.ThrowHelper.ThrowArgumentOutOfRangeException (nameof (value), value, "It's not possible to disable the use of system proxies.");; } } #endif // NET partial class NSUrlSessionHandlerDelegate : NSUrlSessionDataDelegate { readonly NSUrlSessionHandler sessionHandler; public NSUrlSessionHandlerDelegate (NSUrlSessionHandler handler) { sessionHandler = handler; } InflightData? GetInflightData (NSUrlSessionTask task) { var inflight = default (InflightData); lock (sessionHandler.inflightRequestsLock) if (sessionHandler.inflightRequests.TryGetValue (task, out inflight)) { // ensure that we did not cancel the request, if we did, do cancel the task, if we // cancel the task it means that we are not interested in any of the delegate methods: // // DidReceiveResponse We might have received a response, but either the user cancelled or a // timeout did, if that is the case, we do not care about the response. // DidReceiveData Of buffer has a partial response ergo garbage and there is not real // reason we would like to add more data. // DidCompleteWithError - We are not changing a behaviour compared to the case in which // we did not find the data. if (inflight.CancellationToken.IsCancellationRequested) { task?.Cancel (); // return null so that we break out of any delegate method. return null; } return inflight; } // if we did not manage to get the inflight data, we either got an error or have been canceled, lets cancel the task, that will execute DidCompleteWithError task?.Cancel (); return null; } void UpdateManagedCookieContainer (Uri absoluteUri, NSHttpCookie [] cookies) { if (sessionHandler.cookieContainer is not null && cookies.Length > 0) lock (sessionHandler.inflightRequestsLock) { // ensure we lock when writing to the collection var cookiesContents = Array.ConvertAll (cookies, static cookie => cookie.GetHeaderValue ()); sessionHandler.cookieContainer.SetCookies (absoluteUri, string.Join (',', cookiesContents)); // as per docs: The contents of an HTTP set-cookie header as returned by a HTTP server, with Cookie instances delimited by commas. } } [Preserve (Conditional = true)] public override void DidReceiveResponse (NSUrlSession session, NSUrlSessionDataTask dataTask, NSUrlResponse response, Action<NSUrlSessionResponseDisposition> completionHandler) { try { DidReceiveResponseImpl (session, dataTask, response, completionHandler); } catch { completionHandler (NSUrlSessionResponseDisposition.Cancel); throw; } } void DidReceiveResponseImpl (NSUrlSession session, NSUrlSessionDataTask dataTask, NSUrlResponse response, Action<NSUrlSessionResponseDisposition> completionHandler) { var inflight = GetInflightData (dataTask); if (inflight is null) { completionHandler (NSUrlSessionResponseDisposition.Cancel); return; } try { var urlResponse = (NSHttpUrlResponse) response; var status = (int) urlResponse.StatusCode; var absoluteUri = new Uri (urlResponse.Url.AbsoluteString!); var content = new NSUrlSessionDataTaskStreamContent (inflight.Stream, () => { if (!inflight.Completed) { dataTask.Cancel (); } inflight.Disposed = true; inflight.Stream.TrySetException (new ObjectDisposedException ("The content stream was disposed.")); sessionHandler.RemoveInflightData (dataTask); }, inflight.CancellationTokenSource.Token); // NB: The double cast is because of a Xamarin compiler bug var httpResponse = new HttpResponseMessage ((HttpStatusCode) status) { Content = content, RequestMessage = inflight.Request }; var wasRedirected = dataTask.CurrentRequest?.Url?.AbsoluteString != dataTask.OriginalRequest?.Url?.AbsoluteString; if (wasRedirected) httpResponse.RequestMessage.RequestUri = absoluteUri; foreach (var v in urlResponse.AllHeaderFields) { // NB: Cocoa trolling us so hard by giving us back dummy dictionary entries if (v.Key is null || v.Value is null) continue; // NSUrlSession tries to be smart with cookies, we will not use the raw value but the ones provided by the cookie storage if (v.Key.ToString () == SetCookie) continue; httpResponse.Headers.TryAddWithoutValidation (v.Key.ToString (), v.Value.ToString ()); httpResponse.Content.Headers.TryAddWithoutValidation (v.Key.ToString (), v.Value.ToString ()); } // it might be confusing that we are not using the managed CookieStore here, this is ONLY for those cookies that have been retrieved from // the server via a Set-Cookie header, the managed container does not know a thing about this and apple is storing them in the native // cookie container. Once we have the cookies from the response, we need to update the managed cookie container if (session.Configuration.HttpCookieStorage is not null) { var cookies = session.Configuration.HttpCookieStorage.CookiesForUrl (response.Url); UpdateManagedCookieContainer (absoluteUri, cookies); for (var index = 0; index < cookies.Length; index++) { httpResponse.Headers.TryAddWithoutValidation (SetCookie, cookies [index].GetHeaderValue ()); } } inflight.Response = httpResponse; // We don't want to send the response back to the task just yet. Because we want to mimic .NET behavior // as much as possible. When the response is sent back in .NET, the content stream is ready to read or the // request has completed, because of this we want to send back the response in DidReceiveData or DidCompleteWithError if (dataTask.State == NSUrlSessionTaskState.Suspended) dataTask.Resume (); } catch (Exception ex) { inflight.CompletionSource.TrySetException (ex); inflight.Stream.TrySetException (ex); sessionHandler.RemoveInflightData (dataTask); } completionHandler (NSUrlSessionResponseDisposition.Allow); } [Preserve (Conditional = true)] public override void DidReceiveData (NSUrlSession session, NSUrlSessionDataTask dataTask, NSData data) { var inflight = GetInflightData (dataTask); if (inflight is null) return; inflight.Stream.Add (data); SetResponse (inflight); } [Preserve (Conditional = true)] public override void DidCompleteWithError (NSUrlSession session, NSUrlSessionTask task, NSError? error) { var inflight = GetInflightData (task); var serverError = task.Error; // this can happen if the HTTP request times out and it is removed as part of the cancellation process if (inflight is not null) { // send the error or send the response back if (error is not null || serverError is not null) { // got an error, cancel the stream operatios before we do anything inflight.CancellationTokenSource.Cancel (); inflight.Errored = true; var exc = inflight.Exception ?? createExceptionForNSError (error ?? serverError!); // client errors wont happen if we get server errors inflight.CompletionSource.TrySetException (exc); inflight.Stream.TrySetException (exc); } else { // set the stream as finished inflight.Stream.TrySetReceivedAllData (); inflight.Completed = true; SetResponse (inflight); } sessionHandler.RemoveInflightData (task, cancel: false); } } void SetResponse (InflightData inflight) { lock (inflight.Lock) { if (inflight.ResponseSent) return; if (inflight.CancellationTokenSource.Token.IsCancellationRequested) return; if (inflight.CompletionSource.Task.IsCompleted) return; var httpResponse = inflight.Response; inflight.ResponseSent = true; inflight.CompletionSource.TrySetResult (httpResponse!); } } [Preserve (Conditional = true)] public override void WillCacheResponse (NSUrlSession session, NSUrlSessionDataTask dataTask, NSCachedUrlResponse proposedResponse, Action<NSCachedUrlResponse> completionHandler) { try { WillCacheResponseImpl (session, dataTask, proposedResponse, completionHandler); } catch { completionHandler (null!); throw; } } void WillCacheResponseImpl (NSUrlSession session, NSUrlSessionDataTask dataTask, NSCachedUrlResponse proposedResponse, Action<NSCachedUrlResponse> completionHandler) { var inflight = GetInflightData (dataTask); if (inflight is null) { completionHandler (null!); return; } // apple caches post request with a body, which should not happen. path_to_url var disableCache = sessionHandler.DisableCaching || (inflight.Request.Method == HttpMethod.Post && inflight.Request.Content is not null); completionHandler (disableCache ? null! : proposedResponse); } [Preserve (Conditional = true)] public override void WillPerformHttpRedirection (NSUrlSession session, NSUrlSessionTask task, NSHttpUrlResponse response, NSUrlRequest newRequest, Action<NSUrlRequest> completionHandler) { completionHandler (sessionHandler.AllowAutoRedirect ? newRequest : null!); } [Preserve (Conditional = true)] public override void DidReceiveChallenge (NSUrlSession session, NSUrlSessionTask task, NSUrlAuthenticationChallenge challenge, Action<NSUrlSessionAuthChallengeDisposition, NSUrlCredential> completionHandler) { try { DidReceiveChallengeImpl (session, task, challenge, completionHandler); } catch { completionHandler (NSUrlSessionAuthChallengeDisposition.CancelAuthenticationChallenge, null!); throw; } } void DidReceiveChallengeImpl (NSUrlSession session, NSUrlSessionTask task, NSUrlAuthenticationChallenge challenge, Action<NSUrlSessionAuthChallengeDisposition, NSUrlCredential> completionHandler) { var inflight = GetInflightData (task); if (inflight is null) { // Request was probably cancelled completionHandler (NSUrlSessionAuthChallengeDisposition.CancelAuthenticationChallenge, null!); return; } // ToCToU for the callback var trustCallbackForUrl = sessionHandler.TrustOverrideForUrl; var trustSec = false; var usedCallback = false; #if !NET var trustCallback = sessionHandler.TrustOverride; var hasCallBack = trustCallback is not null || trustCallbackForUrl is not null; if (hasCallBack && challenge.ProtectionSpace.AuthenticationMethod == NSUrlProtectionSpace.AuthenticationMethodServerTrust) { // if one of the delegates allows to ignore the cert, do it. We check first the one that takes the url because is more precisse, later the // more general one. Since we are using nullables, if the delegate is not present, by default is false trustSec = (trustCallbackForUrl?.Invoke (sessionHandler, inflight.RequestUrl, challenge.ProtectionSpace.ServerSecTrust) ?? false) || (trustCallback?.Invoke (sessionHandler, challenge.ProtectionSpace.ServerSecTrust) ?? false); usedCallback = true; } #else if (challenge.ProtectionSpace.AuthenticationMethod == NSUrlProtectionSpace.AuthenticationMethodServerTrust) { // if the trust delegate allows to ignore the cert, do it. Since we are using nullables, if the delegate is not present, by default is false if (trustCallbackForUrl is not null) { trustSec = trustCallbackForUrl (sessionHandler, inflight.RequestUrl, challenge.ProtectionSpace.ServerSecTrust); usedCallback = true; } else if (sessionHandler.TryInvokeServerCertificateCustomValidationCallback (inflight.Request, challenge.ProtectionSpace.ServerSecTrust, out trustSec)) { usedCallback = true; } } #endif if (usedCallback) { if (trustSec) { var credential = new NSUrlCredential (challenge.ProtectionSpace.ServerSecTrust); completionHandler (NSUrlSessionAuthChallengeDisposition.UseCredential, credential); } else { // user callback rejected the certificate, we want to set the exception, else the user will // see as if the request was cancelled. lock (inflight.Lock) { inflight.Exception = new HttpRequestException ("An error occurred while sending the request.", new WebException ("Error: TrustFailure")); } completionHandler (NSUrlSessionAuthChallengeDisposition.CancelAuthenticationChallenge, null!); } return; } // case for the basic auth failing up front. As per apple documentation: // The URL Loading System is designed to handle various aspects of the HTTP protocol for you. As a result, you should not modify the following headers using // the addValue(_:forHTTPHeaderField:) or setValue(_:forHTTPHeaderField:) methods: // Authorization // Connection // Host // Proxy-Authenticate // Proxy-Authorization // WWW-Authenticate // but we are hiding such a situation from our users, we can nevertheless know if the header was added and deal with it. The idea is as follows, // check if we are in the first attempt, if we are (PreviousFailureCount == 0), we check the headers of the request and if we do have the Auth // header, it means that we do not have the correct credentials, in any other case just do what it is expected. if (challenge.PreviousFailureCount == 0) { var authHeader = inflight.Request.Headers?.Authorization; if (!(string.IsNullOrEmpty (authHeader?.Scheme) && string.IsNullOrEmpty (authHeader?.Parameter))) { completionHandler (NSUrlSessionAuthChallengeDisposition.RejectProtectionSpace, null!); return; } } if (sessionHandler.Credentials is not null && TryGetAuthenticationType (challenge.ProtectionSpace, out var authType)) { NetworkCredential? credentialsToUse = null; if (authType != RejectProtectionSpaceAuthType) { // interesting situation, when we use a credential that we created that is empty, we are not getting the RejectProtectionSpaceAuthType, // nevertheless, we need to check is not the first challenge we will continue trusting the // TryGetAuthenticationType method, but we will also check that the status response in not a 401 // look like we do get an exception from the credentials db: // TestiOSHttpClient[28769:26371051] CredStore - performQuery - Error copying matching creds. Error=-25300, query={ // class = inet; // "m_Limit" = "m_LimitAll"; // ptcl = htps; // "r_Attributes" = 1; // sdmn = test; // srvr = "jigsaw.w3.org"; // sync = syna; // } // do remember that we ALWAYS get a challenge, so the failure count has to be 1 or more for this check, 1 would be the first time var nsurlRespose = challenge.FailureResponse as NSHttpUrlResponse; var responseIsUnauthorized = (nsurlRespose is null) ? false : nsurlRespose.StatusCode == (int) HttpStatusCode.Unauthorized && challenge.PreviousFailureCount > 0; if (!responseIsUnauthorized) { var uri = inflight.Request.RequestUri!; credentialsToUse = sessionHandler.Credentials.GetCredential (uri, authType); } } if (credentialsToUse is not null) { var credential = new NSUrlCredential (credentialsToUse.UserName, credentialsToUse.Password, NSUrlCredentialPersistence.ForSession); completionHandler (NSUrlSessionAuthChallengeDisposition.UseCredential, credential); } else { // Rejecting the challenge allows the next authentication method in the request to be delivered to // the DidReceiveChallenge method. Another authentication method may have credentials available. completionHandler (NSUrlSessionAuthChallengeDisposition.RejectProtectionSpace, null!); } } else { completionHandler (NSUrlSessionAuthChallengeDisposition.PerformDefaultHandling, challenge.ProposedCredential); } } static readonly string RejectProtectionSpaceAuthType = "reject"; static bool TryGetAuthenticationType (NSUrlProtectionSpace protectionSpace, [NotNullWhen (true)] out string? authenticationType) { if (protectionSpace.AuthenticationMethod == NSUrlProtectionSpace.AuthenticationMethodNTLM) { authenticationType = "NTLM"; } else if (protectionSpace.AuthenticationMethod == NSUrlProtectionSpace.AuthenticationMethodHTTPBasic) { authenticationType = "basic"; } else if (protectionSpace.AuthenticationMethod == NSUrlProtectionSpace.AuthenticationMethodNegotiate || protectionSpace.AuthenticationMethod == NSUrlProtectionSpace.AuthenticationMethodHTMLForm || protectionSpace.AuthenticationMethod == NSUrlProtectionSpace.AuthenticationMethodHTTPDigest) { // Want to reject this authentication type to allow the next authentication method in the request to // be used. authenticationType = RejectProtectionSpaceAuthType; } else { // ServerTrust, ClientCertificate or Default. authenticationType = null; return false; } return true; } } class InflightData { public readonly object Lock = new object (); public string RequestUrl { get; set; } public TaskCompletionSource<HttpResponseMessage> CompletionSource { get; } = new TaskCompletionSource<HttpResponseMessage> (TaskCreationOptions.RunContinuationsAsynchronously); public CancellationToken CancellationToken { get; set; } public CancellationTokenSource CancellationTokenSource { get; } = new CancellationTokenSource (); public NSUrlSessionDataTaskStream Stream { get; } = new NSUrlSessionDataTaskStream (); public HttpRequestMessage Request { get; set; } public HttpResponseMessage? Response { get; set; } public Exception? Exception { get; set; } public bool ResponseSent { get; set; } public bool Errored { get; set; } public bool Disposed { get; set; } public bool Completed { get; set; } public bool Done { get { return Errored || Disposed || Completed || CancellationToken.IsCancellationRequested; } } public InflightData (string requestUrl, CancellationToken cancellationToken, HttpRequestMessage request) { RequestUrl = requestUrl; CancellationToken = cancellationToken; Request = request; } } class NSUrlSessionDataTaskStreamContent : MonoStreamContent { Action? disposed; public NSUrlSessionDataTaskStreamContent (NSUrlSessionDataTaskStream source, Action onDisposed, CancellationToken token) : base (source, token) { disposed = onDisposed; } protected override void Dispose (bool disposing) { var action = Interlocked.Exchange (ref disposed, null); action?.Invoke (); base.Dispose (disposing); } } // // Copied from path_to_url // // This is not a perfect solution, but the most robust and risk-free approach. // // The implementation depends on Mono-specific behavior, which makes SerializeToStreamAsync() cancellable. // Unfortunately, the CoreFX implementation of HttpClient does not support this. // // By copying Mono's old implementation here, we ensure that we're compatible with both HttpClient implementations, // so when we eventually adopt the CoreFX version in all of Mono's profiles, we don't regress here. // class MonoStreamContent : HttpContent { readonly Stream content; readonly int bufferSize; readonly CancellationToken cancellationToken; readonly long startPosition; bool contentCopied; public MonoStreamContent (Stream content) : this (content, 16 * 1024) { } public MonoStreamContent (Stream content, int bufferSize) { if (content is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (content)); if (bufferSize <= 0) ObjCRuntime.ThrowHelper.ThrowArgumentOutOfRangeException (nameof (bufferSize), bufferSize, "Buffer size must be >0"); this.content = content; this.bufferSize = bufferSize; if (content.CanSeek) { startPosition = content.Position; } } // // Workarounds for poor .NET API // Instead of having SerializeToStreamAsync with CancellationToken as public API. Only LoadIntoBufferAsync // called internally from the send worker can be cancelled and user cannot see/do it // internal MonoStreamContent (Stream content, CancellationToken cancellationToken) : this (content) { // We don't own the token so don't worry about disposing it this.cancellationToken = cancellationToken; } protected override Task<Stream> CreateContentReadStreamAsync () { return Task.FromResult (content); } protected override void Dispose (bool disposing) { if (disposing) { content.Dispose (); } base.Dispose (disposing); } protected override Task SerializeToStreamAsync (Stream stream, TransportContext? context) { if (contentCopied) { if (!content.CanSeek) { throw new InvalidOperationException ("The stream was already consumed. It cannot be read again."); } content.Seek (startPosition, SeekOrigin.Begin); } else { contentCopied = true; } return content.CopyToAsync (stream, bufferSize, cancellationToken); } #if !NET internal #endif protected override bool TryComputeLength (out long length) { if (!content.CanSeek) { length = 0; return false; } length = content.Length - startPosition; return true; } } class NSUrlSessionDataTaskStream : Stream { readonly Queue<NSData> data; readonly object dataLock = new object (); long position; long length; bool receivedAllData; Exception? exc; NSData? current; Stream? currentStream; public NSUrlSessionDataTaskStream () { data = new Queue<NSData> (); } public void Add (NSData d) { lock (dataLock) { data.Enqueue (d); length += (int) d.Length; } } public void TrySetReceivedAllData () { receivedAllData = true; } public void TrySetException (Exception e) { exc = e; TrySetReceivedAllData (); } void ThrowIfNeeded (CancellationToken cancellationToken) { if (exc is not null) throw exc; cancellationToken.ThrowIfCancellationRequested (); } public override int Read (byte [] buffer, int offset, int count) { return ReadAsync (buffer, offset, count).Result; } public override async Task<int> ReadAsync (byte [] buffer, int offset, int count, CancellationToken cancellationToken) { // try to throw on enter ThrowIfNeeded (cancellationToken); while (current is null) { lock (dataLock) { if (data.Count == 0 && receivedAllData && position == length) { ThrowIfNeeded (cancellationToken); return 0; } if (data.Count > 0 && current is null) { current = data.Peek (); currentStream = current.AsStream (); break; } } try { await Task.Delay (50, cancellationToken).ConfigureAwait (false); } catch (TaskCanceledException ex) { // add a nicer exception for the user to catch, add the cancelation exception // to have a decent stack throw new TimeoutException ("The request timed out.", ex); } } // try to throw again before read ThrowIfNeeded (cancellationToken); var d = currentStream!; var bufferCount = Math.Min (count, (int) (d.Length - d.Position)); var bytesRead = await d.ReadAsync (buffer, offset, bufferCount, cancellationToken).ConfigureAwait (false); // add the bytes read from the pointer to the position position += bytesRead; // remove the current primary reference if the current position has reached the end of the bytes if (d.Position == d.Length) { lock (dataLock) { // this is the same object, it was done to make the cleanup data.Dequeue (); currentStream?.Dispose (); // We cannot use current?.Dispose. The reason is the following one: // In the DidReceiveResponse, if iOS realizes that a buffer can be reused, // because the data is the same, it will do so. Such a situation does happen // between requests, that is, request A and request B will get the same NSData // (buffer) in the delegate. In this case, we cannot dispose the NSData because // it might be that a different request received it and it is present in // its NSUrlSessionDataTaskStream stream. We can only trust the gc to do the job // which is better than copying the data over. current = null; currentStream = null; } } return bytesRead; } public override bool CanRead => true; public override bool CanSeek => false; public override bool CanWrite => false; public override bool CanTimeout => false; public override long Length => length; public override void SetLength (long value) { throw new InvalidOperationException (); } public override long Position { get { return position; } set { throw new InvalidOperationException (); } } public override long Seek (long offset, SeekOrigin origin) { throw new InvalidOperationException (); } public override void Flush () { throw new InvalidOperationException (); } public override void Write (byte [] buffer, int offset, int count) { throw new InvalidOperationException (); } } class WrappedNSInputStream : NSInputStream { NSStreamStatus status; CFRunLoopSource source; readonly Stream stream; bool notifying; NSError? error; public WrappedNSInputStream (Stream inputStream) { status = NSStreamStatus.NotOpen; stream = inputStream; source = new CFRunLoopSource (Handle, false); IsDirectBinding = false; } [Preserve (Conditional = true)] public override NSStreamStatus Status => status; [Preserve (Conditional = true)] public override void Open () { status = NSStreamStatus.Open; Notify (CFStreamEventType.OpenCompleted); } [Preserve (Conditional = true)] public override void Close () { status = NSStreamStatus.Closed; } [Preserve (Conditional = true)] public override nint Read (IntPtr buffer, nuint len) { try { var sourceBytes = new byte [len]; var read = stream.Read (sourceBytes, 0, (int) len); Marshal.Copy (sourceBytes, 0, buffer, (int) len); if (notifying) return read; notifying = true; if (stream.CanSeek && stream.Position == stream.Length) { Notify (CFStreamEventType.EndEncountered); status = NSStreamStatus.AtEnd; } notifying = false; return read; } catch (Exception e) { // -1 means that the operation failed; more information about the error can be obtained with streamError. error = new NSExceptionError (e); return -1; } } [Preserve (Conditional = true)] public override NSError Error { get { return error ?? base.Error; } } [Preserve (Conditional = true)] public override bool HasBytesAvailable () { return true; } [Preserve (Conditional = true)] protected override bool GetBuffer (out IntPtr buffer, out nuint len) { // Just call the base implemention (which will return false) return base.GetBuffer (out buffer, out len); } // NSInvalidArgumentException Reason: *** -propertyForKey: only defined for abstract class. Define -[System_Net_Http_NSUrlSessionHandler_WrappedNSInputStream propertyForKey:]! [Preserve (Conditional = true)] protected override NSObject? GetProperty (NSString key) { return null; } [Preserve (Conditional = true)] protected override bool SetProperty (NSObject? property, NSString key) { return false; } [Preserve (Conditional = true)] protected override bool SetCFClientFlags (CFStreamEventType inFlags, IntPtr inCallback, IntPtr inContextPtr) { // Just call the base implementation, which knows how to handle everything. return base.SetCFClientFlags (inFlags, inCallback, inContextPtr); } [Preserve (Conditional = true)] #if NET public override void Schedule (NSRunLoop aRunLoop, NSString nsMode) #else public override void Schedule (NSRunLoop aRunLoop, string mode) #endif { var cfRunLoop = aRunLoop.GetCFRunLoop (); #if !NET var nsMode = new NSString (mode); #endif cfRunLoop.AddSource (source, nsMode); if (notifying) return; notifying = true; Notify (CFStreamEventType.HasBytesAvailable); notifying = false; } [Preserve (Conditional = true)] #if NET public override void Unschedule (NSRunLoop aRunLoop, NSString nsMode) #else public override void Unschedule (NSRunLoop aRunLoop, string mode) #endif { var cfRunLoop = aRunLoop.GetCFRunLoop (); #if !NET var nsMode = new NSString (mode); #endif cfRunLoop.RemoveSource (source, nsMode); } protected override void Dispose (bool disposing) { stream?.Dispose (); } } } } ```
```smalltalk //////////////////////////////////////////////////////////////////////////////////////////////////// // All rights reserved. // // 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. // // - Neither the name of Daniel Kollmann nor the names of its contributors may be used to endorse // or promote products derived from this software without specific prior written permission. // // 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. //////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// // The above software in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Windows.Forms.Design; using System.Reflection; using System.Runtime.InteropServices; using Behaviac.Design.Data; using Behaviac.Design.Properties; using Behaviac.Design.Attributes; using Behaviac.Design.ObjectUI; namespace Behaviac.Design { internal partial class PropertiesDock : WeifenLuo.WinFormsUI.Docking.DockContent { private static List<PropertiesDock> __propertyGrids = new List<PropertiesDock>(); /// <summary> /// The number of property grids available. /// </summary> internal static int Count { get { return __propertyGrids.Count; } } internal static void CloseAll() { PropertiesDock[] docks = __propertyGrids.ToArray(); foreach (PropertiesDock dock in docks) { dock.Close(); } } internal static bool ReadOnly { set { foreach (PropertiesDock dock in __propertyGrids) { dock.Enabled = !value; } } } internal static PropertiesDock CreateFloatDock(Nodes.BehaviorNode rootBehavior, object node) { PropertiesDock newDock = null; // Ignore the first one. for (int i = 1; i < __propertyGrids.Count; ++i) { if (__propertyGrids[i].SelectedObject == node) { newDock = __propertyGrids[i]; break; } } if (newDock == null) { newDock = new PropertiesDock(); newDock.Show(MainWindow.Instance.DockPanel, WeifenLuo.WinFormsUI.Docking.DockState.Float); } else { newDock.Show(); } newDock._rootBehavior = rootBehavior; newDock.SelectedObject = node; return newDock; } /// <summary> /// Forces all property grids to reinspect their objects. /// </summary> internal static void UpdatePropertyGrids() { foreach (PropertiesDock dock in __propertyGrids) { dock.SelectedObject = dock.SelectedObject; } } private Nodes.BehaviorNode _rootBehavior = null; private object _selectedObject = null; public object SelectedObject { get { return _selectedObject; } set { if (value == null && _selectedObject == value) { return; } RecreatePropertyGrid(); _selectedObject = value; string text = Resources.Properties; if (_selectedObject != null) { string objCls = _selectedObject.ToString(); if (_selectedObject is Nodes.Node) { Nodes.Node node = _selectedObject as Nodes.Node; objCls = node.ExportClass; } else if (_selectedObject is Attachments.Attachment) { Attachments.Attachment attach = _selectedObject as Attachments.Attachment; objCls = attach.ExportClass; } text = string.Format(Resources.PropertiesOf, Plugin.GetResourceString(objCls)); } Text = text; TabText = text; // this is a hack to work around a bug in the docking suite text += ' '; Text = text; TabText = text; propertyGrid.PropertiesVisible(false, false); if (_selectedObject != null) { this.SuspendDrawing(); this.SuspendLayout(); IList<DesignerPropertyInfo> properties = DesignerProperty.GetDesignerProperties(_selectedObject.GetType(), DesignerProperty.SortByDisplayOrder); this.UpdateProperties(properties); propertyGrid.UpdateSizes(); propertyGrid.PropertiesVisible(true, true); this.ResumeLayout(); this.ResumeDrawing(); } } } private void RecreatePropertyGrid() { //propertyGrid.ClearProperties(); propertyGrid.Dispose(); propertyGrid = new CustomPropertyGridTest.DynamicPropertyGrid(); this.SuspendLayout(); this.propertyGrid.BackColor = System.Drawing.SystemColors.Control; this.propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill; this.propertyGrid.Location = new System.Drawing.Point(0, 0); this.propertyGrid.Name = "propertyGrid"; this.propertyGrid.Size = new System.Drawing.Size(234, 414); this.propertyGrid.TabIndex = 0; this.Controls.Add(this.propertyGrid); this.ResumeLayout(false); } #region SuspendDrawing private int suspendCounter = 0; [DllImport("user32.dll")] public static extern int SendMessage(IntPtr hWnd, Int32 wMsg, bool wParam, Int32 lParam); private const int WM_SETREDRAW = 11; private void SuspendDrawing() { if (suspendCounter == 0) { SendMessage(this.Handle, WM_SETREDRAW, false, 0); } suspendCounter++; } private void ResumeDrawing() { suspendCounter--; if (suspendCounter == 0) { SendMessage(this.Handle, WM_SETREDRAW, true, 0); this.Refresh(); } } #endregion internal static bool InspectObject(Nodes.BehaviorNode rootBehavior, object obj, bool byForce = true) { if (__propertyGrids.Count < 1) { return false; } if (byForce && Plugin.EditMode == EditModes.Design || __propertyGrids[0].SelectedObject != obj) { __propertyGrids[0]._rootBehavior = rootBehavior; __propertyGrids[0].SelectedObject = obj; } return true; } public PropertiesDock() { InitializeComponent(); __propertyGrids.Add(this); propertyGrid.PropertiesVisible(false, false); this.Enabled = (Plugin.EditMode == EditModes.Design); this.Disposed += new EventHandler(PropertiesDock_Disposed); } void PropertiesDock_Disposed(object sender, EventArgs e) { this.Disposed -= PropertiesDock_Disposed; if (this.propertyGrid != null) { this.propertyGrid.Dispose(); this.propertyGrid = null; } } protected override void OnClosed(EventArgs e) { SelectedObject = null; __propertyGrids.Remove(this); base.OnClosed(e); } class CategorySorter : IComparer<string> { public int Compare(string x, string y) { //Node and Comment are below all other categories if (x == "CategoryComment") { if (y == "NodeBasic") { return -1; } return 1; } else if (x == "NodeBasic") { if (y == "CategoryComment") { return 1; } return 1; } if (y == "CategoryComment") { if (x == "NodeBasic") { return 1; } return -1; } else if (y == "NodeBasic") { if (x == "CategoryComment") { return -1; } return -1; } int ret = x.CompareTo(y); return ret; } } private ObjectUIPolicy uiPolicy = null; //private void UpdateProperties(IList<DesignerPropertyInfo> properties, List<MethodDef.Param> parameters, string parametersCategory) private void UpdateProperties(IList<DesignerPropertyInfo> properties) { DefaultObject obj = SelectedObject as DefaultObject; if (obj != null) { uiPolicy = obj.CreateUIPolicy(); uiPolicy.Initialize(obj); } List<string> categories = new List<string>(); foreach (DesignerPropertyInfo property in properties) { if (uiPolicy.ShouldAddProperty(property) && !property.Attribute.HasFlags(DesignerProperty.DesignerFlags.NoDisplay) && (property.Attribute.CategoryResourceString != "CategoryVersion" || Settings.Default.ShowVersionInfo) && !categories.Contains(property.Attribute.CategoryResourceString)) { categories.Add(property.Attribute.CategoryResourceString); } } categories.Sort(new CategorySorter()); foreach (string category in categories) { propertyGrid.AddCategory(Plugin.GetResourceString(category), true); foreach (DesignerPropertyInfo property in properties) { if (!property.Attribute.HasFlags(DesignerProperty.DesignerFlags.NoDisplay) && property.Attribute.CategoryResourceString == category) { if (uiPolicy != null && !uiPolicy.ShouldAddProperty(property)) { continue; } object value_ = property.Property.GetValue(_selectedObject, null); Type type = property.Attribute.GetEditorType(value_); DesignerMethodEnum propertyMethod = property.Attribute as DesignerMethodEnum; if (propertyMethod != null) { if ((propertyMethod.MethodType & MethodType.Task) == MethodType.Task) { type = typeof(DesignerMethodEnumEditor); } } string displayName = property.Attribute.DisplayName; if (uiPolicy != null) { displayName = uiPolicy.GetLabel(property); } Label label = propertyGrid.AddProperty(displayName, type, property.Attribute.HasFlags(DesignerProperty.DesignerFlags.ReadOnly)); // register description showing label.MouseEnter += new EventHandler(label_MouseEnter); // when we found an editor we connect it to the object if (type != null) { DesignerPropertyEditor editor = (DesignerPropertyEditor)label.Tag; editor.SetRootNode((Nodes.Node)this._rootBehavior); editor.SetProperty(property, _selectedObject); editor.ValueWasAssigned(); editor.MouseEnter += editor_MouseEnter; editor.DescriptionWasChanged += editor_DescriptionWasChanged; editor.ValueWasChanged += editor_ValueWasChanged; if (uiPolicy != null) { uiPolicy.AddEditor(editor); } } MethodDef method = null; bool methodEditorEnable = true; if (propertyMethod != null) { if (propertyMethod.MethodType != MethodType.Status) { method = value_ as MethodDef; //methodEditorEnable = (propertyMethod.MethodType != MethodType.Event); } } else { DesignerRightValueEnum propertyRV = property.Attribute as DesignerRightValueEnum; if (propertyRV != null) { RightValueDef rv = value_ as RightValueDef; if (rv != null && rv.IsMethod) { method = rv.Method; } } } if (property.Attribute != null) { if (method != null) { if (property.Attribute.HasFlags(DesignerProperty.DesignerFlags.NoDisplayOnProperty)) { //don't dipslay on the property panel } else { bool bReadonly = property.Attribute.HasFlags(DesignerProperty.DesignerFlags.ReadOnlyParams); createParamEditor(method, methodEditorEnable, bReadonly); } } else { MethodDef.Param arrayIndexElement = null; if (value_ is VariableDef) { VariableDef var = value_ as VariableDef; arrayIndexElement = var.ArrayIndexElement; } else if (value_ is RightValueDef) { RightValueDef varRV = value_ as RightValueDef; if (varRV.Var != null) { arrayIndexElement = varRV.Var.ArrayIndexElement; } } if (arrayIndexElement != null) { createArrayIndexEditor(" ", arrayIndexElement); } } } } } } if (uiPolicy != null) { uiPolicy.Update(null, new DesignerPropertyInfo()); } } void createArrayIndexEditor(string preBlank, MethodDef.Param arrayIndex) { Type editorType = typeof(DesignerParameterComboEnumEditor); string arugmentsName = preBlank + "Index"; bool bReadonly = false; Label label = propertyGrid.AddProperty(arugmentsName, editorType, bReadonly); label.MouseEnter += new EventHandler(label_MouseEnter); DesignerPropertyEditor editor = (DesignerPropertyEditor)label.Tag; editor.Enabled = true; editor.SetParameter(arrayIndex, _selectedObject, bReadonly); editor.ValueWasAssigned(); editor.MouseEnter += editor_MouseEnter; editor.DescriptionWasChanged += editor_DescriptionWasChanged; editor.ValueWasChanged += editor_ValueWasChanged; } MethodDef.Param lastListParam = null; void createParamEditor(MethodDef method, bool enable, bool bReadonlyParent) { List<MethodDef.Param> parameters = method.Params; foreach (MethodDef.Param p in parameters) { Type editorType = typeof(DesignerParameterComboEnumEditor); string arugmentsName = " " + p.DisplayName; bool bReadonly = bReadonlyParent | p.Attribute.HasFlags(DesignerProperty.DesignerFlags.ReadOnly); Label label = propertyGrid.AddProperty(arugmentsName, editorType, bReadonly); label.MouseEnter += new EventHandler(label_MouseEnter); DesignerPropertyEditor editor = (DesignerPropertyEditor)label.Tag; if (p.Type.Name == "IList") { lastListParam = p; } if (p.Type.Name == "System_Object" && lastListParam != null) { p.ListParam = lastListParam; } editor.Enabled = enable; editor.SetParameter(p, _selectedObject, bReadonly); editor.ValueWasAssigned(); editor.MouseEnter += editor_MouseEnter; editor.DescriptionWasChanged += editor_DescriptionWasChanged; editor.ValueWasChanged += editor_ValueWasChanged; //editor.ValueType = p.Attribute.ValueType; MethodDef.Param arrayIndexElement = null; if (p.Value is VariableDef) { VariableDef var = p.Value as VariableDef; arrayIndexElement = var.ArrayIndexElement; } else if (p.Value is RightValueDef) { RightValueDef varRV = p.Value as RightValueDef; if (varRV.Var != null) { arrayIndexElement = varRV.Var.ArrayIndexElement; } } if (arrayIndexElement != null) { createArrayIndexEditor(" ", arrayIndexElement); } } } void createParEditor(List<ParInfo> pars, Type editorType) { foreach (ParInfo par in pars) { if (par.Display) { Label label = propertyGrid.AddProperty(par.BasicName, editorType, false); label.MouseEnter += new EventHandler(label_MouseEnter); DesignerPropertyEditor editor = (DesignerPropertyEditor)label.Tag; editor.SetPar(par, SelectedObject); editor.MouseEnter += editor_MouseEnter; editor.ValueWasChanged += editor_ValueWasChanged; } } } void editor_ValueWasChanged(object sender, DesignerPropertyInfo property) { string text = _selectedObject == null ? Resources.Properties : string.Format(Resources.PropertiesOf, _selectedObject.ToString()); Text = text; TabText = text; UndoManager.PreSave(); if (_selectedObject != null) { Nodes.Node node = null; if (_selectedObject is Nodes.Node) { node = (Nodes.Node)_selectedObject; } else if (_selectedObject is Attachments.Attachment) { node = ((Attachments.Attachment)_selectedObject).Node; } if (node != null) { if ((property.Attribute == null || !property.Attribute.HasFlags(DesignerProperty.DesignerFlags.NotPrefabRelated)) && !string.IsNullOrEmpty(node.PrefabName)) { node.HasOwnPrefabData = true; } UndoManager.Save(this._rootBehavior); } } UndoManager.PostSave(); // if we change a DesignerNodeProperty other properties of that object might be affected if (property.Attribute is DesignerNodeProperty || uiPolicy != null && uiPolicy.ShouldUpdatePropertyGrids(property)) { PropertiesDock.UpdatePropertyGrids(); } if (BehaviorTreeViewDock.LastFocused != null && BehaviorTreeViewDock.LastFocused.BehaviorTreeView != null) { BehaviorTreeViewDock.LastFocused.BehaviorTreeView.Redraw(); } } void label_MouseEnter(object sender, EventArgs e) { Label label = (Label)sender; DesignerPropertyEditor editor = (DesignerPropertyEditor)label.Tag; propertyGrid.ShowDescription(editor.DisplayName, editor.Description); } void editor_MouseEnter(object sender, EventArgs e) { DesignerPropertyEditor editor = (DesignerPropertyEditor)sender; propertyGrid.ShowDescription(editor.DisplayName, editor.Description); } void editor_DescriptionWasChanged(string displayName, string description) { propertyGrid.ShowDescription(displayName, description); } void item_Click(object sender, EventArgs e) { MenuItem item = (MenuItem)sender; Type editorType = (Type)item.Tag; Label label = (Label)item.Parent.Tag; DesignerPropertyEditor editor = (DesignerPropertyEditor)label.Tag; Debug.Check(_selectedObject == editor.SelectedObject); Nodes.Node node = _selectedObject as Nodes.Node; if (node != null) { node.OnPropertyValueChanged(true); } Attachments.Attachment attach = _selectedObject as Attachments.Attachment; if (attach != null) { attach.OnPropertyValueChanged(true); } SelectedObject = _selectedObject; } } } ```
Palpita arsaltealis is a moth of the family Crambidae first described by Francis Walker in 1859. It is found in the north-eastern United States, south to South Carolina. It is also present in Quebec and Ontario. The wingspan is about 16 mm. Adults are on wing from spring to late summer. External links Line, Larry "Palpita arsaltealis". Moths of Maryland. Retrieved June 3, 2018. Moths described in 1859 Palpita Moths of North America
```objective-c /* -*-objc-*- GSStreamContext - Drawing context to a stream. Written by: Adam Fedor <fedor@gnu.org> Date: Nov 1995 This file is part of the GNU Objective C User Interface Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public 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 If not, see <path_to_url or write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "config.h" #include "gsc/GSContext.h" #include "gsc/GSStreamContext.h" #include "gsc/GSStreamGState.h" #include <GNUstepGUI/GSFontInfo.h> #include <AppKit/NSAffineTransform.h> #include <AppKit/NSBezierPath.h> #include <AppKit/NSView.h> #include <AppKit/NSBitmapImageRep.h> #import <AppKit/NSFontDescriptor.h> #include <Foundation/NSArray.h> #include <Foundation/NSData.h> #include <Foundation/NSDebug.h> #include <Foundation/NSDictionary.h> #include <Foundation/NSString.h> #include <Foundation/NSUserDefaults.h> #include <Foundation/NSValue.h> #include <string.h> @interface GSFontInfo (experimental_glyph_printing_extension) // This method is currently only present in the libart backend -(const char *) nameOfGlyph: (NSGlyph)g; @end /* Print a floating point number regardless of localization */ static void fpfloat(FILE *stream, float f) { char buffer[80], *p; sprintf(buffer, "%g ", f); p = buffer; while (*p) { if (*p == ',') *p = '.'; p++; } fprintf(stream, "%s", buffer); } @interface GSStreamContext (Private) - (void) output: (const char*)s length: (size_t)length; - (void) output: (const char*)s; @end @implementation GSStreamContext + (Class) GStateClass { return [GSStreamGState class]; } + (BOOL) handlesPS { return YES; } - (void) dealloc { if (gstream) fclose(gstream); [super dealloc]; } - initWithContextInfo: (NSDictionary *)info { self = [super initWithContextInfo: info]; if (!self) return nil; if (info && [info objectForKey: @"NSOutputFile"]) { NSString *path = [info objectForKey: @"NSOutputFile"]; NSDebugLLog(@"GSContext", @"Printing to %@", path); #if defined(__MINGW32__) gstream = _wfopen([path fileSystemRepresentation], L"wb"); #else gstream = fopen([path fileSystemRepresentation], "w"); #endif if (!gstream) { NSDebugLLog(@"GSContext", @"%@: Could not open printer file %@", DPSinvalidfileaccess, path); return nil; } } else { NSDebugLLog(@"GSContext", @"%@: No stream file specified", DPSconfigurationerror); DESTROY(self); return nil; } return self; } - (BOOL)isDrawingToScreen { return NO; } @end @implementation GSStreamContext (Ops) /* your_sha256_hash------- */ /* Color operations */ /* your_sha256_hash------- */ - (void) DPSsetalpha: (CGFloat)a { [super DPSsetalpha: a]; /* This needs to be defined base on the the language level, etc. in the Prolog section. */ fpfloat(gstream, a); fprintf(gstream, "GSsetalpha\n"); } - (void) DPSsetcmykcolor: (CGFloat)c : (CGFloat)m : (CGFloat)y : (CGFloat)k { [super DPSsetcmykcolor: c : m : y : k]; fpfloat(gstream, c); fpfloat(gstream, m); fpfloat(gstream, y); fpfloat(gstream, k); fprintf(gstream, "setcmykcolor\n"); } - (void) DPSsetgray: (CGFloat)gray { [super DPSsetgray: gray]; fpfloat(gstream, gray); fprintf(gstream, "setgray\n"); } - (void) DPSsethsbcolor: (CGFloat)h : (CGFloat)s : (CGFloat)b { [super DPSsethsbcolor: h : s : b]; fpfloat(gstream, h); fpfloat(gstream, s); fpfloat(gstream, b); fprintf(gstream, "sethsbcolor\n"); } - (void) DPSsetrgbcolor: (CGFloat)r : (CGFloat)g : (CGFloat)b { [super DPSsetrgbcolor: r : g : b]; fpfloat(gstream, r); fpfloat(gstream, g); fpfloat(gstream, b); fprintf(gstream, "setrgbcolor\n"); } - (void) GSSetFillColor: (const CGFloat *)values { [self notImplemented: _cmd]; } - (void) GSSetStrokeColor: (const CGFloat *)values { [self notImplemented: _cmd]; } - (void) GSSetPatterColor: (NSImage*)image { [self notImplemented: _cmd]; } /* your_sha256_hash------- */ /* Text operations */ /* your_sha256_hash------- */ - (void) DPSashow: (CGFloat)x : (CGFloat)y : (const char*)s { fpfloat(gstream, x); fpfloat(gstream, y); fprintf(gstream, "("); [self output:s]; fprintf(gstream, ") ashow\n"); } - (void) DPSawidthshow: (CGFloat)cx : (CGFloat)cy : (int)c : (CGFloat)ax : (CGFloat)ay : (const char*)s { fpfloat(gstream, cx); fpfloat(gstream, cy); fprintf(gstream, "%d ", c); fpfloat(gstream, ax); fpfloat(gstream, ay); fprintf(gstream, "("); [self output:s]; fprintf(gstream, ") awidthshow\n"); } - (void) DPScharpath: (const char*)s : (int)b { fprintf(gstream, "("); [self output:s]; fprintf(gstream, ") %d charpath\n", b); } - (void) DPSshow: (const char*)s { fprintf(gstream, "("); [self output:s]; fprintf(gstream, ") show\n"); } - (void) DPSwidthshow: (CGFloat)x : (CGFloat)y : (int)c : (const char*)s { fpfloat(gstream, x); fpfloat(gstream, y); fprintf(gstream, "%d (", c); [self output:s]; fprintf(gstream, ") widthshow\n"); } - (void) DPSxshow: (const char*)s : (const CGFloat*)numarray : (int)size { [self notImplemented: _cmd]; } - (void) DPSxyshow: (const char*)s : (const CGFloat*)numarray : (int)size { [self notImplemented: _cmd]; } - (void) DPSyshow: (const char*)s : (const CGFloat*)numarray : (int)size { [self notImplemented: _cmd]; } - (void) GSSetCharacterSpacing: (CGFloat)extra { [self notImplemented: _cmd]; } - (void) GSSetFont: (void *)fontref { const CGFloat *m = [(GSFontInfo *)fontref matrix]; NSString *postscriptName; postscriptName = [[(GSFontInfo *)fontref fontDescriptor] postscriptName]; if (nil == postscriptName) { postscriptName = [(GSFontInfo *)fontref fontName]; } fprintf(gstream, "/%s findfont ", [postscriptName cString]); fprintf(gstream, "["); fpfloat(gstream, m[0]); fpfloat(gstream, m[1]); fpfloat(gstream, m[2]); fpfloat(gstream, m[3]); fpfloat(gstream, m[4]); fpfloat(gstream, m[5]); fprintf(gstream, "] "); fprintf(gstream, " makefont setfont\n"); [super GSSetFont: fontref]; } - (void) GSSetFontSize: (CGFloat)size { [self notImplemented: _cmd]; } - (void) GSShowText: (const char *)string : (size_t)length { fprintf(gstream, "("); [self output:string length: length]; fprintf(gstream, ") show\n"); } - (void) GSShowGlyphs: (const NSGlyph *)glyphs : (size_t)length { GSFontInfo *font = gstate->font; if ([font respondsToSelector: @selector(nameOfGlyph:)]) { unsigned int i; for (i = 0; i < length; i++) { fprintf(gstream, "/%s glyphshow\n", [font nameOfGlyph: glyphs[i]]); } } else { /* If backend doesn't handle nameOfGlyph, assume the glyphs are just mapped to characters. This is the case for the xlib backend (at least for now). */ char string[length + 1]; unsigned int i; for (i = 0; i < length; i++) { string[i] = glyphs[i]; } string[length] = 0; [self DPSshow: string]; } } - (void) GSShowGlyphsWithAdvances: (const NSGlyph *)glyphs : (const NSSize *)advances : (size_t)length { // FIXME: Currently advances is ignored [self GSShowGlyphs: glyphs : length]; } /* your_sha256_hash------- */ /* Gstate Handling */ /* your_sha256_hash------- */ - (void) DPSgrestore { [super DPSgrestore]; fprintf(gstream, "grestore\n"); } - (void) DPSgsave { [super DPSgsave]; fprintf(gstream, "gsave\n"); } - (void) DPSgstate { [super DPSgsave]; fprintf(gstream, "gstaten"); } - (void) DPSinitgraphics { [super DPSinitgraphics]; fprintf(gstream, "initgraphics\n"); } - (void) DPSsetgstate: (int)gst { [self notImplemented: _cmd]; } - (int) GSDefineGState { [self notImplemented: _cmd]; return 0; } - (void) GSUndefineGState: (int)gst { [self notImplemented: _cmd]; } - (void) GSReplaceGState: (int)gst { [self notImplemented: _cmd]; } /* your_sha256_hash------- */ /* Gstate operations */ /* your_sha256_hash------- */ - (void) DPSsetdash: (const CGFloat*)pat : (NSInteger)size : (CGFloat)offset { int i; fprintf(gstream, "["); for (i = 0; i < size; i++) fpfloat(gstream, pat[i]); fprintf(gstream, "] "); fpfloat(gstream, offset); fprintf(gstream, "setdash\n"); } - (void) DPSsetflat: (CGFloat)flatness { [super DPSsetflat: flatness]; fpfloat(gstream, flatness); fprintf(gstream, "setflat\n"); } - (void) DPSsethalftonephase: (CGFloat)x : (CGFloat)y { [super DPSsethalftonephase: x : y]; fpfloat(gstream, x); fpfloat(gstream, y); fprintf(gstream, "sethalftonephase\n"); } - (void) DPSsetlinecap: (int)linecap { [super DPSsetlinecap: linecap]; fprintf(gstream, "%d setlinecap\n", linecap); } - (void) DPSsetlinejoin: (int)linejoin { [super DPSsetlinejoin: linejoin]; fprintf(gstream, "%d setlinejoin\n", linejoin); } - (void) DPSsetlinewidth: (CGFloat)width { [super DPSsetlinewidth: width]; fpfloat(gstream, width); fprintf(gstream, "setlinewidth\n"); } - (void) DPSsetmiterlimit: (CGFloat)limit { [super DPSsetmiterlimit: limit]; fpfloat(gstream, limit); fprintf(gstream, "setmiterlimit\n"); } - (void) DPSsetstrokeadjust: (int)b { [super DPSsetstrokeadjust: b]; fprintf(gstream, "%s setstrokeadjust\n", b? "true" : "false"); } /* your_sha256_hash------- */ /* Matrix operations */ /* your_sha256_hash------- */ - (void) DPSconcat: (const CGFloat*)m { [super DPSconcat: m]; if ((m[0] == 1.0) && (m[1] == 0.0) && (m[2] == 0.0) && (m[3] == 1.0)) { if ((m[4] != 0.0) || (m[5] != 0.0)) { fpfloat(gstream, m[4]); fpfloat(gstream, m[5]); fprintf(gstream, "translate\n"); } } else { fprintf(gstream, "["); fpfloat(gstream, m[0]); fpfloat(gstream, m[1]); fpfloat(gstream, m[2]); fpfloat(gstream, m[3]); fpfloat(gstream, m[4]); fpfloat(gstream, m[5]); fprintf(gstream, "] concat\n"); } } - (void) DPSinitmatrix { [super DPSinitmatrix]; fprintf(gstream, "initmatrix\n"); } - (void) DPSrotate: (CGFloat)angle { [super DPSrotate: angle]; fpfloat(gstream, angle); fprintf(gstream, "rotate\n"); } - (void) DPSscale: (CGFloat)x : (CGFloat)y { [super DPSscale: x : y]; fpfloat(gstream, x); fpfloat(gstream, y); fprintf(gstream, "scale\n"); } - (void) DPStranslate: (CGFloat)x : (CGFloat)y { [super DPStranslate: x : y]; fpfloat(gstream, x); fpfloat(gstream, y); fprintf(gstream, "translate\n"); } - (void) GSSetCTM: (NSAffineTransform *)ctm { NSAffineTransformStruct matrix = [ctm transformStruct]; fprintf(gstream, "["); fpfloat(gstream, matrix.m11); fpfloat(gstream, matrix.m12); fpfloat(gstream, matrix.m21); fpfloat(gstream, matrix.m22); fpfloat(gstream, matrix.tX); fpfloat(gstream, matrix.tY); fprintf(gstream, "] setmatrix\n"); } - (void) GSConcatCTM: (NSAffineTransform *)ctm { NSAffineTransformStruct matrix = [ctm transformStruct]; fprintf(gstream, "["); fpfloat(gstream, matrix.m11); fpfloat(gstream, matrix.m12); fpfloat(gstream, matrix.m21); fpfloat(gstream, matrix.m22); fpfloat(gstream, matrix.tX); fpfloat(gstream, matrix.tY); fprintf(gstream, "] concat\n"); } /* your_sha256_hash------- */ /* Paint operations */ /* your_sha256_hash------- */ - (void) DPSarc: (CGFloat)x : (CGFloat)y : (CGFloat)r : (CGFloat)angle1 : (CGFloat)angle2 { fpfloat(gstream, x); fpfloat(gstream, y); fpfloat(gstream, r); fpfloat(gstream, angle1); fpfloat(gstream, angle2); fprintf(gstream, "arc\n"); } - (void) DPSarcn: (CGFloat)x : (CGFloat)y : (CGFloat)r : (CGFloat)angle1 : (CGFloat)angle2 { fpfloat(gstream, x); fpfloat(gstream, y); fpfloat(gstream, r); fpfloat(gstream, angle1); fpfloat(gstream, angle2); fprintf(gstream, "arcn\n"); } - (void) DPSarct: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2 : (CGFloat)r { fpfloat(gstream, x1); fpfloat(gstream, y1); fpfloat(gstream, x2); fpfloat(gstream, y2); fpfloat(gstream, r); fprintf(gstream, "arct\n"); } - (void) DPSclip { fprintf(gstream, "clip\n"); } - (void) DPSclosepath { fprintf(gstream, "closepath\n"); } - (void)DPScurveto: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2 : (CGFloat)x3 : (CGFloat)y3 { fpfloat(gstream, x1); fpfloat(gstream, y1); fpfloat(gstream, x2); fpfloat(gstream, y2); fpfloat(gstream, x3); fpfloat(gstream, y3); fprintf(gstream, "curveto\n"); } - (void) DPSeoclip { fprintf(gstream, "eoclip\n"); } - (void) DPSeofill { fprintf(gstream, "eofill\n"); } - (void) DPSfill { fprintf(gstream, "fill\n"); } - (void) DPSflattenpath { fprintf(gstream, "flattenpath\n"); } - (void) DPSinitclip { fprintf(gstream, "initclip\n"); } - (void) DPSlineto: (CGFloat)x : (CGFloat)y { fpfloat(gstream, x); fpfloat(gstream, y); fprintf(gstream, "lineto\n"); } - (void) DPSmoveto: (CGFloat)x : (CGFloat)y { fpfloat(gstream, x); fpfloat(gstream, y); fprintf(gstream, "moveto\n"); } - (void) DPSnewpath { fprintf(gstream, "newpath\n"); } - (void) DPSpathbbox: (CGFloat*)llx : (CGFloat*)lly : (CGFloat*)urx : (CGFloat*)ury { } - (void) DPSrcurveto: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2 : (CGFloat)x3 : (CGFloat)y3 { fpfloat(gstream, x1); fpfloat(gstream, y1); fpfloat(gstream, x2); fpfloat(gstream, y2); fpfloat(gstream, x3); fpfloat(gstream, y3); fprintf(gstream, "rcurveto\n"); } - (void) DPSrectclip: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h { fpfloat(gstream, x); fpfloat(gstream, y); fpfloat(gstream, w); fpfloat(gstream, h); fprintf(gstream, "rectclip\n"); } - (void) DPSrectfill: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h { fpfloat(gstream, x); fpfloat(gstream, y); fpfloat(gstream, w); fpfloat(gstream, h); fprintf(gstream, "rectfill\n"); } - (void) DPSrectstroke: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h { fpfloat(gstream, x); fpfloat(gstream, y); fpfloat(gstream, w); fpfloat(gstream, h); fprintf(gstream, "rectstroke\n"); } - (void) DPSreversepath { fprintf(gstream, "reversepath\n"); } - (void) DPSrlineto: (CGFloat)x : (CGFloat)y { fpfloat(gstream, x); fpfloat(gstream, y); fprintf(gstream, "rlineto\n"); } - (void) DPSrmoveto: (CGFloat)x : (CGFloat)y { fpfloat(gstream, x); fpfloat(gstream, y); fprintf(gstream, "rmoveto\n"); } - (void) DPSstroke { fprintf(gstream, "stroke\n"); } - (void) GSSendBezierPath: (NSBezierPath *)path { NSBezierPathElement type; NSPoint pts[3]; NSInteger i, count = 10; CGFloat pattern[10]; CGFloat phase = 0.0; [self DPSnewpath]; [self DPSsetlinewidth: [path lineWidth]]; [self DPSsetlinejoin: [path lineJoinStyle]]; [self DPSsetlinecap: [path lineCapStyle]]; [self DPSsetmiterlimit: [path miterLimit]]; [self DPSsetflat: [path flatness]]; [path getLineDash: pattern count: &count phase: &phase]; // Always sent the dash pattern. When NULL this will reset to a solid line. [self DPSsetdash: pattern : count : phase]; count = [path elementCount]; for (i = 0; i < count; i++) { type = [path elementAtIndex: i associatedPoints: pts]; switch (type) { case NSMoveToBezierPathElement: [self DPSmoveto: pts[0].x : pts[0].y]; break; case NSLineToBezierPathElement: [self DPSlineto: pts[0].x : pts[0].y]; break; case NSCurveToBezierPathElement: [self DPScurveto: pts[0].x : pts[0].y : pts[1].x : pts[1].y : pts[2].x : pts[2].y]; break; case NSClosePathBezierPathElement: [self DPSclosepath]; break; default: break; } } } - (void) GSRectClipList: (const NSRect *)rects : (int)count { int i; NSRect union_rect; if (count == 0) return; /* The specification is not clear if the union of the rects should produce the new clip rect or if the outline of all rects should be used as clip path. */ union_rect = rects[0]; for (i = 1; i < count; i++) union_rect = NSUnionRect(union_rect, rects[i]); [self DPSrectclip: NSMinX(union_rect) : NSMinY(union_rect) : NSWidth(union_rect) : NSHeight(union_rect)]; } - (void) GSRectFillList: (const NSRect *)rects : (int)count { int i; for (i = 0; i < count; i++) [self DPSrectfill: NSMinX(rects[i]) : NSMinY(rects[i]) : NSWidth(rects[i]) : NSHeight(rects[i])]; } /* your_sha256_hash------- */ /* Window system ops */ /* your_sha256_hash------- */ - (void) DPScurrentgcdrawable: (void**)gc : (void**)draw : (int*)x : (int*)y { NSLog(@"DPSinvalidcontext: getting gcdrawable from stream context"); } - (void) DPScurrentoffset: (int*)x : (int*)y { NSLog(@"DPSinvalidcontext: getting drawable offset from stream context"); } - (void) DPSsetgcdrawable: (void*)gc : (void*)draw : (int)x : (int)y { NSLog(@"DPSinvalidcontext: setting gcdrawable from stream context"); } - (void) DPSsetoffset: (short int)x : (short int)y { NSLog(@"DPSinvalidcontext: setting drawable offset from stream context"); } /*your_sha256_hash---------*/ /* Graphics Extensions Ops */ /*your_sha256_hash---------*/ - (void) DPScomposite: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h : (NSInteger)gstateNum : (CGFloat)dx : (CGFloat)dy : (NSCompositingOperation)op { fpfloat(gstream, x); fpfloat(gstream, y); fpfloat(gstream, w); fpfloat(gstream, h); fprintf(gstream, "%d ", (int)gstateNum); fpfloat(gstream, dx); fpfloat(gstream, dy); fprintf(gstream, "%d composite\n", (int)op); } - (void) DPScompositerect: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h : (NSCompositingOperation)op { fpfloat(gstream, x); fpfloat(gstream, y); fpfloat(gstream, w); fpfloat(gstream, h); fprintf(gstream, "%d compositerect\n", (int)op); } - (void) DPSdissolve: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h : (NSInteger)gstateNum : (CGFloat)dx : (CGFloat)dy : (CGFloat)delta { NSLog(@"DPSinvalidcontext: dissolve in a stream context"); } - (void) GScomposite: (NSInteger)gstateNum toPoint: (NSPoint)aPoint fromRect: (NSRect)srcRect operation: (NSCompositingOperation)op fraction: (CGFloat)delta { [self DPScomposite: NSMinX(srcRect) : NSMinY(srcRect) : NSWidth(srcRect) : NSHeight(srcRect) : gstateNum : aPoint.x : aPoint.y : op]; } - (void) GSDrawImage: (NSRect)rect : (void *)imageref { id image = (id)imageref; unsigned char *imagePlanes[5]; if([image isKindOfClass: [NSBitmapImageRep class]]) { fprintf(gstream,"%%%% BeginImage\n"); [image getBitmapDataPlanes: imagePlanes]; [self NSDrawBitmap: rect : [image pixelsWide] : [image pixelsHigh] : [image bitsPerSample] : [image samplesPerPixel] : [image bitsPerPixel] : [image bytesPerRow] : [image isPlanar] : [image hasAlpha] : [image colorSpaceName] : (const unsigned char **)imagePlanes]; fprintf(gstream,"%%%% EndImage\n"); } } /* your_sha256_hash------- */ /* Client functions */ /* your_sha256_hash------- */ - (void) DPSPrintf: (const char *)fmt : (va_list)args { vfprintf(gstream, fmt, args); } - (void) DPSWriteData: (const char *)buf : (unsigned int)count { /* Not sure here. Should we translate to ASCII if it's not already? */ } @end static void writeHex(FILE *gstream, const unsigned char *data, int count) { static const char *hexdigits = "0123456789abcdef"; int i; for (i = 0; i < count; i++) { fputc(hexdigits[(int)(data[i] / 16)], gstream); fputc(hexdigits[(int)(data[i] % 16)], gstream); if (i && i % 40 == 0) fprintf(gstream, "\n"); } } @implementation GSStreamContext (Graphics) - (void) NSDrawBitmap: (NSRect)rect : (NSInteger)pixelsWide : (NSInteger)pixelsHigh : (NSInteger)bitsPerSample : (NSInteger)samplesPerPixel : (NSInteger)bitsPerPixel : (NSInteger)bytesPerRow : (BOOL)isPlanar : (BOOL)hasAlpha : (NSString *)colorSpaceName : (const unsigned char *const [5])data { NSInteger bytes, spp; CGFloat y; BOOL flipped = NO; /* In a flipped view, we don't want to flip the image again, which would make it come out upsidedown. FIXME: This can't be right, can it? */ if ([[NSView focusView] isFlipped]) flipped = YES; /* Save scaling */ fprintf(gstream, "matrix\ncurrentmatrix\n"); y = NSMinY(rect); if (flipped) y += NSHeight(rect); fpfloat(gstream, NSMinX(rect)); fpfloat(gstream, y); fprintf(gstream, "translate "); fpfloat(gstream, NSWidth(rect)); fpfloat(gstream, NSHeight(rect)); fprintf(gstream, "scale\n"); if (bitsPerSample == 0) bitsPerSample = 8; bytes = (bitsPerSample * pixelsWide * pixelsHigh + 7) / 8; if (bytes * samplesPerPixel != bytesPerRow * pixelsHigh) { NSLog(@"Image Rendering Error: Dodgy bytesPerRow value %d", (int)bytesPerRow); NSLog(@" pixelsHigh=%d, bytes=%d, samplesPerPixel=%d", (int)bytesPerRow, (int)pixelsHigh, (int)bytes); return; } if (hasAlpha) spp = samplesPerPixel - 1; else spp = samplesPerPixel; if (samplesPerPixel > 1) { if (isPlanar || hasAlpha) { if (bitsPerSample != 8) { NSLog(@"Image format conversion not supported for bps!=8"); return; } } fprintf(gstream, "%d %d %d [%d 0 0 %d 0 %d]\n", (int)pixelsWide, (int)pixelsHigh, (int)bitsPerSample, (int)pixelsWide, (flipped) ? (int)pixelsHigh : (int)-pixelsHigh, (int)pixelsHigh); fprintf(gstream, "{currentfile %d string readhexstring pop}\n", (int)(pixelsWide * spp)); fprintf(gstream, "false %d colorimage\n", (int)spp); } else { fprintf(gstream, "%d %d %d [%d 0 0 %d 0 %d]\n", (int)pixelsWide, (int)pixelsHigh, (int)bitsPerSample, (int)pixelsWide, (flipped) ? (int)pixelsHigh : (int)-pixelsHigh, (int)pixelsHigh); fprintf(gstream, "currentfile image\n"); } // The context is now waiting for data on its standard input if (isPlanar || hasAlpha) { // We need to do a format conversion. // We do this on the fly, sending data to the context as soon as // it is computed. int i, j; // Preset this variable to keep compiler happy. int alpha = 0; unsigned char val; for (j = 0; j < bytes; j++) { if (hasAlpha) { if (isPlanar) alpha = data[spp][j]; else alpha = data[0][spp + j * samplesPerPixel]; } for (i = 0; i < spp; i++) { if (isPlanar) val = data[i][j]; else val = data[0][i + j * samplesPerPixel]; if (hasAlpha) val = 255 - ((255 - val) * (long)alpha) / 255; writeHex(gstream, &val, 1); } if (j && j % 40 == 0) fprintf(gstream, "\n"); } fprintf(gstream, "\n"); } else { // The data is already in the format the context expects it in writeHex(gstream, data[0], bytes * samplesPerPixel); } /* Restore original scaling */ fprintf(gstream, "setmatrix\n"); } @end @implementation GSStreamContext (Private) - (void) output: (const char*)s length: (size_t)length { unsigned int i; for (i = 0; i < length; i++) { switch (s[i]) { case '(': fputs("\\(", gstream); break; case ')': fputs("\\)", gstream); break; default: fputc(s[i], gstream); break; } } } - (void) output: (const char*)s { [self output: s length: strlen(s)]; } @end ```
```sqlpl # Header section # Define incrementing schema version number SET @schema_version = '26'; # Add field ALTER TABLE `lists` ADD COLUMN `public_subscribe` tinyint(1) unsigned DEFAULT 1 NOT NULL AFTER `created`; # Footer section LOCK TABLES `settings` WRITE; INSERT INTO `settings` (`key`, `value`) VALUES('db_schema_version', @schema_version) ON DUPLICATE KEY UPDATE `value`=@schema_version; UNLOCK TABLES; ```
```swift import UIKit import SwiftUI @available(iOS 14.0, *) struct PageContentConfiguration<Content: View>: UIContentConfiguration { let content: Content var margins: NSDirectionalEdgeInsets init(@ViewBuilder content: () -> Content) { self.content = content() self.margins = .zero } func makeContentView() -> UIView & UIContentView { return PageContentView(configuration: self) } func updated(for state: UIConfigurationState) -> PageContentConfiguration<Content> { return self } func margins(_ edges: SwiftUI.Edge.Set = .all, _ length: CGFloat) -> PageContentConfiguration<Content> { var configuration = self configuration.margins = NSDirectionalEdgeInsets( top: edges.contains(.top) ? length : margins.top, leading: edges.contains(.leading) ? length : margins.leading, bottom: edges.contains(.bottom) ? length : margins.bottom, trailing: edges.contains(.trailing) ? length : margins.trailing ) return configuration } } @available(iOS 14.0, *) final class PageContentView<Content: View>: UIView, UIContentView { var configuration: UIContentConfiguration { didSet { if let configuration = configuration as? PageContentConfiguration<Content> { margins = configuration.margins hostingController.rootView = configuration.content directionalLayoutMargins = configuration.margins } } } override var intrinsicContentSize: CGSize { return sizeThatFits(UIView.layoutFittingCompressedSize) } override func sizeThatFits(_ size: CGSize) -> CGSize { let size = hostingController.sizeThatFits(in: size) return CGSize( width: size.width + margins.leading + margins.trailing, height: size.height + margins.top + margins.bottom ) } private var margins: NSDirectionalEdgeInsets private let hostingController: UIHostingController<Content> init(configuration: PageContentConfiguration<Content>) { self.configuration = configuration self.hostingController = UIHostingController(rootView: configuration.content) self.margins = configuration.margins super.init(frame: .zero) configure() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func didMoveToWindow() { super.didMoveToWindow() if window == nil { hostingController.willMove(toParent: nil) hostingController.removeFromParent() hostingController.didMove(toParent: nil) } else if let parent = parentViewController() { hostingController.willMove(toParent: parent) parent.addChild(hostingController) hostingController.didMove(toParent: parent) } } private func configure() { hostingController.view.backgroundColor = .clear addSubview(hostingController.view) hostingController.view.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ hostingController.view.topAnchor.constraint(equalTo: layoutMarginsGuide.topAnchor), hostingController.view.leadingAnchor.constraint(equalTo: layoutMarginsGuide.leadingAnchor), hostingController.view.trailingAnchor.constraint(equalTo: layoutMarginsGuide.trailingAnchor), hostingController.view.bottomAnchor.constraint(equalTo: layoutMarginsGuide.bottomAnchor) ]) } private func parentViewController() -> UIViewController? { var responder: UIResponder? = self while let nextResponder = responder?.next { if let viewController = nextResponder as? UIViewController { return viewController } responder = nextResponder } return nil } } ```
James Hutchison Kerr (August 30, 1837 – June 10, 1919) was an American educator, engineer, and politician. James Hutchison Kerr was born on August 30, 1837, to parents John Alexander Kerr and Eliza Jane Hutchison. Through his father, Kerr was of Scots-Irish descent. His mother's family was of Scottish descent. Both Kerr's paternal and maternal ancestors rebelled against James II of England during the Siege of Derry. The Kerr family lived in Chambersville, Pennsylvania, and subsequently moved to Oxford, Pennsylvania in 1844. Kerr was a pupil at New London Academy, then pursued further education in Rochester and Albany, New York, where he specialized in geology. Kerr returned to Pennsylvania to enroll at Westminster College in 1856, and eventually earned a degree from Yale University in 1865. During his final year at Yale, Kerr worked within the natural sciences department at Russell Military Academy. Upon leaving Russell, Kerr moved to Missouri instead of Mexico, where he had been offered a position as assistant geologist. Kerr became principal of the Jackson Collegiate Institute in Jackson, Missouri for two years. In 1869, he founded the Fruitland Normal Institute and served as superintendent of the Cape Girardeau County schools for four years. The Fruitland Normal Institute later moved to Cape Girardeau, but he remained principal of the institution for six consecutive years. Kerr fell ill with tuberculosis, began preparing to relocate to Colorado in 1874, and began his tenure as lead administrator at Colorado College in 1875. He founded a mining school that same year, and headed that program until 1880. Kerr was also a professor of chemistry and geology from 1876. Between 1876 and 1899, Kerr worked on several engineering projects throughout Mexico as well as Central and South America, lending his expertise in mining and metallurgy. He also traveled to China, Japan, and throughout Europe. In 1878, Yale awarded Kerr a master's degree. He served a single term on the Colorado House of Representatives from 1882 to 1884. James Hutchison Kerr married Mary Ella Spear on December 25, 1866. The couple had three children, son Guy Manning, and daughters, Helen May and Maria Louise, who died in 1886. Kerr moved to the Glockner Tuberculosis Sanatorium in Colorado Springs in 1900 with his wife, who had been paralyzed from a stroke in 1899. He died there on June 10, 1919, with his surviving daughter at his bedside. His wife survived him, and was subsequently informed of his death. From 1883, Kerr had lived in a Queen Anne mansion on 30 East Platte Avenue. The El Paso Club moved into the residence in the 1890s. Colorado College holds a collection of Kerr's papers, mainly dated from the time he was a resident of Glockner Sanatorium. References 1837 births 1919 deaths 19th-century American educators Colorado College faculty Yale University alumni American school superintendents American school principals Members of the Colorado House of Representatives 19th-century American politicians American people of Scotch-Irish descent Founders of American schools and colleges People from Indiana County, Pennsylvania People from Oxford, Pennsylvania Westminster College (Pennsylvania) alumni Engineers from Colorado 19th-century American engineers Engineers from Pennsylvania American mining engineers American metallurgists Educators from Missouri Educators from Connecticut
```javascript // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // Note: In 0.8 and before, crypto functions all defaulted to using // binary-encoded strings rather than buffers. 'use strict'; const { assertCrypto, deprecate } = require('internal/util'); assertCrypto(); const { ERR_CRYPTO_FIPS_FORCED, ERR_CRYPTO_FIPS_UNAVAILABLE } = require('internal/errors').codes; const constants = internalBinding('constants').crypto; const { fipsMode, fipsForced } = process.binding('config'); const { getFipsCrypto, setFipsCrypto, } = process.binding('crypto'); const { randomBytes, randomFill, randomFillSync } = require('internal/crypto/random'); const { pbkdf2, pbkdf2Sync } = require('internal/crypto/pbkdf2'); const { scrypt, scryptSync } = require('internal/crypto/scrypt'); const { generateKeyPair, generateKeyPairSync } = require('internal/crypto/keygen'); const { DiffieHellman, DiffieHellmanGroup, ECDH } = require('internal/crypto/diffiehellman'); const { Cipher, Cipheriv, Decipher, Decipheriv, privateDecrypt, privateEncrypt, publicDecrypt, publicEncrypt } = require('internal/crypto/cipher'); const { Sign, Verify } = require('internal/crypto/sig'); const { Hash, Hmac } = require('internal/crypto/hash'); const { getCiphers, getCurves, getDefaultEncoding, getHashes, setDefaultEncoding, setEngine, timingSafeEqual, toBuf } = require('internal/crypto/util'); const Certificate = require('internal/crypto/certificate'); // These helper functions are needed because the constructors can // use new, in which case V8 cannot inline the recursive constructor call function createHash(algorithm, options) { return new Hash(algorithm, options); } function createCipher(cipher, password, options) { return new Cipher(cipher, password, options); } function createCipheriv(cipher, key, iv, options) { return new Cipheriv(cipher, key, iv, options); } function createDecipher(cipher, password, options) { return new Decipher(cipher, password, options); } function createDecipheriv(cipher, key, iv, options) { return new Decipheriv(cipher, key, iv, options); } function createDiffieHellman(sizeOrKey, keyEncoding, generator, genEncoding) { return new DiffieHellman(sizeOrKey, keyEncoding, generator, genEncoding); } function createDiffieHellmanGroup(name) { return new DiffieHellmanGroup(name); } function createECDH(curve) { return new ECDH(curve); } function createHmac(hmac, key, options) { return new Hmac(hmac, key, options); } function createSign(algorithm, options) { return new Sign(algorithm, options); } function createVerify(algorithm, options) { return new Verify(algorithm, options); } module.exports = exports = { // Methods _toBuf: toBuf, createCipher, createCipheriv, createDecipher, createDecipheriv, createDiffieHellman, createDiffieHellmanGroup, createECDH, createHash, createHmac, createSign, createVerify, getCiphers, getCurves, getDiffieHellman: createDiffieHellmanGroup, getHashes, pbkdf2, pbkdf2Sync, generateKeyPair, generateKeyPairSync, privateDecrypt, privateEncrypt, prng: randomBytes, pseudoRandomBytes: randomBytes, publicDecrypt, publicEncrypt, randomBytes, randomFill, randomFillSync, rng: randomBytes, scrypt, scryptSync, setEngine, timingSafeEqual, getFips: !fipsMode ? getFipsDisabled : fipsForced ? getFipsForced : getFipsCrypto, setFips: !fipsMode ? setFipsDisabled : fipsForced ? setFipsForced : setFipsCrypto, // Classes Certificate, Cipher, Cipheriv, Decipher, Decipheriv, DiffieHellman, DiffieHellmanGroup, ECDH, Hash, Hmac, Sign, Verify }; function setFipsDisabled() { throw new ERR_CRYPTO_FIPS_UNAVAILABLE(); } function setFipsForced(val) { if (val) return; throw new ERR_CRYPTO_FIPS_FORCED(); } function getFipsDisabled() { return 0; } function getFipsForced() { return 1; } Object.defineProperties(exports, { // crypto.fips is deprecated. DEP0093. Use crypto.getFips()/crypto.setFips() fips: { get: !fipsMode ? getFipsDisabled : fipsForced ? getFipsForced : getFipsCrypto, set: !fipsMode ? setFipsDisabled : fipsForced ? setFipsForced : setFipsCrypto }, DEFAULT_ENCODING: { enumerable: true, configurable: true, get: deprecate(getDefaultEncoding, 'crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091'), set: deprecate(setDefaultEncoding, 'crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091') }, constants: { configurable: false, enumerable: true, value: constants }, // Legacy API createCredentials: { configurable: true, enumerable: true, get: deprecate(() => { return require('tls').createSecureContext; }, 'crypto.createCredentials is deprecated. ' + 'Use tls.createSecureContext instead.', 'DEP0010') }, Credentials: { configurable: true, enumerable: true, get: deprecate(function() { return require('tls').SecureContext; }, 'crypto.Credentials is deprecated. ' + 'Use tls.SecureContext instead.', 'DEP0011') } }); ```
```xml import * as tool from '../lib/tool'; import type { IVConsoleLog, IVConsoleLogData } from './log.model'; const getPreviewText = (val: any) => { const json = tool.safeJSONStringify(val, { maxDepth: 0 }); let preview = json.substring(0, 36); let ret = tool.getObjName(val); if (json.length > 36) { preview += '...'; } // ret = tool.getVisibleText(tool.htmlEncode(ret + ' ' + preview)); ret = tool.getVisibleText(ret + ' ' + preview); return ret; }; /** * Get a value's text content and its type. */ export const getValueTextAndType = (val: any, wrapString = true) => { let valueType = 'undefined'; let text = val; if (val instanceof VConsoleUninvocatableObject) { valueType = 'uninvocatable'; text = '(...)'; } else if (tool.isArray(val)) { valueType = 'array'; text = getPreviewText(val); } else if (tool.isObject(val)) { valueType = 'object'; text = getPreviewText(val); } else if (tool.isString(val)) { valueType = 'string'; text = tool.getVisibleText(val); if (wrapString) { text = '"' + text + '"'; } } else if (tool.isNumber(val)) { valueType = 'number'; text = String(val); } else if (tool.isBigInt(val)) { valueType = 'bigint'; text = String(val) + 'n'; } else if (tool.isBoolean(val)) { valueType = 'boolean'; text = String(val); } else if (tool.isNull(val)) { valueType = 'null'; text = 'null'; } else if (tool.isUndefined(val)) { valueType = 'undefined'; text = 'undefined'; } else if (tool.isFunction(val)) { valueType = 'function'; text = (val.name || 'function') + '()'; } else if (tool.isSymbol(val)) { valueType = 'symbol'; text = String(val); } return { text, valueType }; } const frontIdentifierList = ['.', '[', '(', '{', '}']; const backIdentifierList = [']', ')', '}']; const _getIdentifier = (text: string, identifierList: string[], startPos = 0) => { // for case 'aa.bb.cc' const ret = { text: '', // '.' pos: -1, // 5 before: '', // 'aa.bb' after: '', // 'cc' }; for (let i = text.length - 1; i >= startPos; i--) { const idx = identifierList.indexOf(text[i]); if (idx > -1) { ret.text = identifierList[idx]; ret.pos = i; ret.before = text.substring(startPos, i); ret.after = text.substring(i + 1, text.length); break; } } return ret; }; /** * A simple parser to get `[` or `]` information. */ export const getLastIdentifier = (text: string) => { const front = _getIdentifier(text, frontIdentifierList, 0); const back = _getIdentifier(text, backIdentifierList, front.pos + 1); return { front, back, }; }; export const isMatchedFilterText = (log: IVConsoleLog, filterText: string) => { if (filterText === '') { return true; } for (let i = 0; i < log.data.length; i++) { const type = typeof log.data[i].origData; if (type === 'string') { if (log.data[i].origData.indexOf(filterText) > -1) { return true; } } } return false; }; // keywords: `%c | %s | %d | %o`, must starts or ends with a blank const logFormattingPattern = /(\%[csdo] )|( \%[csdo])/g; /** * Styling log output (`%c`), or string substitutions (`%s`, `%d`, `%o`). * Apply to the first log only. */ export const getLogDatasWithFormatting = (origDatas: any[]) => { // reset RegExp.lastIndex to ensure search starts from beginning logFormattingPattern.lastIndex = 0; if (tool.isString(origDatas[0]) && logFormattingPattern.test(origDatas[0])) { const rawDatas = [...origDatas]; const firstData: string = rawDatas.shift(); // use firstData as display logs const mainLogs = firstData.split(logFormattingPattern).filter((val) => { return val !== undefined && val !== ''; }); // use remain logs as replace item const subLogs = rawDatas; const logDataList: IVConsoleLogData[] = []; let isSetOrigData = false; let origData: any; let style = ''; while (mainLogs.length > 0) { const mainText = mainLogs.shift(); if (/ ?\%c ?/.test(mainText)) { // Use subLogs[0] as CSS style. // If subLogs[0] is not set, use original mainText as origData. // If subLogs[0] is not a string, then leave style empty. if (subLogs.length > 0) { style = subLogs.shift(); if (typeof style !== 'string') { style = ''; } } else { origData = mainText; style = ''; isSetOrigData = true; } } else if (/ ?\%[sd] ?/.test(mainText)) { // Use subLogs[0] as origData (as String). // If subLogs[0] is not set, use original mainText as origData. // If subLogs[0] is not a string, convert it to a string. if (subLogs.length > 0) { origData = tool.isObject(subLogs[0]) ? tool.getObjName(subLogs.shift()) : String(subLogs.shift()); } else { origData = mainText; } isSetOrigData = true; } else if (/ ?\%o ?/.test(mainText)) { // Use subLogs[0] as origData (as original Object value). // If subLogs[0] is not set, use original mainText as origData. origData = subLogs.length > 0 ? subLogs.shift() : mainText; isSetOrigData = true; } else { origData = mainText; isSetOrigData = true; } if (isSetOrigData) { const log: IVConsoleLogData = { origData }; if (style) { log.style = style; } logDataList.push(log); // reset isSetOrigData = false; origData = undefined; style = ''; } } // If there are remaining subLogs, add them to logs. for (let i = 0; i < subLogs.length; i++) { logDataList.push({ origData: subLogs[i], }); } // (window as any)._vcOrigConsole.log('getLogDataWithSubstitutions format', logDataList); return logDataList; } else { const logDataList: IVConsoleLogData[] = []; for (let i = 0; i < origDatas.length; i++) { logDataList.push({ origData: origDatas[i], }); } // (window as any)._vcOrigConsole.log('getLogDataWithSubstitutions normal', logDataList); return logDataList; } }; /** * An empty class for rendering views. */ export class VConsoleUninvocatableObject { } ```
Cherokee Nation of Oklahoma v. Leavitt, 543 U.S. 631 (2005), was a United States Supreme Court case in which the Court held that a contract with the Federal Government to reimburse the tribe for health care costs was binding, despite the failure of Congress to appropriate funds for those costs. Background In 1975, Congress enacted the Indian Self-Determination and Education Assistance Act (ISDEAA) which authorized several Federal agencies to enter into contracts with federally recognized Indian tribes. Pursuant to the ISDEAA, both the Cherokee Nation of Oklahoma and the Shoshone and Paiute tribes of the Duck Valley Indian Reservation (in Idaho and Nevada) entered into contracts with the U.S. Department of Health and Human Services (HHS) to provide health care for tribal members. Under the ISDEAA and the contracts, HHS was to pay the tribes' costs for providing that care. In contracts for fiscal years 1994 through 1997, HHS agreed to pay contract support costs to the tribes, but later refused to do so on the grounds that Congress had not appropriated sufficient funds. Original proceedings In one of the cases, the Cherokee tribe first sought relief in administrative proceedings before the Interior Board of Contract Appeals (Board). The Board found for the tribe, ordering the government to pay the Cherokees $8.5 million in damages. In the second case, the tribes then brought suit in the Federal District Court for the Eastern District of Oklahoma, seeking approximately $6.9 million for breach of contract. The District Court found against the tribe, stating that HHS could not pay (through the Department of the Interior, which managed the funds) if Congress had not appropriated enough money. Appellate proceedings Both cases were appealed – the first by the government to the Federal Circuit Court of Appeals and the second by the tribes to Tenth Circuit Court of Appeals. Both appellate courts affirmed the decision of the lower courts, which had the result of opposite rulings on almost identical facts. The Supreme Court granted certiorari to resolve the conflict. Opinion of the Court Justice Stephen Breyer delivered the opinion of the court, in which six of the other justices joined. Breyer affirmed the Federal Circuit's decision in favor of the Cherokee tribe and reversed the Tenth Circuit decision that was in favor of the government. The government argued that if these were "ordinary procurement contracts, its promises to pay would be legally binding" but that these were "unique, government-to-government" contracts. The government felt that the tribes should only get the pro-ratia portion of the funds that had been appropriated. Breyer noted that Congress was concerned "with [the] Government's past failure adequately to reimburse tribes' indirect administrative costs and a congressional decision to require payment of those costs in the future." Breyer was unpersuaded by the arguments of the government and found in favor of the tribes. Concurring opinion Justice Antonin Scalia concurred in the opinion with the exception of the majority's reliance on a Senate committee report to determine the intent of Congress. Subsequent developments This case has played a major role in promoting tribal self-determination, while holding the Federal government accountable for paying contracts that it made with the various tribes. It is one of the few bright spots for Indian litigation in a period where most of the Supreme Court decisions are going against the tribes. References External links United States Supreme Court cases United States Supreme Court cases of the Rehnquist Court United States court cases involving the Cherokee Nation United States Native American case law Shoshone Paiute 2005 in United States case law Native American history of Oklahoma
Harpulina lapponica is a species of sea snail, a marine gastropod mollusk in the family Volutidae, the volutes. Subspecies Harpulina lapponica lapponica (Linnaeus, 1767) Harpulina lapponica loroisi (Valenciennes, 1863) Description The length of the shell attains 79 mm. Distribution This marine species is native to the Indian Ocean, particularly Sri Lanka. Despite the specific epithet lapponica, it is not native to Lapland. References Bail P. & Poppe G.T. 2001. A conchological iconography: a taxonomic introduction of the recent Volutidae. ConchBooks, Hackenheim. 30 pp, 5 pl. External links Linnaeus, C. (1767). Systema naturae per regna tria naturae: secundum classes, ordines, genera, species, cum characteribus, differentiis, synonymis, locis. Ed. 12. 1., Regnum Animale. 1 & 2. Holmiae, Laurentii Salvii. Holmiae [Stockholm, Laurentii Salvii. pp. 1–532 [1766] pp. 533–1327 1767 ] Sowerby, G. B., I. (1845). Monograph of the genus Voluta. In G. B. Sowerby II (ed.), Thesaurus conchyliorum, or monographs of genera of shells. Vol. 1 (5): 191–220, pls 46-55. London, privately published MNHN, Paris: holotype Volutidae Gastropods described in 1767 Taxa named by Carl Linnaeus
```java /* * * * 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. */ package org.wso2.ballerinalang.compiler.desugar; import io.ballerina.tools.diagnostics.Location; import org.ballerinalang.model.TreeBuilder; import org.ballerinalang.model.elements.PackageID; import org.ballerinalang.model.tree.OperatorKind; import org.ballerinalang.model.types.TypeKind; import org.wso2.ballerinalang.compiler.PackageCache; import org.wso2.ballerinalang.compiler.semantics.analyzer.SymbolResolver; import org.wso2.ballerinalang.compiler.semantics.analyzer.Types; import org.wso2.ballerinalang.compiler.semantics.model.SymbolEnv; import org.wso2.ballerinalang.compiler.semantics.model.SymbolTable; import org.wso2.ballerinalang.compiler.semantics.model.symbols.BInvokableSymbol; import org.wso2.ballerinalang.compiler.semantics.model.symbols.BOperatorSymbol; import org.wso2.ballerinalang.compiler.semantics.model.symbols.BSymbol; import org.wso2.ballerinalang.compiler.semantics.model.symbols.BVarSymbol; import org.wso2.ballerinalang.compiler.semantics.model.types.BInvokableType; import org.wso2.ballerinalang.compiler.semantics.model.types.BType; import org.wso2.ballerinalang.compiler.semantics.model.types.BUnionType; import org.wso2.ballerinalang.compiler.tree.BLangBlockFunctionBody; import org.wso2.ballerinalang.compiler.tree.BLangNode; import org.wso2.ballerinalang.compiler.tree.BLangNodeVisitor; import org.wso2.ballerinalang.compiler.tree.BLangSimpleVariable; import org.wso2.ballerinalang.compiler.tree.expressions.BLangBinaryExpr; import org.wso2.ballerinalang.compiler.tree.expressions.BLangCheckedExpr; import org.wso2.ballerinalang.compiler.tree.expressions.BLangCommitExpr; import org.wso2.ballerinalang.compiler.tree.expressions.BLangExpression; import org.wso2.ballerinalang.compiler.tree.expressions.BLangGroupExpr; import org.wso2.ballerinalang.compiler.tree.expressions.BLangInvocation; import org.wso2.ballerinalang.compiler.tree.expressions.BLangLiteral; import org.wso2.ballerinalang.compiler.tree.expressions.BLangNamedArgsExpression; import org.wso2.ballerinalang.compiler.tree.expressions.BLangSimpleVarRef; import org.wso2.ballerinalang.compiler.tree.expressions.BLangStatementExpression; import org.wso2.ballerinalang.compiler.tree.expressions.BLangTransactionalExpr; import org.wso2.ballerinalang.compiler.tree.expressions.BLangTrapExpr; import org.wso2.ballerinalang.compiler.tree.expressions.BLangTypeTestExpr; import org.wso2.ballerinalang.compiler.tree.statements.BLangAssignment; import org.wso2.ballerinalang.compiler.tree.statements.BLangBlockStmt; import org.wso2.ballerinalang.compiler.tree.statements.BLangExpressionStmt; import org.wso2.ballerinalang.compiler.tree.statements.BLangFail; import org.wso2.ballerinalang.compiler.tree.statements.BLangIf; import org.wso2.ballerinalang.compiler.tree.statements.BLangPanic; import org.wso2.ballerinalang.compiler.tree.statements.BLangRollback; import org.wso2.ballerinalang.compiler.tree.statements.BLangSimpleVariableDef; import org.wso2.ballerinalang.compiler.tree.statements.BLangStatement; import org.wso2.ballerinalang.compiler.tree.statements.BLangTransaction; import org.wso2.ballerinalang.compiler.tree.types.BLangErrorType; import org.wso2.ballerinalang.compiler.tree.types.BLangValueType; import org.wso2.ballerinalang.compiler.util.CompilerContext; import org.wso2.ballerinalang.compiler.util.Name; import org.wso2.ballerinalang.compiler.util.Names; import java.util.ArrayList; import java.util.List; import static io.ballerina.runtime.api.constants.RuntimeConstants.UNDERSCORE; import static org.ballerinalang.model.symbols.SymbolOrigin.VIRTUAL; import static org.wso2.ballerinalang.compiler.desugar.ASTBuilderUtil.createStatementExpression; import static org.wso2.ballerinalang.compiler.util.Names.BEGIN_REMOTE_PARTICIPANT; import static org.wso2.ballerinalang.compiler.util.Names.CLEAN_UP_TRANSACTION; import static org.wso2.ballerinalang.compiler.util.Names.CURRENT_TRANSACTION_INFO; import static org.wso2.ballerinalang.compiler.util.Names.END_TRANSACTION; import static org.wso2.ballerinalang.compiler.util.Names.GET_AND_CLEAR_FAILURE_TRANSACTION; import static org.wso2.ballerinalang.compiler.util.Names.ROLLBACK_TRANSACTION; import static org.wso2.ballerinalang.compiler.util.Names.START_TRANSACTION; import static org.wso2.ballerinalang.compiler.util.Names.START_TRANSACTION_COORDINATOR; import static org.wso2.ballerinalang.compiler.util.Names.TRANSACTION_INFO_RECORD; /** * Class responsible for desugar transaction statements into actual Ballerina code. * * @since 2.0.0-preview1 */ public class TransactionDesugar extends BLangNodeVisitor { private static final CompilerContext.Key<TransactionDesugar> TRANSACTION_DESUGAR_KEY = new CompilerContext.Key<>(); private static final String SHOULD_CLEANUP_SYMBOL = "$shouldCleanUp$"; private final Desugar desugar; private final SymbolTable symTable; private final SymbolResolver symResolver; private final Names names; private final PackageCache packageCache; private BSymbol transactionError; private BLangExpression retryStmt; private SymbolEnv env; private BLangBlockStmt result; private BLangSimpleVarRef prevAttemptInfoRef; private BLangSimpleVarRef shouldCleanUpVariableRef; private BLangExpression transactionID; private String uniqueId; private BLangLiteral trxBlockId; private boolean transactionInternalModuleIncluded = false; private boolean trxCoordinatorServiceStarted = false; private int trxResourceCount; private final Types types; private TransactionDesugar(CompilerContext context) { context.put(TRANSACTION_DESUGAR_KEY, this); this.symTable = SymbolTable.getInstance(context); this.symResolver = SymbolResolver.getInstance(context); this.names = Names.getInstance(context); this.desugar = Desugar.getInstance(context); this.packageCache = PackageCache.getInstance(context); this.types = Types.getInstance(context); // if (this.symTable.internalTransactionModuleSymbol == null) { // this.symTable.internalTransactionModuleSymbol = // pkgLoader.loadPackageSymbol(PackageID.TRANSACTION_INTERNAL, null, null); // } } public static TransactionDesugar getInstance(CompilerContext context) { TransactionDesugar desugar = context.get(TRANSACTION_DESUGAR_KEY); if (desugar == null) { desugar = new TransactionDesugar(context); } return desugar; } public BLangBlockStmt rewrite (BLangNode node, BLangLiteral trxBlockIdDef, SymbolEnv env, String uniqueId) { BLangLiteral currentTrxBlockIdDef = this.trxBlockId; this.trxBlockId = trxBlockIdDef; String id = this.uniqueId; this.uniqueId = uniqueId; BLangExpression trxId = this.transactionID; BLangSimpleVarRef attemptVarRef = this.prevAttemptInfoRef; BLangSimpleVarRef prevShouldCleanUp = shouldCleanUpVariableRef; SymbolEnv symbolEnv = this.env; this.env = env; node.accept(this); this.uniqueId = id; this.transactionID = trxId; this.prevAttemptInfoRef = attemptVarRef; this.shouldCleanUpVariableRef = prevShouldCleanUp; this.env = symbolEnv; this.trxBlockId = currentTrxBlockIdDef; return result; } @Override public void visit(BLangTransaction transactionNode) { result = desugarTransactionBody(transactionNode, env, transactionNode.pos); } // Transaction statement desugar implementation code. private BLangBlockStmt desugarTransactionBody(BLangTransaction transactionNode, SymbolEnv env, Location pos) { BLangBlockStmt transactionBlockStmt = ASTBuilderUtil.createBlockStmt(pos); transactionBlockStmt.scope = transactionNode.transactionBody.scope; //boolean $shouldCleanUp$ = false; BVarSymbol shouldCleanUpSymbol = new BVarSymbol(0, new Name(SHOULD_CLEANUP_SYMBOL + UNDERSCORE + uniqueId), env.scope.owner.pkgID, symTable.booleanType, env.scope.owner, pos, VIRTUAL); BLangSimpleVariable shouldCleanUpVariable = ASTBuilderUtil.createVariable(pos, SHOULD_CLEANUP_SYMBOL + UNDERSCORE + uniqueId, symTable.booleanType, ASTBuilderUtil.createLiteral(pos, symTable.booleanType, false), shouldCleanUpSymbol); shouldCleanUpVariable.symbol.closure = true; BLangSimpleVariableDef shouldCleanUpVariableDef = ASTBuilderUtil.createVariableDef(pos, shouldCleanUpVariable); transactionBlockStmt.stmts.add(shouldCleanUpVariableDef); shouldCleanUpVariableRef = ASTBuilderUtil.createVariableRef(pos, shouldCleanUpVariable.symbol); if (transactionNode.prevAttemptInfo == null) { //transactions:Info? prevAttempt = (); BLangSimpleVariableDef prevAttemptVarDef = createPrevAttemptInfoVarDef(env, pos); transactionBlockStmt.stmts.add(prevAttemptVarDef); transactionBlockStmt.scope.define(prevAttemptVarDef.var.symbol.name, prevAttemptVarDef.var.symbol); this.prevAttemptInfoRef = ASTBuilderUtil.createVariableRef(pos, prevAttemptVarDef.var.symbol); } else { this.prevAttemptInfoRef = (BLangSimpleVarRef) transactionNode.prevAttemptInfo; } // Invoke startTransaction method and get a transaction id //string transactionId = ""; BType transactionIDType = symTable.stringType; BVarSymbol transactionIDVarSymbol = new BVarSymbol(0, new Name("transactionId" + uniqueId), env.scope.owner.pkgID, transactionIDType, env.scope.owner, pos, VIRTUAL); BLangSimpleVariable transactionIDVariable = ASTBuilderUtil.createVariable(pos, "transactionId" + uniqueId, transactionIDType, ASTBuilderUtil.createLiteral(pos, symTable.stringType, ""), transactionIDVarSymbol); BLangSimpleVariableDef transactionIDVariableDef = ASTBuilderUtil.createVariableDef(pos, transactionIDVariable); transactionBlockStmt.stmts.add(transactionIDVariableDef); this.transactionID = ASTBuilderUtil.createVariableRef(pos, transactionIDVariable.symbol); transactionIDVariable.symbol.closure = true; transactionBlockStmt.scope.define(transactionIDVarSymbol.name, transactionIDVarSymbol); transactionBlockStmt.scope.define(shouldCleanUpVariable.symbol.name, shouldCleanUpVariable.symbol); BType transactionReturnType = symTable.errorOrNilType; // wraps content within transaction body inside a statement expression BLangLiteral nilLiteral = ASTBuilderUtil.createLiteral(pos, symTable.nilType, Names.NIL_VALUE); BLangStatementExpression statementExpression = createStatementExpression(transactionNode.transactionBody, nilLiteral); statementExpression.setBType(symTable.nilType); BLangTrapExpr trapExpr = (BLangTrapExpr) TreeBuilder.createTrapExpressionNode(); trapExpr.setBType(transactionReturnType); trapExpr.expr = statementExpression; //error? $trapResult = trap <Transaction Body> BVarSymbol nillableErrorVarSymbol = new BVarSymbol(0, Names.fromString("$trapResult"), this.env.scope.owner.pkgID, transactionReturnType, this.env.scope.owner, pos, VIRTUAL); BLangSimpleVariable trapResultVariable = ASTBuilderUtil.createVariable(pos, "$trapResult", transactionReturnType, trapExpr, nillableErrorVarSymbol); BLangSimpleVariableDef trapResultVariableDef = ASTBuilderUtil.createVariableDef(pos, trapResultVariable); transactionBlockStmt.addStatement(trapResultVariableDef); BLangSimpleVarRef trapResultRef = ASTBuilderUtil.createVariableRef(pos, nillableErrorVarSymbol); BLangFail failStmt = (BLangFail) TreeBuilder.createFailNode(); failStmt.pos = pos; failStmt.expr = types.addConversionExprIfRequired(trapResultRef, symTable.errorType); BLangPanic panicNode = (BLangPanic) TreeBuilder.createPanicNode(); panicNode.pos = pos; panicNode.expr = failStmt.expr; failStmt.exprStmt = panicNode; BLangBlockStmt ifErrorBlock = ASTBuilderUtil.createBlockStmt(pos); ifErrorBlock.addStatement(failStmt); BLangTypeTestExpr isErrorTest = ASTBuilderUtil.createTypeTestExpr(pos, trapResultRef, desugar.getErrorTypeNode()); isErrorTest.setBType(symTable.booleanType); //if($trapResult$ is error) { // fail $trapResult$; // } BLangIf ifTrapResIsError = ASTBuilderUtil.createIfElseStmt(pos, isErrorTest, ifErrorBlock, null); transactionBlockStmt.addStatement(ifTrapResIsError); // transactionId = startTransaction(1, prevAttempt) BLangInvocation startTransactionInvocation = createStartTransactionInvocation(pos, ASTBuilderUtil.createLiteral(pos, symTable.stringType, uniqueId), prevAttemptInfoRef); BLangAssignment startTrxAssignment = ASTBuilderUtil.createAssignmentStmt(pos, ASTBuilderUtil.createVariableRef(pos, transactionIDVarSymbol), startTransactionInvocation); //prevAttempt = info(); BLangAssignment infoAssignment = createPrevAttemptInfoInvocation(pos); transactionNode.transactionBody.stmts.add(0, startTrxAssignment); transactionNode.transactionBody.stmts.add(1, infoAssignment); // if ($shouldCleanUp$) { // cleanupTransactionContext(); // } BLangIf cleanValidationIf = ASTBuilderUtil.createIfStmt(pos, transactionBlockStmt); BLangGroupExpr cleanValidationGroupExpr = new BLangGroupExpr(); cleanValidationGroupExpr.expression = ASTBuilderUtil.createVariableRef(pos, shouldCleanUpVariable.symbol); cleanValidationIf.expr = cleanValidationGroupExpr; cleanValidationIf.body = ASTBuilderUtil.createBlockStmt(pos); BLangExpressionStmt stmt = ASTBuilderUtil.createExpressionStmt(pos, cleanValidationIf.body); stmt.expr = createCleanupTrxStmt(pos, this.trxBlockId); // at this point ; // boolean $shouldCleanUp$ = false; // transactions:Info? prevAttempt = (); // string transactionId = ""; // error? $trapResult = trap { // transactionId = startTransaction(1, prevAttempt) // prevAttempt = info(); // // <Transaction Body> // } // if($trapResult$ is error) { // panic $trapResult$; // } // if ($shouldCleanUp$) { // cleanupTransactionContext(1); // } return desugar.rewrite(transactionBlockStmt, env); } private BLangAssignment createPrevAttemptInfoInvocation(Location pos) { BInvokableSymbol transactionInfoInvokableSymbol = (BInvokableSymbol) getTransactionLibInvokableSymbol(CURRENT_TRANSACTION_INFO); BLangInvocation infoInvocation = ASTBuilderUtil.createInvocationExprForMethod(pos, transactionInfoInvokableSymbol, new ArrayList<>(), symResolver); infoInvocation.argExprs = infoInvocation.requiredArgs; return ASTBuilderUtil.createAssignmentStmt(pos, prevAttemptInfoRef, infoInvocation); } private BLangInvocation createStartTransactionInvocation(Location location, BLangLiteral transactionBlockIDLiteral, BLangSimpleVarRef prevAttempt) { BInvokableSymbol startTransactionInvokableSymbol = (BInvokableSymbol) getInternalTransactionModuleInvokableSymbol(START_TRANSACTION); // Include transaction-internal module as an import if not included if (!transactionInternalModuleIncluded) { desugar.addTransactionInternalModuleImport(); transactionInternalModuleIncluded = true; } List<BLangExpression> args = new ArrayList<>(); args.add(transactionBlockIDLiteral); args.add(prevAttempt); BLangInvocation startTransactionInvocation = ASTBuilderUtil. createInvocationExprForMethod(location, startTransactionInvokableSymbol, args, symResolver); startTransactionInvocation.argExprs = args; return startTransactionInvocation; } public BLangInvocation createBeginParticipantInvocation(Location pos) { BInvokableSymbol beginParticipantInvokableSymbol = (BInvokableSymbol) getInternalTransactionModuleInvokableSymbol(BEGIN_REMOTE_PARTICIPANT); // Include transaction-internal module as an import if not included if (!transactionInternalModuleIncluded) { desugar.addTransactionInternalModuleImport(); transactionInternalModuleIncluded = true; } List<BLangExpression> args = new ArrayList<>(); args.add(ASTBuilderUtil.createLiteral(pos, symTable.stringType, String.valueOf(++trxResourceCount))); BLangInvocation startTransactionInvocation = ASTBuilderUtil. createInvocationExprForMethod(pos, beginParticipantInvokableSymbol, args, symResolver); startTransactionInvocation.argExprs = args; return startTransactionInvocation; } private BLangInvocation createStartTransactionCoordinatorInvocation(Location pos) { BInvokableSymbol startTransactionInvokableSymbol = (BInvokableSymbol) getInternalTransactionModuleInvokableSymbol(START_TRANSACTION_COORDINATOR); // Include transaction-internal module as an import if not included if (!transactionInternalModuleIncluded) { desugar.addTransactionInternalModuleImport(); transactionInternalModuleIncluded = true; } List<BLangExpression> args = new ArrayList<>(); BLangInvocation startTransactionCoordinatorInvocation = ASTBuilderUtil. createInvocationExprForMethod(pos, startTransactionInvokableSymbol, args, symResolver); startTransactionCoordinatorInvocation.argExprs = args; return startTransactionCoordinatorInvocation; } private BLangSimpleVariableDef createVarDefForCoordinator(SymbolEnv env, Location pos) { BLangExpression invocation = createStartTransactionCoordinatorInvocation(pos); BVarSymbol outputVarSymbol = new BVarSymbol(0, new Name("$trxCoordinatorErr$"), env.scope.owner.pkgID, symTable.errorOrNilType, env.scope.owner, pos, VIRTUAL); BLangSimpleVariable outputVariable = ASTBuilderUtil.createVariable(pos, "$trxCoordinatorErr$", symTable.errorOrNilType, invocation, outputVarSymbol); return ASTBuilderUtil.createVariableDef(pos, outputVariable); } public void startTransactionCoordinatorOnce(SymbolEnv env, Location pos) { if (!trxCoordinatorServiceStarted) { BLangBlockFunctionBody funcBody = (BLangBlockFunctionBody) env.enclPkg.initFunction.body; funcBody.stmts.add(0, createVarDefForCoordinator(env, pos)); trxCoordinatorServiceStarted = true; } } BLangSimpleVariableDef createPrevAttemptInfoVarDef(SymbolEnv env, Location pos) { BLangLiteral nilLiteral = ASTBuilderUtil.createLiteral(pos, symTable.nilType, Names.NIL_VALUE); BLangSimpleVariable prevAttemptVariable = createPrevAttemptVariable(env, pos); prevAttemptVariable.expr = nilLiteral; return ASTBuilderUtil.createVariableDef(pos, prevAttemptVariable); } private BLangSimpleVariable createPrevAttemptVariable(SymbolEnv env, Location pos) { // transactions:Info? prevAttempt = (); BSymbol infoRecordSymbol = symResolver. lookupSymbolInMainSpace(symTable.pkgEnvMap.get(symTable.langTransactionModuleSymbol), TRANSACTION_INFO_RECORD); BType infoRecordType = BUnionType.create(null, infoRecordSymbol.type, symTable.nilType); BVarSymbol prevAttemptVarSymbol = new BVarSymbol(0, new Name("prevAttempt" + uniqueId), env.scope.owner.pkgID, infoRecordType, env.scope.owner, pos, VIRTUAL); prevAttemptVarSymbol.closure = true; return ASTBuilderUtil.createVariable(pos, "prevAttempt" + uniqueId, infoRecordType, null, prevAttemptVarSymbol); } BLangBlockStmt desugar(BLangRollback rollbackNode, BLangLiteral transactionBlockID, BLangSimpleVarRef shouldRetryRef) { // Rollback desugar implementation BLangBlockStmt rollbackBlockStmt = ASTBuilderUtil.createBlockStmt(rollbackNode.pos); BLangStatementExpression rollbackExpr = invokeRollbackFunc(rollbackNode.pos, rollbackNode.expr, transactionBlockID, shouldRetryRef); BLangExpressionStmt rollbackStmt = ASTBuilderUtil.createExpressionStmt(rollbackNode.pos, rollbackBlockStmt); rollbackStmt.expr = rollbackExpr; return rollbackBlockStmt; } // commit or rollback was not executed and fail(e) or panic(e) returned, so rollback // if (($trxError$ is error) && !($trxError$ is TransactionError) && transactional) { // $shouldCleanUp$ = true; // check panic rollback $trxError$; // } void createRollbackIfFailed(Location pos, BLangBlockStmt onFailBodyBlock, BSymbol trxFuncResultSymbol, BLangLiteral trxBlockId, BLangSimpleVarRef shouldRetryRef) { BLangIf rollbackCheck = (BLangIf) TreeBuilder.createIfElseStatementNode(); rollbackCheck.pos = pos; int stmtIndex = onFailBodyBlock.stmts.isEmpty() ? 0 : 1; onFailBodyBlock.stmts.add(stmtIndex, rollbackCheck); BSymbol transactionErrorSymbol = symTable.langTransactionModuleSymbol .scope.lookup(Names.fromString("Error")).symbol; BType errorType = transactionErrorSymbol.type; BLangErrorType trxErrorTypeNode = (BLangErrorType) TreeBuilder.createErrorTypeNode(); trxErrorTypeNode.setBType(errorType); BLangSimpleVarRef trxResultRef = ASTBuilderUtil.createVariableRef(pos, trxFuncResultSymbol); // $trxError$ is TransactionError BLangTypeTestExpr testExpr = ASTBuilderUtil.createTypeTestExpr(pos, trxResultRef, trxErrorTypeNode); testExpr.setBType(symTable.booleanType); BLangGroupExpr transactionErrorCheckGroupExpr = new BLangGroupExpr(); transactionErrorCheckGroupExpr.setBType(symTable.booleanType); // !($trxError$ is TransactionError) transactionErrorCheckGroupExpr.expression = desugar.createNotBinaryExpression(pos, testExpr); // ($trxError$ is error) BLangTypeTestExpr errorCheck = desugar.createTypeCheckExpr(pos, trxResultRef, desugar.getErrorOrNillTypeNode()); // ($trxError$ is error) && !($trxError$ is TransactionError) BLangBinaryExpr isErrorCheck = ASTBuilderUtil.createBinaryExpr(pos, errorCheck, transactionErrorCheckGroupExpr, symTable.booleanType, OperatorKind.AND, null); // transactional BLangTransactionalExpr isTransactionalCheck = TreeBuilder.createTransactionalExpressionNode(); isTransactionalCheck.setBType(symTable.booleanType); isTransactionalCheck.pos = pos; // if(($trxError$ is error) && !($trxError$ is TransactionError) && transactional) rollbackCheck.expr = ASTBuilderUtil.createBinaryExpr(pos, isErrorCheck, isTransactionalCheck, symTable.booleanType, OperatorKind.AND, null); rollbackCheck.body = ASTBuilderUtil.createBlockStmt(pos); // rollbackTransaction(transactionBlockID, retryManager); BLangStatementExpression rollbackInvocation = invokeRollbackFunc(pos, types.addConversionExprIfRequired(trxResultRef, symTable.errorOrNilType), trxBlockId, shouldRetryRef); BLangCheckedExpr checkedExpr = ASTBuilderUtil.createCheckPanickedExpr(pos, rollbackInvocation, symTable.nilType); checkedExpr.equivalentErrorTypeList.add(symTable.errorType); BLangExpressionStmt transactionExprStmt = (BLangExpressionStmt) TreeBuilder.createExpressionStatementNode(); transactionExprStmt.pos = pos; transactionExprStmt.expr = checkedExpr; transactionExprStmt.setBType(symTable.nilType); rollbackCheck.body.stmts.add(transactionExprStmt); // at this point; // if (($trxError$ is error) && !($trxError$ is TransactionError) && transactional) { // $shouldCleanUp$ = true; // check panic rollback $trxError$; // } } private BLangInvocation createCleanupTrxStmt(Location pos, BLangLiteral trxBlockId) { List<BLangExpression> args; BInvokableSymbol cleanupTrxInvokableSymbol = (BInvokableSymbol) getInternalTransactionModuleInvokableSymbol(CLEAN_UP_TRANSACTION); args = new ArrayList<>(); args.add(trxBlockId); BLangInvocation cleanupTrxInvocation = ASTBuilderUtil. createInvocationExprForMethod(pos, cleanupTrxInvokableSymbol, args, symResolver); cleanupTrxInvocation.argExprs = args; return cleanupTrxInvocation; } BLangStatementExpression invokeRollbackFunc(Location pos, BLangExpression rollbackExpr, BLangLiteral trxBlockId, BLangSimpleVarRef shouldRetryRef) { // Rollback desugar implementation BLangBlockStmt rollbackBlockStmt = ASTBuilderUtil.createBlockStmt(pos); // rollbackTransaction(transactionBlockID); BInvokableSymbol rollbackTransactionInvokableSymbol = (BInvokableSymbol) getInternalTransactionModuleInvokableSymbol(ROLLBACK_TRANSACTION); List<BLangExpression> args = new ArrayList<>(); args.add(trxBlockId); if (shouldRetryRef != null) { BLangNamedArgsExpression shouldRetry = new BLangNamedArgsExpression(); shouldRetry.name = ASTBuilderUtil.createIdentifier(pos, "shouldRetry"); shouldRetry.expr = shouldRetryRef; args.add(shouldRetry); } if (rollbackExpr != null) { BLangNamedArgsExpression rollbackErr = new BLangNamedArgsExpression(); rollbackErr.name = ASTBuilderUtil.createIdentifier(pos, "err"); rollbackErr.expr = rollbackExpr; args.add(rollbackErr); } BLangInvocation rollbackTransactionInvocation = ASTBuilderUtil. createInvocationExprForMethod(pos, rollbackTransactionInvokableSymbol, args, symResolver); rollbackTransactionInvocation.argExprs = args; BLangExpressionStmt rollbackStmt = ASTBuilderUtil.createExpressionStmt(pos, rollbackBlockStmt); rollbackStmt.expr = rollbackTransactionInvocation; BLangExpressionStmt cleanUpTrx = ASTBuilderUtil.createExpressionStmt(pos, rollbackBlockStmt); cleanUpTrx.expr = createCleanupTrxStmt(pos, trxBlockId); BLangStatementExpression rollbackStmtExpr = createStatementExpression(rollbackBlockStmt, ASTBuilderUtil.createLiteral(pos, symTable.nilType, Names.NIL_VALUE)); rollbackStmtExpr.setBType(symTable.nilType); //at this point, // // rollbackTransaction(transactionBlockID); // $shouldCleanUp$ = true; return rollbackStmtExpr; } BLangStatementExpression desugar(BLangCommitExpr commitExpr, SymbolEnv env) { Location pos = commitExpr.pos; BLangBlockStmt commitBlockStatement = ASTBuilderUtil.createBlockStmt(pos); // Create temp output variable // error? $outputVar$ = (); BLangSimpleVariableDef outputVariableDef = createCommitResultVarDef(env, pos); BLangSimpleVarRef outputVarRef = ASTBuilderUtil.createVariableRef(pos, outputVariableDef.var.symbol); commitBlockStatement.addStatement(outputVariableDef); // Clear failures // boolean isFailed = getAndClearFailure(); BInvokableSymbol transactionCleanerInvokableSymbol = (BInvokableSymbol) getInternalTransactionModuleInvokableSymbol(GET_AND_CLEAR_FAILURE_TRANSACTION); BLangInvocation transactionCleanerInvocation = ASTBuilderUtil. createInvocationExprForMethod(pos, transactionCleanerInvokableSymbol, new ArrayList<>(), symResolver); transactionCleanerInvocation.argExprs = new ArrayList<>(); BVarSymbol isTransactionFailedVarSymbol = new BVarSymbol(0, new Name("isFailed"), env.scope.owner.pkgID, symTable.booleanType, env.scope.owner, pos, VIRTUAL); BLangSimpleVariable isTransactionFailedVariable = ASTBuilderUtil.createVariable(pos, "isFailed", symTable.booleanType, transactionCleanerInvocation, isTransactionFailedVarSymbol); BLangSimpleVariableDef isTransactionFailedVariableDef = ASTBuilderUtil.createVariableDef(pos, isTransactionFailedVariable); commitBlockStatement.addStatement(isTransactionFailedVariableDef); BLangBlockStmt failureHandlerBlockStatement = ASTBuilderUtil.createBlockStmt(pos); // Commit expr desugar implementation //string|error commitResult = endTransaction(transactionID, transactionBlockID); BInvokableSymbol commitTransactionInvokableSymbol = (BInvokableSymbol) getInternalTransactionModuleInvokableSymbol(END_TRANSACTION); List<BLangExpression> args = new ArrayList<>(); args.add(transactionID); args.add(trxBlockId); BLangInvocation commitTransactionInvocation = ASTBuilderUtil. createInvocationExprForMethod(pos, commitTransactionInvokableSymbol, args, symResolver); commitTransactionInvocation.argExprs = args; BType commitReturnType = BUnionType.create(null, symTable.stringType, symTable.errorType); BVarSymbol commitTransactionVarSymbol = new BVarSymbol(0, new Name("commitResult"), env.scope.owner.pkgID, commitReturnType, env.scope.owner, pos, VIRTUAL); BLangSimpleVariable commitResultVariable = ASTBuilderUtil.createVariable(pos, "commitResult", commitReturnType, commitTransactionInvocation, commitTransactionVarSymbol); BLangSimpleVariableDef commitResultVariableDef = ASTBuilderUtil.createVariableDef(pos, commitResultVariable); BLangSimpleVarRef commitResultVarRef = ASTBuilderUtil.createVariableRef(pos, commitResultVariable.symbol); failureHandlerBlockStatement.addStatement(commitResultVariableDef); // Successful commit operation // if(commitResult is string) { // $shouldCleanUp$ = true; // } else { // $outputVar$ = commitResult; // } BLangIf commitResultValidationIf = ASTBuilderUtil.createIfStmt(pos, failureHandlerBlockStatement); BLangGroupExpr commitResultValidationGroupExpr = new BLangGroupExpr(); commitResultValidationGroupExpr.setBType(symTable.booleanType); BLangValueType stringType = (BLangValueType) TreeBuilder.createValueTypeNode(); stringType.setBType(symTable.stringType); stringType.typeKind = TypeKind.STRING; commitResultValidationGroupExpr.expression = ASTBuilderUtil.createTypeTestExpr(pos, commitResultVarRef, stringType); commitResultValidationIf.expr = commitResultValidationGroupExpr; commitResultValidationIf.body = ASTBuilderUtil.createBlockStmt(pos); BLangStatement shouldCleanUpStmt = ASTBuilderUtil.createAssignmentStmt(pos, shouldCleanUpVariableRef, ASTBuilderUtil.createLiteral(pos, symTable.booleanType, true)); commitResultValidationIf.body.addStatement(shouldCleanUpStmt); commitResultValidationIf.elseStmt = ASTBuilderUtil.createAssignmentStmt(pos, outputVarRef, commitResultVarRef); // Create failure validation //if(!isFailed) { // string|error commitResult = endTransaction(transactionID, transactionBlockID); // if(commitResult is string) { // $shouldCleanUp$ = true; // } else { // $outputVar$ = commitResult; // } //} BLangIf failureValidationIf = ASTBuilderUtil.createIfStmt(pos, commitBlockStatement); BLangGroupExpr failureValidationGroupExpr = new BLangGroupExpr(); failureValidationGroupExpr.setBType(symTable.booleanType); BLangSimpleVarRef failureValidationExprVarRef = ASTBuilderUtil.createVariableRef(pos, isTransactionFailedVariable.symbol); List<BType> paramTypes = new ArrayList<>(); paramTypes.add(symTable.booleanType); BInvokableType type = new BInvokableType(paramTypes, symTable.booleanType, null); BOperatorSymbol notOperatorSymbol = new BOperatorSymbol( Names.fromString(OperatorKind.NOT.value()), symTable.rootPkgSymbol.pkgID, type, symTable.rootPkgSymbol, symTable.builtinPos, VIRTUAL); failureValidationGroupExpr.expression = ASTBuilderUtil.createUnaryExpr(pos, failureValidationExprVarRef, symTable.booleanType, OperatorKind.NOT, notOperatorSymbol); failureValidationIf.expr = failureValidationGroupExpr; failureValidationIf.body = failureHandlerBlockStatement; // at this point; // // error? $outputVar$ = (); // boolean isFailed = getAndClearFailure(); // if(!isFailed) { // string|error commitResult = endTransaction(transactionID, transactionBlockID); // if(commitResult is string) { // $shouldCleanUp$ = true; // } else { // $outputVar$ = commitResult; // } // } BLangStatementExpression stmtExpr = createStatementExpression(commitBlockStatement, outputVarRef); stmtExpr.setBType(symTable.errorOrNilType); return stmtExpr; } private BLangSimpleVariableDef createCommitResultVarDef(SymbolEnv env, Location pos) { BLangExpression nilLiteral = ASTBuilderUtil.createLiteral(pos, symTable.nilType, Names.NIL_VALUE); BVarSymbol outputVarSymbol = new BVarSymbol(0, new Name("$outputVar$"), env.scope.owner.pkgID, symTable.errorOrNilType, env.scope.owner, pos, VIRTUAL); BLangSimpleVariable outputVariable = ASTBuilderUtil.createVariable(pos, "$outputVar$", symTable.errorOrNilType, nilLiteral, outputVarSymbol); return ASTBuilderUtil.createVariableDef(pos, outputVariable); } /** * Load and return symbol for given name in transaction lib. * * @param name of the symbol. * @return symbol for the function. */ public BSymbol getTransactionLibInvokableSymbol(Name name) { return symTable.langTransactionModuleSymbol.scope.lookup(name).symbol; } /** * Load and return symbol for given name in transaction internal module. * * @param name of the symbol. * @return symbol for the function. */ public BSymbol getInternalTransactionModuleInvokableSymbol(Name name) { if (symTable.internalTransactionModuleSymbol == null) { symTable.internalTransactionModuleSymbol = packageCache.getSymbol(PackageID.TRANSACTION_INTERNAL); } return symTable.internalTransactionModuleSymbol.scope.lookup(name).symbol; } } ```
```python class InvalidCacheType(Exception): pass ```
"Jamie Foyers" is a song by the folk singer and songwriter Ewan MacColl. In The Essential Ewan MacColl Songbook, Peggy Seeger wrote that the song was written in the period 1937-1939 but could not give an exact year (although it is difficult to see how it could have been written before the First Battle of Gandesa in April 1938). The song was not copyrighted until 1963 by Stormking Music. It tells the story of a shipyard worker from the Clyde who goes to fight with the International Brigade in the Spanish Civil War. He fights at the Battle of Belchite, and is killed at Gandesa (it is not clear if this is at the first or second battles, the International Brigade played an important role in both). MacColl adapted it from a traditional Scottish song about a soldier who fought in the Peninsular War, only retaining the first verse. By some accounts, Jamie Foyers was an actual person who was killed at Burgos in 1812, but by other accounts it was originally a generic Perthshire term for a soldier. There is a last verse in some recordings of the song that does not appear in the version in The Essential Ewan MacColl Songbook. He lies by the Ebro in far away Spain, He died so that freedom and justice might reign; Remember young Foyers and others of worth And don't let one fascist be left on this earth. See also Tommy Atkins References External links lyrics of McColl's version lyrics of earlier version Ballads Scottish songs 20th century in Scotland Songs of the Spanish Civil War Songs written by Ewan MacColl Works about the Napoleonic Wars 1930s songs Year of song missing
Arthur Edward Spence Hill (1 August 1922 – 22 October 2006) was a Canadian actor. He was known in British and American theatre, film and television. Early life Arthur Hill was born Arthur Edward Spence Hill in Melfort, Saskatchewan, on 1 August 1922, the son of Edith Georgina (Spence) and Olin Drake Hill, a lawyer. As part of the Royal Canadian Air Force during World War II, Hill served in the mechanic corps. He attended the University of British Columbia, studying law. He joined the RCAF while in UBC pre-law. After the war, finishing the university degree, he was lured to the stage. He studied acting in Seattle, Washington. Career He appeared in Colonel March of Scotland Yard episode 17 1956 as an accused murderer. It was an English/American production starring Boris Karloff. Hill's Broadway theatre debut was in the 1957 revival of Thornton Wilder's The Matchmaker, playing Cornelius Hackl. In 1963, the Tonys awarded Hill Best Dramatic Actor for his portrayal of George in the original Broadway production of Who's Afraid of Virginia Woolf? Other Broadway credits include: Ben Gant in the original production of Look Homeward, Angel (1957); All the Way Home (1960); Something More! (1964); and More Stately Mansions (1967). In the film The Andromeda Strain (1971), Hill played Dr. Jeremy Stone. Other film work: The Ugly American (1963); Harper (1966); Petulia (1968); The Chairman (1969); The Killer Elite (1975); Futureworld (1976); A Bridge Too Far (1977) (uncredited); and narration of Something Wicked This Way Comes (1983). Hill's television role portraying lawyer Owen Marshall in the 1971–74 TV series Owen Marshall, Counselor at Law had high status at the time. He appeared on many other television shows, including The Reporter, a 1964 drama starring Harry Guardino. Grandpa Lansford Ingalls on Little House on the Prairie (1976) was another of Hill's portrayals. Other television shows were: Mission Impossible, episode "The Carriers" (S1:E10) 1966; Voyage to the Bottom of the Sea, episode "The Monster from the Inferno" 1966; The F.B.I., (S1:E23) "Flight to Harbin" 1966; The Invaders, episode "The Leeches" 1967; Murder, She Wrote, the pilot episode, 1984, reprising the role in 1990; and Columbo, episode "Agenda for Murder", portraying a governor, was his final role in 1990. Personal life Hill married Peggy Hassard in September 1942. Their children were Douglas and Jennifer. The family moved to Great Britain in 1948. In London, he was at the BBC, both radio and television. They moved to New York City in 1958, then to Los Angeles in 1968. He retired in 1990. After the death of his wife in 1998, he married Anne-Sophie Taraba in 2001. Death Hill died on 22 October 2006, in Pacific Palisades, California. He lived in a nursing home, and was 84 years old. His passing was attributed to Alzheimer's disease. Selected filmography I Was a Male War Bride (1949) as Dependents Clearing Officer (uncredited) Miss Pilgrim's Progress (1949) as American Vice-Consul (uncredited) The Body Said No! (1950) as Robin King Mister Drake's Duck (1951) as American Vice Consul Scarlet Thread (1951) as Shaw Salute the Toff (1952) as Ted Harrison You're Only Young Twice (1952) as Mystery Man (uncredited) Penny Princess (1952) as Representative of Johnson K. Johnson (uncredited) Paul Temple Returns (1952) as Cranmer Guest A Day to Remember (1953) as Al Life with the Lyons (1954) as Slim Cassidy The Crowded Day (1954) as Alice's Escort Raising a Riot (1955) as American Sergeant (uncredited) The Deep Blue Sea (1955) as Jackie Jackson [[Colonel March of Scotland Yard (S01:E17)|The Silver Curtain]] (1955) as Jerry Winton The Young Doctors (1961) as Tomaselli The Ugly American (1963) as Grainger In the Cool of the Day (1963) as Sam Bonner Moment to Moment (1965) as Neil Stanton Harper (1966) as Albert Graves Petulia (1968) as Barney The Chairman (1969) as Shelby Don't Let the Angels Fall (1969) as Robert Rabbit, Run (1970) as Rev. Jack Eccles The Pursuit of Happiness (1971) as John Popper The Andromeda Strain (1971) as Dr. Jeremy Stone The Killer Elite (1975) as Cap Collis Futureworld (1976) as Duffy A Bridge Too Far (1977) as U.S. Medical Colonel (uncredited) The Champ (1979) as Mike A Little Romance (1979) as Richard King Butch and Sundance: The Early Days (1979) as Governor (uncredited) The Ordeal of Dr. Mudd (1980) as Thomas Ewing Jr. Revenge of the Stepford Wives (1980) as Dale 'Diz' Corbett Dirty Tricks (1981) as Professor Prosser The Amateur (1981) as Brewer Making Love (1982) as Henry Something Wicked This Way Comes (1983) as Narrator (voice) Murder in Space (1985) as Vice President One Magic Christmas (1985) as Caleb Grainger A Fine Mess'' (1986) (uncredited) References External links 1922 births 2006 deaths Canadian male film actors Canadian male stage actors Canadian male television actors Deaths from Alzheimer's disease Deaths from dementia in California Tony Award winners People from Melfort, Saskatchewan Male actors from Saskatchewan University of British Columbia alumni Canadian expatriate male actors in the United States Royal Canadian Air Force personnel of World War II Royal Canadian Air Force airmen
```c++ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include "libplatform/libplatform.h" #include "v8.h" using namespace v8; int age = 41; void doit(const FunctionCallbackInfo<Value>& args) { String::Utf8Value str(args.GetIsolate(), args[0]); printf("doit argument = %s...\n", *str); args.GetReturnValue().Set(String::NewFromUtf8(args.GetIsolate(), "doit...done", NewStringType::kNormal).ToLocalChecked()); } void age_getter(Local<String> property, const PropertyCallbackInfo<Value>& info) { printf("age_getter...\n"); info.GetReturnValue().Set(age); } void age_setter(Local<String> property, Local<Value> value, const PropertyCallbackInfo<void>& info) { printf("age_setter...\n"); age = value->Int32Value(info.GetIsolate()->GetCurrentContext()).FromJust(); } void property_listener(Local<String> name, const PropertyCallbackInfo<Value>& info) { String::Utf8Value utf8_value(info.GetIsolate(), name); std::string key = std::string(*utf8_value); printf("ageListener called for nam %s.\n", key.c_str()); } int main(int argc, char* argv[]) { std::unique_ptr<Platform> platform = platform::NewDefaultPlatform(); // Just sets the platform created above. V8::InitializePlatform(platform.get()); V8::Initialize(); Isolate::CreateParams create_params; create_params.array_buffer_allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator(); // An Isolate is an independant copy of the V8 runtime which includes its own heap. // Two different Isolates can run in parallel and can be seen as entierly different // sandboxed instances of a V8 runtime. Isolate* isolate = Isolate::New(create_params); { // Will set the scope using Isolate::Scope whose constructor will call // isolate->Enter() and its destructor isolate->Exit() // I think this pattern is called "Resource Acquisition Is Initialisation" (RAII), // The resouce allocation is done by the constructor, // and the release by the descructor when this instance goes out of scope. Isolate::Scope isolate_scope(isolate); // Create a stack-allocated handle scope. // A container for handles. Instead of having to manage individual handles (like deleting) them // you can simply delete the handle scope. HandleScope handle_scope(isolate); // Create a JavaScript template object allowing the object (in this case a function which is // also an object in JavaScript remember). Local<ObjectTemplate> global = ObjectTemplate::New(isolate); // associate 'doit' with the doit function, allowing JavaScript to call it. global->Set(String::NewFromUtf8(isolate, "doit", NewStringType::kNormal).ToLocalChecked(), FunctionTemplate::New(isolate, doit)); // make 'age' available to JavaScript global->SetAccessor(String::NewFromUtf8(isolate, "age", NewStringType::kNormal).ToLocalChecked(), age_getter, age_setter); // set a named property interceptor //global->SetNamedPropertyHandler(property_listener); // Inside an instance of V8 (an Isolate) you can have multiple unrelated JavaScript applications // running. JavaScript has global level stuff, and one application should not mess things up for // another running application. Context allow for each application not step on each others toes. Local<Context> context = Context::New(isolate, nullptr, global); // a Local<SomeType> is held on the stack, and accociated with a handle scope. When the handle // scope is deleted the GC can deallocate the objects. // Enter the context for compiling and running the script. Context::Scope context_scope(context); // Create a string containing the JavaScript source code. const char* js = "age = 40; doit(age);"; printf("js: %s\n", js); Local<String> source = String::NewFromUtf8(isolate, js, NewStringType::kNormal).ToLocalChecked(); // Compile the source code. Local<Script> script = Script::Compile(context, source).ToLocalChecked(); // Run the script to get the result. Local<Value> result = script->Run(context).ToLocalChecked(); // Convert the result to an UTF8 string and print it. String::Utf8Value utf8(isolate, result); printf("%s\n", *utf8); } // Dispose the isolate and tear down V8. isolate->Dispose(); V8::Dispose(); V8::ShutdownPlatform(); return 0; } ```
```php <?php /** */ namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest; use Sabre\DAV\Auth\Backend\BackendInterface; use Sabre\HTTP\RequestInterface; use Sabre\HTTP\ResponseInterface; class Auth implements BackendInterface { /** * @var string */ private $user; /** * @var string */ private $password; /** * Auth constructor. * * @param string $user * @param string $password */ public function __construct($user, $password) { $this->user = $user; $this->password = $password; } /** * When this method is called, the backend must check if authentication was * successful. * * The returned value must be one of the following * * [true, "principals/username"] * [false, "reason for failure"] * * If authentication was successful, it's expected that the authentication * backend returns a so-called principal url. * * Examples of a principal url: * * principals/admin * principals/user1 * principals/users/joe * principals/uid/123457 * * If you don't use WebDAV ACL (RFC3744) we recommend that you simply * return a string such as: * * principals/users/[username] * * @param RequestInterface $request * @param ResponseInterface $response * @return array */ public function check(RequestInterface $request, ResponseInterface $response) { $userSession = \OC::$server->getUserSession(); $result = $userSession->login($this->user, $this->password); if ($result) { //we need to pass the user name, which may differ from login name $user = $userSession->getUser()->getUID(); \OC_Util::setupFS($user); //trigger creation of user home and /files folder \OC::$server->getUserFolder($user); return [true, "principals/$user"]; } return [false, "login failed"]; } /** * This method is called when a user could not be authenticated, and * authentication was required for the current request. * * This gives you the opportunity to set authentication headers. The 401 * status code will already be set. * * In this case of Basic Auth, this would for example mean that the * following header needs to be set: * * $response->addHeader('WWW-Authenticate', 'Basic realm=SabreDAV'); * * Keep in mind that in the case of multiple authentication backends, other * WWW-Authenticate headers may already have been set, and you'll want to * append your own WWW-Authenticate header instead of overwriting the * existing one. * * @param RequestInterface $request * @param ResponseInterface $response * @return void */ public function challenge(RequestInterface $request, ResponseInterface $response): void { // TODO: Implement challenge() method. } } ```
```c++ //your_sha256_hash--------------------------------------- //your_sha256_hash--------------------------------------- #include "RuntimeBasePch.h" #ifdef ENABLE_SCRIPT_DEBUGGING #include "Debug/DiagProbe.h" #include "Debug/BreakpointProbe.h" #include "Debug/DebugDocument.h" #include "Debug/DebugManager.h" #endif namespace Js { // if m_cchLength < 0 it came from an external source. // If m_cbLength > abs(m_cchLength) then m_utf8Source contains non-ASCII (multi-byte encoded) characters. Utf8SourceInfo::Utf8SourceInfo(ISourceHolder* mappableSource, int32 cchLength, SRCINFO const* srcInfo, DWORD_PTR secondaryHostSourceContext, ScriptContext* scriptContext, bool isLibraryCode, Js::Var scriptSource): sourceHolder(mappableSource), m_cchLength(cchLength), m_srcInfo(srcInfo), m_secondaryHostSourceContext(secondaryHostSourceContext), #ifdef ENABLE_SCRIPT_DEBUGGING m_debugDocument(nullptr), #endif m_sourceInfoId(scriptContext->GetThreadContext()->NewSourceInfoNumber()), m_isCesu8(false), m_isLibraryCode(isLibraryCode), m_isXDomain(false), m_isXDomainString(false), m_scriptContext(scriptContext), m_lineOffsetCache(nullptr), m_deferredFunctionsDictionary(nullptr), m_deferredFunctionsInitialized(false), topLevelFunctionInfoList(nullptr), #ifdef ENABLE_SCRIPT_DEBUGGING debugModeSource(nullptr), debugModeSourceIsEmpty(false), debugModeSourceLength(0), m_isInDebugMode(false), #endif callerUtf8SourceInfo(nullptr), boundedPropertyRecordHashSet(scriptContext->GetRecycler()) #ifndef NTBUILD ,sourceRef(scriptSource) #endif { #ifdef ENABLE_SCRIPT_DEBUGGING if (!sourceHolder->IsDeferrable()) { this->debugModeSource = this->sourceHolder->GetSource(_u("Entering Debug Mode")); this->debugModeSourceLength = this->sourceHolder->GetByteLength(_u("Entering Debug Mode")); this->debugModeSourceIsEmpty = !this->HasSource() || this->debugModeSource == nullptr; } #endif } LPCUTF8 Utf8SourceInfo::GetSource(const char16 * reason) const { AssertMsg(this->sourceHolder != nullptr, "We have no source mapper."); #ifdef ENABLE_SCRIPT_DEBUGGING if (this->IsInDebugMode()) { AssertMsg(this->debugModeSource != nullptr || this->debugModeSourceIsEmpty, "Debug mode source should have been set by this point."); return debugModeSource; } else #endif { return sourceHolder->GetSource(reason == nullptr ? _u("Utf8SourceInfo::GetSource") : reason); } } size_t Utf8SourceInfo::GetCbLength(const char16 * reason) const { AssertMsg(this->sourceHolder != nullptr, "We have no source mapper."); #ifdef ENABLE_SCRIPT_DEBUGGING if (this->IsInDebugMode()) { AssertMsg(this->debugModeSource != nullptr || this->debugModeSourceIsEmpty, "Debug mode source should have been set by this point."); return debugModeSourceLength; } else #endif { return sourceHolder->GetByteLength(reason == nullptr ? _u("Utf8SourceInfo::GetSource") : reason); } } void Utf8SourceInfo::Dispose(bool isShutdown) { #ifdef ENABLE_SCRIPT_DEBUGGING ClearDebugDocument(); this->debugModeSource = nullptr; #endif #ifndef NTBUILD this->sourceRef = nullptr; #endif }; enum { fsiHostManaged = 0x01, fsiScriptlet = 0x02, fsiDeferredParse = 0x04 }; void Utf8SourceInfo::RemoveFunctionBody(FunctionBody* functionBody) { Assert(this->functionBodyDictionary); const LocalFunctionId functionId = functionBody->GetLocalFunctionId(); Assert(functionBodyDictionary->Item(functionId) == functionBody); functionBodyDictionary->Remove(functionId); functionBody->SetIsFuncRegistered(false); } void Utf8SourceInfo::SetFunctionBody(FunctionBody * functionBody) { Assert(this->m_scriptContext == functionBody->GetScriptContext()); Assert(this->functionBodyDictionary); // Only register a function body when source info is ready. Note that m_pUtf8Source can still be null for lib script. Assert(functionBody->GetSourceIndex() != Js::Constants::InvalidSourceIndex); Assert(!functionBody->GetIsFuncRegistered()); const LocalFunctionId functionId = functionBody->GetLocalFunctionId(); FunctionBody* oldFunctionBody = nullptr; if (functionBodyDictionary->TryGetValue(functionId, &oldFunctionBody)) { Assert(oldFunctionBody != functionBody); oldFunctionBody->SetIsFuncRegistered(false); } functionBodyDictionary->Item(functionId, functionBody); functionBody->SetIsFuncRegistered(true); } void Utf8SourceInfo::AddTopLevelFunctionInfo(FunctionInfo * functionInfo, Recycler * recycler) { JsUtil::List<FunctionInfo *, Recycler> * list = EnsureTopLevelFunctionInfoList(recycler); Assert(!list->Contains(functionInfo)); list->Add(functionInfo); } void Utf8SourceInfo::ClearTopLevelFunctionInfoList() { if (this->topLevelFunctionInfoList) { this->topLevelFunctionInfoList->Clear(); } } JsUtil::List<FunctionInfo *, Recycler> * Utf8SourceInfo::EnsureTopLevelFunctionInfoList(Recycler * recycler) { if (this->topLevelFunctionInfoList == nullptr) { this->topLevelFunctionInfoList = JsUtil::List<FunctionInfo *, Recycler>::New(recycler); } return this->topLevelFunctionInfoList; } void Utf8SourceInfo::EnsureInitialized(int initialFunctionCount) { ThreadContext* threadContext = ThreadContext::GetContextForCurrentThread(); Recycler* recycler = threadContext->GetRecycler(); if (this->functionBodyDictionary == nullptr) { // This collection is allocated with leaf allocation policy. The references to the function body // here does not keep the function alive. However, the functions remove themselves at finalize // so if a function actually is in this map, it means that it is alive. this->functionBodyDictionary = RecyclerNew(recycler, FunctionBodyDictionary, recycler, initialFunctionCount, threadContext->GetFunctionBodyLock()); } if (CONFIG_FLAG(DeferTopLevelTillFirstCall) && !m_deferredFunctionsInitialized) { Assert(this->m_deferredFunctionsDictionary == nullptr); this->m_deferredFunctionsDictionary = RecyclerNew(recycler, DeferredFunctionsDictionary, recycler, initialFunctionCount, threadContext->GetFunctionBodyLock()); m_deferredFunctionsInitialized = true; } } Utf8SourceInfo* Utf8SourceInfo::NewWithHolder(ScriptContext* scriptContext, ISourceHolder* sourceHolder, int32 length, SRCINFO const* srcInfo, bool isLibraryCode, Js::Var scriptSource) { // TODO: make this finalizable? Or have a finalizable version which would HeapDelete the string? Is this needed? DWORD_PTR secondaryHostSourceContext = Js::Constants::NoHostSourceContext; #ifdef ENABLE_SCRIPT_DEBUGGING if (srcInfo->sourceContextInfo->IsDynamic()) { secondaryHostSourceContext = scriptContext->GetThreadContext()->GetDebugManager()->AllocateSecondaryHostSourceContext(); } #endif Recycler * recycler = scriptContext->GetRecycler(); Utf8SourceInfo* toReturn = RecyclerNewFinalized(recycler, Utf8SourceInfo, sourceHolder, length, SRCINFO::Copy(recycler, srcInfo), secondaryHostSourceContext, scriptContext, isLibraryCode, scriptSource); #ifdef ENABLE_SCRIPT_DEBUGGING if (!isLibraryCode && scriptContext->IsScriptContextInDebugMode()) { toReturn->debugModeSource = sourceHolder->GetSource(_u("Debug Mode Loading")); toReturn->debugModeSourceLength = sourceHolder->GetByteLength(_u("Debug Mode Loading")); toReturn->debugModeSourceIsEmpty = toReturn->debugModeSource == nullptr || sourceHolder->IsEmpty(); } #endif return toReturn; } Utf8SourceInfo* Utf8SourceInfo::New(ScriptContext* scriptContext, LPCUTF8 utf8String, int32 length, size_t numBytes, SRCINFO const* srcInfo, bool isLibraryCode) { utf8char_t * newUtf8String = RecyclerNewArrayLeaf(scriptContext->GetRecycler(), utf8char_t, numBytes + 1); js_memcpy_s(newUtf8String, numBytes + 1, utf8String, numBytes + 1); return NewWithNoCopy(scriptContext, newUtf8String, length, numBytes, srcInfo, isLibraryCode); } Utf8SourceInfo* Utf8SourceInfo::NewWithNoCopy(ScriptContext* scriptContext, LPCUTF8 utf8String, int32 length, size_t numBytes, SRCINFO const * srcInfo, bool isLibraryCode, Js::Var scriptSource) { ISourceHolder* sourceHolder = RecyclerNew(scriptContext->GetRecycler(), SimpleSourceHolder, utf8String, numBytes); return NewWithHolder(scriptContext, sourceHolder, length, srcInfo, isLibraryCode, scriptSource); } HRESULT Utf8SourceInfo::EnsureLineOffsetCacheNoThrow() { HRESULT hr = S_OK; // This is a double check, otherwise we would have to have a private function, and add an assert. // Basically the outer check is for try/catch, inner check (inside EnsureLineOffsetCache) is for that method as its public. if (this->m_lineOffsetCache == nullptr) { BEGIN_TRANSLATE_EXCEPTION_AND_ERROROBJECT_TO_HRESULT_NESTED { this->EnsureLineOffsetCache(); } END_TRANSLATE_EXCEPTION_AND_ERROROBJECT_TO_HRESULT_NOASSERT(hr); } return hr; } void Utf8SourceInfo::EnsureLineOffsetCache() { if (this->m_lineOffsetCache == nullptr) { LPCUTF8 sourceStart = this->GetSource(_u("Utf8SourceInfo::AllocateLineOffsetCache")); LPCUTF8 sourceEnd = sourceStart + this->GetCbLength(_u("Utf8SourceInfo::AllocateLineOffsetCache")); LPCUTF8 sourceAfterBOM = sourceStart; charcount_t startChar = FunctionBody::SkipByteOrderMark(sourceAfterBOM /* byref */); int64 byteStartOffset = (sourceAfterBOM - sourceStart); Recycler* recycler = this->m_scriptContext->GetRecycler(); this->m_lineOffsetCache = RecyclerNew(recycler, LineOffsetCache, recycler, sourceAfterBOM, sourceEnd, startChar, (int)byteStartOffset); } } Js::FunctionBody* Utf8SourceInfo::FindFunction(Js::LocalFunctionId id) const { Js::FunctionBody *matchedFunctionBody = nullptr; if (this->functionBodyDictionary) { // Ignore return value - OK if function is not found. this->functionBodyDictionary->TryGetValue(id, &matchedFunctionBody); if (matchedFunctionBody == nullptr || matchedFunctionBody->IsPartialDeserializedFunction()) { return nullptr; } } return matchedFunctionBody; } void Utf8SourceInfo::GetLineInfoForCharPosition(charcount_t charPosition, charcount_t *outLineNumber, charcount_t *outColumn, charcount_t *outLineByteOffset, bool allowSlowLookup) { AssertMsg(this->m_lineOffsetCache != nullptr || allowSlowLookup, "LineOffsetCache wasn't created, EnsureLineOffsetCache should have been called."); AssertMsg(outLineNumber != nullptr && outColumn != nullptr && outLineByteOffset != nullptr, "Expected out parameter's can't be a nullptr."); charcount_t lineCharOffset = 0; int line = 0; if (this->m_lineOffsetCache == nullptr) { LPCUTF8 sourceStart = this->GetSource(_u("Utf8SourceInfo::AllocateLineOffsetCache")); LPCUTF8 sourceEnd = sourceStart + this->GetCbLength(_u("Utf8SourceInfo::AllocateLineOffsetCache")); LPCUTF8 sourceAfterBOM = sourceStart; lineCharOffset = FunctionBody::SkipByteOrderMark(sourceAfterBOM /* byref */); Assert((sourceAfterBOM - sourceStart) < MAXUINT32); charcount_t byteStartOffset = (charcount_t)(sourceAfterBOM - sourceStart); line = LineOffsetCache::FindLineForCharacterOffset(sourceAfterBOM, sourceEnd, lineCharOffset, byteStartOffset, charPosition); *outLineByteOffset = byteStartOffset; } else { line = this->m_lineOffsetCache->GetLineForCharacterOffset(charPosition, &lineCharOffset, outLineByteOffset); } Assert(charPosition >= lineCharOffset); *outLineNumber = line; *outColumn = charPosition - lineCharOffset; } void Utf8SourceInfo::CreateLineOffsetCache(const charcount_t *lineCharacterOffsets, const charcount_t *lineByteOffsets, charcount_t numberOfItems) { AssertMsg(this->m_lineOffsetCache == nullptr, "LineOffsetCache is already initialized!"); Recycler* recycler = this->m_scriptContext->GetRecycler(); this->m_lineOffsetCache = RecyclerNew(recycler, LineOffsetCache, recycler, lineCharacterOffsets, lineByteOffsets, numberOfItems); } DWORD_PTR Utf8SourceInfo::GetHostSourceContext() const { return m_srcInfo->sourceContextInfo->dwHostSourceContext; } bool Utf8SourceInfo::IsDynamic() const { return m_srcInfo->sourceContextInfo->IsDynamic(); } SourceContextInfo* Utf8SourceInfo::GetSourceContextInfo() const { return this->m_srcInfo->sourceContextInfo; } // Get's the first function in the function body dictionary // Used if the caller want's any function in this source info Js::FunctionBody* Utf8SourceInfo::GetAnyParsedFunction() { if (this->functionBodyDictionary != nullptr && this->functionBodyDictionary->Count() > 0) { FunctionBody* functionBody = nullptr; int i = 0; do { functionBody = this->functionBodyDictionary->GetValueAt(i); if (functionBody != nullptr && functionBody->GetByteCode() == nullptr && !functionBody->GetIsFromNativeCodeModule()) functionBody = nullptr; i++; } while (functionBody == nullptr && i < this->functionBodyDictionary->Count()); return functionBody; } return nullptr; } bool Utf8SourceInfo::IsHostManagedSource() const { return ((this->m_srcInfo->grfsi & fsiHostManaged) == fsiHostManaged); } void Utf8SourceInfo::SetCallerUtf8SourceInfo(Utf8SourceInfo* callerUtf8SourceInfo) { this->callerUtf8SourceInfo = callerUtf8SourceInfo; } Utf8SourceInfo* Utf8SourceInfo::GetCallerUtf8SourceInfo() const { return this->callerUtf8SourceInfo; } void Utf8SourceInfo::TrackDeferredFunction(Js::LocalFunctionId functionID, Js::ParseableFunctionInfo *function) { if (this->m_scriptContext->DoUndeferGlobalFunctions()) { Assert(m_deferredFunctionsInitialized); if (this->m_deferredFunctionsDictionary != nullptr) { this->m_deferredFunctionsDictionary->Add(functionID, function); } } } void Utf8SourceInfo::StopTrackingDeferredFunction(Js::LocalFunctionId functionID) { if (this->m_scriptContext->DoUndeferGlobalFunctions()) { Assert(m_deferredFunctionsInitialized); if (this->m_deferredFunctionsDictionary != nullptr) { this->m_deferredFunctionsDictionary->Remove(functionID); } } } #ifdef ENABLE_SCRIPT_DEBUGGING void Utf8SourceInfo::ClearDebugDocument(bool close) { if (this->m_debugDocument != nullptr) { if (close) { m_debugDocument->CloseDocument(); } this->m_debugDocument = nullptr; } } #endif #ifdef NTBUILD bool Utf8SourceInfo::GetDebugDocumentName(BSTR * sourceName) { if (this->HasDebugDocument() && this->GetDebugDocument()->HasDocumentText()) { // ToDo (SaAgarwa): Fix for JsRT debugging IDebugDocumentText *documentText = static_cast<IDebugDocumentText *>(this->GetDebugDocument()->GetDocumentText()); if (documentText->GetName(DOCUMENTNAMETYPE_URL, sourceName) == S_OK) { return true; } } return false; } #endif } ```
José Ramón Zaragoza Fernández (16 March 1874, Cangas de Onís - 29 July 1949, Alpedrete) was a Spanish painter, primarily known for genre scenes and female portraits. Biography He began his studies at the School of Arts and Crafts in Oviedo with . In 1892, he entered a work in the National Exhibition of Fine Arts for the first time. In the Exhibition of 1897, he earned an honorable mention for "The Lesson". That same year, he received a grant from the Diputación de Asturias and was able to enroll at the Real Academia de Bellas Artes de San Fernando, where he studied with Luis Menéndez Pidal. He was further honored at the Exhibitions of 1901, when he was awarded a Second Class prize for "A Sick Child", which drew its inspiration from a poem by , and 1906, when he received another Second Class prize for "Orpheus in Hades". Thanks to another grant, from the Spanish government, he was able to study at the Spanish Academy in Rome from 1904 to 1910. Later, he painted in Paris and London, and travelled through Brittany, the Netherlands and Germany. These travels produced four works that he presented at the Exhibition of 1915; one of which, the "Portrait of Mr. Th. S." (Thomas Stanton), achieved his long-sought First Class prize. He would participate in the Exhibition once more, in 1920, with a portrait of Pío Baroja and a work called "Blue Eyes". He also exhibited internationally; receiving a silver medal at the Internationalen Kunstausstellung in Munich (1913) and an honorable mention at the Paris Salon of 1914. In 1923, he held a solo exhibit at the Museo de Arte Moderno (Madrid), with twenty-eight works. Two years later, he won a competition to paint three ceiling panels at the new headquarters of the Círculo de Bellas Artes. In 1928, he was named a Professor at the School of Arts and Crafts in Madrid and, in 1930, passed a competitive exam among former grant holders to become a Professor of painting at the Real Academia. He was elected a member candidate there in 1948, but died before he had formally accepted the position. The of Gijón held a major retrospective of his works in 1976. A similar exhibition was held in 1977, by the Círculo de Bellas Artes. The largest number of his works may be seen at the Museum of Fine Arts of Asturias. References Further reading Belén Galán Martín, El pintor José Ramón Zaragoza Fernández (1874-1949), Instituto de Estudios Asturianos, 1984 External links Biography @ Fundación MAXAM More works by Zaragoza @ ArtNet 1874 births 1949 deaths Spanish painters Spanish genre painters Spanish portrait painters People from Cangas de Onís Real Academia de Bellas Artes de San Fernando alumni Painters from Asturias
```shell #!/usr/bin/env bash # # Analyze history # # Usage: # soil/history.sh <function name> set -o nounset set -o pipefail set -o errexit REPO_ROOT=$(cd $(dirname $0)/.. && pwd) #source $REPO_ROOT/soil/common.sh readonly BASE_DIR=_tmp/soil-history readonly HOST=travis-ci.oilshell.org list() { ### Used the sync'd testdata local dir=${1:-_tmp/github-jobs} # 4 digits ssh travis-ci.oilshell.org 'ls travis-ci.oilshell.org/github-jobs/' } find-wwz() { ### Used the sync'd testdata local dir=${1:-_tmp/github-jobs} mkdir -p $BASE_DIR # 4 digits ssh $HOST \ 'cd travis-ci.oilshell.org && find github-jobs/48?? -name benchmarks2.wwz' \ | tee $BASE_DIR/listing.txt } sync() { local dir=$HOST rsync \ --archive --verbose \ --files-from $BASE_DIR/listing.txt \ $HOST:$dir/ $BASE_DIR/ } list-zip() { unzip -l $BASE_DIR/github-jobs/5000/*.wwz } extract-one() { local id=$1 local dir=$BASE_DIR/github-jobs/$id pushd $dir # commit-hash.txt unzip benchmarks2.wwz '_tmp/gc-cachegrind/stage2/*' '_tmp/soil/*' || true popd } extract-all() { for dir in $BASE_DIR/github-jobs/48??; do local id=$(basename $dir) extract-one $id done } show-all() { #local pat='mut+alloc+free+gc' local pat='bumpleak' grep "$pat" \ $BASE_DIR/github-jobs/????/_tmp/gc-cachegrind/stage2/ex.compute-fib.tsv } "$@" ```
Les Femmes de ma vie is the 11th French studio album by Joe Dassin. It came out in 1978 on CBS Disques. Track listing References External links 1978 albums Joe Dassin albums CBS Disques albums Albums produced by Jacques Plait
```c++ /* * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. 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. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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. */ #include "config.h" #include "modules/webdatabase/InspectorDatabaseAgent.h" #include "bindings/core/v8/ExceptionStatePlaceholder.h" #include "core/frame/LocalFrame.h" #include "core/html/VoidCallback.h" #include "core/inspector/InspectorState.h" #include "core/loader/DocumentLoader.h" #include "core/page/Page.h" #include "modules/webdatabase/Database.h" #include "modules/webdatabase/DatabaseClient.h" #include "modules/webdatabase/InspectorDatabaseResource.h" #include "modules/webdatabase/SQLError.h" #include "modules/webdatabase/SQLResultSet.h" #include "modules/webdatabase/SQLResultSetRowList.h" #include "modules/webdatabase/SQLStatementCallback.h" #include "modules/webdatabase/SQLStatementErrorCallback.h" #include "modules/webdatabase/SQLTransaction.h" #include "modules/webdatabase/SQLTransactionCallback.h" #include "modules/webdatabase/SQLTransactionErrorCallback.h" #include "modules/webdatabase/sqlite/SQLValue.h" #include "platform/JSONValues.h" #include "wtf/Vector.h" typedef blink::InspectorBackendDispatcher::DatabaseCommandHandler::ExecuteSQLCallback ExecuteSQLCallback; namespace blink { namespace DatabaseAgentState { static const char databaseAgentEnabled[] = "databaseAgentEnabled"; }; namespace { void reportTransactionFailed(ExecuteSQLCallback* requestCallback, SQLError* error) { RefPtr<TypeBuilder::Database::Error> errorObject = TypeBuilder::Database::Error::create() .setMessage(error->message()) .setCode(error->code()); requestCallback->sendSuccess(nullptr, nullptr, errorObject.release()); } class StatementCallback final : public SQLStatementCallback { public: static StatementCallback* create(PassRefPtrWillBeRawPtr<ExecuteSQLCallback> requestCallback) { return new StatementCallback(requestCallback); } ~StatementCallback() override { } DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(m_requestCallback); SQLStatementCallback::trace(visitor); } bool handleEvent(SQLTransaction*, SQLResultSet* resultSet) override { SQLResultSetRowList* rowList = resultSet->rows(); RefPtr<TypeBuilder::Array<String>> columnNames = TypeBuilder::Array<String>::create(); const Vector<String>& columns = rowList->columnNames(); for (size_t i = 0; i < columns.size(); ++i) columnNames->addItem(columns[i]); RefPtr<TypeBuilder::Array<JSONValue>> values = TypeBuilder::Array<JSONValue>::create(); const Vector<SQLValue>& data = rowList->values(); for (size_t i = 0; i < data.size(); ++i) { const SQLValue& value = rowList->values()[i]; switch (value.type()) { case SQLValue::StringValue: values->addItem(JSONString::create(value.string())); break; case SQLValue::NumberValue: values->addItem(JSONBasicValue::create(value.number())); break; case SQLValue::NullValue: values->addItem(JSONValue::null()); break; } } m_requestCallback->sendSuccess(columnNames.release(), values.release(), nullptr); return true; } private: StatementCallback(PassRefPtrWillBeRawPtr<ExecuteSQLCallback> requestCallback) : m_requestCallback(requestCallback) { } RefPtrWillBeMember<ExecuteSQLCallback> m_requestCallback; }; class StatementErrorCallback final : public SQLStatementErrorCallback { public: static StatementErrorCallback* create(PassRefPtrWillBeRawPtr<ExecuteSQLCallback> requestCallback) { return new StatementErrorCallback(requestCallback); } ~StatementErrorCallback() override { } DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(m_requestCallback); SQLStatementErrorCallback::trace(visitor); } bool handleEvent(SQLTransaction*, SQLError* error) override { reportTransactionFailed(m_requestCallback.get(), error); return true; } private: StatementErrorCallback(PassRefPtrWillBeRawPtr<ExecuteSQLCallback> requestCallback) : m_requestCallback(requestCallback) { } RefPtrWillBeMember<ExecuteSQLCallback> m_requestCallback; }; class TransactionCallback final : public SQLTransactionCallback { public: static TransactionCallback* create(const String& sqlStatement, PassRefPtrWillBeRawPtr<ExecuteSQLCallback> requestCallback) { return new TransactionCallback(sqlStatement, requestCallback); } ~TransactionCallback() override { } DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(m_requestCallback); SQLTransactionCallback::trace(visitor); } bool handleEvent(SQLTransaction* transaction) override { if (!m_requestCallback->isActive()) return true; Vector<SQLValue> sqlValues; SQLStatementCallback* callback = StatementCallback::create(m_requestCallback.get()); SQLStatementErrorCallback* errorCallback = StatementErrorCallback::create(m_requestCallback.get()); transaction->executeSQL(m_sqlStatement, sqlValues, callback, errorCallback, IGNORE_EXCEPTION); return true; } private: TransactionCallback(const String& sqlStatement, PassRefPtrWillBeRawPtr<ExecuteSQLCallback> requestCallback) : m_sqlStatement(sqlStatement) , m_requestCallback(requestCallback) { } String m_sqlStatement; RefPtrWillBeMember<ExecuteSQLCallback> m_requestCallback; }; class TransactionErrorCallback final : public SQLTransactionErrorCallback { public: static TransactionErrorCallback* create(PassRefPtrWillBeRawPtr<ExecuteSQLCallback> requestCallback) { return new TransactionErrorCallback(requestCallback); } ~TransactionErrorCallback() override { } DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(m_requestCallback); SQLTransactionErrorCallback::trace(visitor); } bool handleEvent(SQLError* error) override { reportTransactionFailed(m_requestCallback.get(), error); return true; } private: TransactionErrorCallback(PassRefPtrWillBeRawPtr<ExecuteSQLCallback> requestCallback) : m_requestCallback(requestCallback) { } RefPtrWillBeMember<ExecuteSQLCallback> m_requestCallback; }; class TransactionSuccessCallback final : public VoidCallback { public: static TransactionSuccessCallback* create() { return new TransactionSuccessCallback(); } ~TransactionSuccessCallback() override { } void handleEvent() override { } private: TransactionSuccessCallback() { } }; } // namespace void InspectorDatabaseAgent::didOpenDatabase(Database* database, const String& domain, const String& name, const String& version) { if (InspectorDatabaseResource* resource = findByFileName(database->fileName())) { resource->setDatabase(database); return; } InspectorDatabaseResource* resource = InspectorDatabaseResource::create(database, domain, name, version); m_resources.set(resource->id(), resource); // Resources are only bound while visible. if (frontend() && m_enabled) resource->bind(frontend()); } void InspectorDatabaseAgent::didCommitLoadForLocalFrame(LocalFrame* frame) { // FIXME(dgozman): adapt this for out-of-process iframes. if (frame != m_page->mainFrame()) return; m_resources.clear(); } InspectorDatabaseAgent::InspectorDatabaseAgent(Page* page) : InspectorBaseAgent<InspectorDatabaseAgent, InspectorFrontend::Database>("Database") , m_page(page) , m_enabled(false) { DatabaseClient::fromPage(page)->setInspectorAgent(this); } InspectorDatabaseAgent::~InspectorDatabaseAgent() { } void InspectorDatabaseAgent::enable(ErrorString*) { if (m_enabled) return; m_enabled = true; m_state->setBoolean(DatabaseAgentState::databaseAgentEnabled, m_enabled); DatabaseResourcesHeapMap::iterator databasesEnd = m_resources.end(); for (DatabaseResourcesHeapMap::iterator it = m_resources.begin(); it != databasesEnd; ++it) it->value->bind(frontend()); } void InspectorDatabaseAgent::disable(ErrorString*) { if (!m_enabled) return; m_enabled = false; m_state->setBoolean(DatabaseAgentState::databaseAgentEnabled, m_enabled); } void InspectorDatabaseAgent::restore() { m_enabled = m_state->getBoolean(DatabaseAgentState::databaseAgentEnabled); } void InspectorDatabaseAgent::getDatabaseTableNames(ErrorString* error, const String& databaseId, RefPtr<TypeBuilder::Array<String>>& names) { if (!m_enabled) { *error = "Database agent is not enabled"; return; } names = TypeBuilder::Array<String>::create(); Database* database = databaseForId(databaseId); if (database) { Vector<String> tableNames = database->tableNames(); unsigned length = tableNames.size(); for (unsigned i = 0; i < length; ++i) names->addItem(tableNames[i]); } } void InspectorDatabaseAgent::executeSQL(ErrorString*, const String& databaseId, const String& query, PassRefPtrWillBeRawPtr<ExecuteSQLCallback> prpRequestCallback) { RefPtrWillBeRawPtr<ExecuteSQLCallback> requestCallback = prpRequestCallback; if (!m_enabled) { requestCallback->sendFailure("Database agent is not enabled"); return; } Database* database = databaseForId(databaseId); if (!database) { requestCallback->sendFailure("Database not found"); return; } SQLTransactionCallback* callback = TransactionCallback::create(query, requestCallback.get()); SQLTransactionErrorCallback* errorCallback = TransactionErrorCallback::create(requestCallback.get()); VoidCallback* successCallback = TransactionSuccessCallback::create(); database->transaction(callback, errorCallback, successCallback); } InspectorDatabaseResource* InspectorDatabaseAgent::findByFileName(const String& fileName) { for (DatabaseResourcesHeapMap::iterator it = m_resources.begin(); it != m_resources.end(); ++it) { if (it->value->database()->fileName() == fileName) return it->value.get(); } return 0; } Database* InspectorDatabaseAgent::databaseForId(const String& databaseId) { DatabaseResourcesHeapMap::iterator it = m_resources.find(databaseId); if (it == m_resources.end()) return 0; return it->value->database(); } DEFINE_TRACE(InspectorDatabaseAgent) { #if ENABLE(OILPAN) visitor->trace(m_resources); #endif InspectorBaseAgent::trace(visitor); } } // namespace blink ```
```go package keystone // For Keystone Engine. AUTO-GENERATED FILE, DO NOT EDIT [ppc_const.go] const ( ERR_ASM_PPC_INVALIDOPERAND Error = 512 ERR_ASM_PPC_MISSINGFEATURE Error = 513 ERR_ASM_PPC_MNEMONICFAIL Error = 514 ) ```
Dipterocarpus costulatus is a species of tree in the family Dipterocarpaceae. It grows up to tall. Distribution and habitat Dipterocarpus costulatus is native to Peninsular Malaysia, Singapore, Borneo and Sumatra. Its habitat is in lowland kerangas forest or hill forest from sea level to altitude. Conservation Dipterocarpus costulatus is threatened by logging and habitat loss, particularly in Borneo. The tree is logged for its hardwood. Forests where the species is present are being cleared for agricultural or plantation development. More frequent fires threaten lowland populations. References costulatus Trees of Sumatra Trees of Peninsular Malaysia Dipterocarps of Borneo Plants described in 1927 Flora of the Sundaland heath forests
```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\DoubleClickBidManager; class PathQueryOptionsFilter extends \Google\Collection { protected $collection_key = 'values'; /** * @var string */ public $filter; /** * @var string */ public $match; /** * @var string[] */ public $values; /** * @param string */ public function setFilter($filter) { $this->filter = $filter; } /** * @return string */ public function getFilter() { return $this->filter; } /** * @param string */ public function setMatch($match) { $this->match = $match; } /** * @return string */ public function getMatch() { return $this->match; } /** * @param string[] */ public function setValues($values) { $this->values = $values; } /** * @return string[] */ public function getValues() { return $this->values; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(PathQueryOptionsFilter::class, 'Google_Service_DoubleClickBidManager_PathQueryOptionsFilter'); ```
```jsx /* * This is a demo component the Eletrode app generator included * to show using Milligram CSS lib and Redux * store for display HTML elements and managing states. * * To start your own app, please replace or remove these files: * * - this file (home.jsx) * - demo-buttons.jsx * - demo-pure-states.jsx * - demo-states.jsx * - reducers/index.jsx * - styles/*.css * */ import React from "react"; import { connect } from "react-redux"; import "../styles/raleway.css"; import custom from "../styles/custom.css"; // eslint-disable-line no-unused-vars import electrodePng from "../images/electrode.png"; import DemoStates from "./demo-states"; import DemoPureStates from "./demo-pure-states"; import { DemoButtons } from "./demo-buttons"; import DemoDynamicImport from "./demo-dynamic-import"; import { Nav } from "./nav"; // import DemoCookies from "./demo-cookies"; // // import config from "electrode-ui-config"; // // class Home extends React.Component { constructor(props) { super(props); } render() { return ( <div styleName="custom.container"> <Nav {...this.props} /> {/**/} <section styleName="custom.header"> <h2> <span>Hello from </span> <a href="path_to_url"> {"Electrode"} <img src={electrodePng} /> </a> </h2> </section> <div styleName="custom.docs-section"> <DemoStates /> </div> <div styleName="custom.docs-section"> <DemoPureStates /> </div> {/**/} <div styleName="custom.docs-section"> <DemoCookies /> </div> {/**/} {/**/} <div styleName="custom.docs-section"> <h6 styleName="custom.docs-header">Demo Isomorphic UI Config</h6> <div>config.ui.demo: "{config.ui.demo}"</div> </div> {/**/} <div styleName="custom.docs-section"> <DemoButtons /> </div> <div styleName="custom.docs-section"> <DemoDynamicImport/> </div> </div> ); } } Home.propTypes = {}; const mapStateToProps = state => state; export default connect( mapStateToProps, dispatch => ({ dispatch }) )(Home); ```
```smalltalk /* This file is part of the iText (R) project. Authors: Apryse Software. This program is offered under a commercial and under the AGPL license. For commercial licensing, contact us at path_to_url For AGPL licensing, see below. AGPL licensing: This program is free software: you can redistribute it and/or modify (at your option) any later version. This program 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 this program. If not, see <path_to_url */ using System; using iText.Svg.Dummy.Renderers.Impl; using iText.Svg.Processors.Impl; using iText.Svg.Renderers; using iText.Test; namespace iText.Svg.Processors { [NUnit.Framework.Category("UnitTest")] public class ProcessorStateTest : ExtendedITextTest { /// <summary>Push test</summary> [NUnit.Framework.Test] public virtual void ProcessorStateTestPush() { ProcessorState testProcessorState = new ProcessorState(); ISvgNodeRenderer renderer = new DummySvgNodeRenderer("test"); testProcessorState.Push(renderer); NUnit.Framework.Assert.IsTrue(testProcessorState.Size() == 1); } /// <summary>Pop test</summary> [NUnit.Framework.Test] public virtual void ProcessorStateTestPop() { ProcessorState testProcessorState = new ProcessorState(); ISvgNodeRenderer renderer = new DummySvgNodeRenderer("test"); testProcessorState.Push(renderer); ISvgNodeRenderer popped = testProcessorState.Pop(); NUnit.Framework.Assert.IsTrue(popped.ToString().Equals("test") && testProcessorState.Empty()); } /// <summary>Peek test</summary> [NUnit.Framework.Test] public virtual void ProcessorStateTestPeek() { ProcessorState testProcessorState = new ProcessorState(); ISvgNodeRenderer renderer = new DummySvgNodeRenderer("test"); testProcessorState.Push(renderer); ISvgNodeRenderer viewed = testProcessorState.Top(); NUnit.Framework.Assert.IsTrue(viewed.ToString().Equals("test") && !testProcessorState.Empty()); } /// <summary>Multiple push test</summary> [NUnit.Framework.Test] public virtual void ProcessorStateTestMultiplePushesPopAndPeek() { ProcessorState testProcessorState = new ProcessorState(); ISvgNodeRenderer rendererOne = new DummySvgNodeRenderer("test01"); testProcessorState.Push(rendererOne); ISvgNodeRenderer rendererTwo = new DummySvgNodeRenderer("test02"); testProcessorState.Push(rendererTwo); ISvgNodeRenderer popped = testProcessorState.Pop(); bool result = popped.ToString().Equals("test02"); result = result && testProcessorState.Top().ToString().Equals("test01"); NUnit.Framework.Assert.IsTrue(result); } [NUnit.Framework.Test] public virtual void ProcessorStateTestPopEmpty() { ProcessorState testProcessorState = new ProcessorState(); NUnit.Framework.Assert.Catch(typeof(InvalidOperationException), () => testProcessorState.Pop()); } [NUnit.Framework.Test] public virtual void ProcessorStateTestPushSameElementTwice() { ProcessorState testProcessorState = new ProcessorState(); ISvgNodeRenderer rendererOne = new DummySvgNodeRenderer("test01"); testProcessorState.Push(rendererOne); testProcessorState.Push(rendererOne); ISvgNodeRenderer popped = testProcessorState.Pop(); bool result = popped.ToString().Equals("test01"); result = result && testProcessorState.Top().ToString().Equals("test01"); NUnit.Framework.Assert.IsTrue(result); } [NUnit.Framework.Test] public virtual void ProcessorStateTestPeekEmpty() { ProcessorState testProcessorState = new ProcessorState(); NUnit.Framework.Assert.Catch(typeof(InvalidOperationException), () => testProcessorState.Pop()); } } } ```
```java package sfBugs; import edu.umd.cs.findbugs.annotations.NoWarning; public class Bug3056289 { private static Bug3056289 instance; @NoWarning("UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR,ST_WRITE_TO_STATIC_FROM_INSTANCE") public Bug3056289() { if (instance != null) { throw new IllegalStateException("I'm a singleton!"); } instance = this; // ST_WRITE_TO_STATIC_FROM_INSTANCE is reported here! } } ```